+2002-06-19 Nathanael Nerode <neroden@twcny.rr.com>
+
+ * configure.in: Eliminate ${gasdir} variable.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ * configure.in: Add support for frv.
+ * config.sub: Add support for frv.
+
+2002-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
+
+2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (vax-*-netbsd*): Re-enable gas.
+
+2002-05-31 Nathanael Nerode <neroden@twcny.rr.com>
+
+ * Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with BUILD_PREFIX,
+ BUILD_PREFIX_1, to correct nomenclature.
+ * configure: Likewise.
+
+ * Makefile.in: Eliminate version-specific references to tcl8.1, tk8.1.
+ * configure.in: Eliminate version-specific references to tcl8.1, tk8.1.
+
+2002-05-31 Olaf Hering <olh@suse.de>
+
+ * config-ml.in: Propogate DESTDIR also.
+
+2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (vax-*-netbsd*): Don't build gas for this
+ platform.
+
2002-05-28 Marek Michalkiewicz <marekm@amelek.gda.pl>
* configure.in (noconfigdirs): Don't compile libiberty, libstdcxx
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
# here so that they can be overridden by Makefile fragments.
HOST_CC = $(CC_FOR_BUILD)
-HOST_PREFIX =
-HOST_PREFIX_1 = loser-
+BUILD_PREFIX =
+BUILD_PREFIX_1 = loser-
# These flag values are normally overridden by the configure script.
CFLAGS = -g
LDFLAGS =
LIBCFLAGS = $(CFLAGS)
CFLAGS_FOR_BUILD = $(CFLAGS)
-CFLAGS_FOR_TARGET = $(CFLAGS)
+# During gcc bootstrap, if we use some random cc for stage1 then
+# CFLAGS will be just -g. We want to ensure that TARGET libraries
+# (which we know are built with gcc) are built with optimizations so
+# prepend -O2 when setting CFLAGS_FOR_TARGET.
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
LDFLAGS_FOR_TARGET =
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
'CXX=$(CXX)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'HOST_CC=$(CC_FOR_BUILD)' \
- 'HOST_PREFIX=$(HOST_PREFIX)' \
- 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
+ 'BUILD_PREFIX=$(BUILD_PREFIX)' \
+ 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
'NM=$(NM)' \
"`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
all-snavigator \
all-tar \
all-tcl \
- all-tcl8.1 \
all-texinfo \
all-textutils \
all-tgas \
install-intl \
install-ispell \
install-tcl \
- install-tcl8.1 \
install-itcl \
install-ld \
install-libgui \
all-guile \
all-tclX \
all-tk \
- all-tk8.1 \
all-tix
# This is a list of the check targets for all of the modules which are
install-expect \
install-tclX \
install-tk \
- install-tk8.1 \
install-tix
# This is a list of the targets for all of the modules which are compiled
all-inet: all-tcl all-send-pr all-perl
all-intl:
all-ispell: all-emacs19
-all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
+all-itcl: all-tcl all-tk
all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: configure-target-libgloss configure-target-newlib
-all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
+all-libgui: all-tcl all-tk all-itcl
all-libiberty:
all-build-libiberty: configure-build-libiberty
all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
all-tar: all-libiberty
all-tcl:
-all-tcl8.1:
all-tclX: all-tcl all-tk
all-tk: all-tcl
-all-tk8.1: all-tcl8.1
all-texinfo: all-libiberty
all-textutils:
all-tgas: all-libiberty all-bfd all-opcodes
all-time:
-all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
+all-tix: all-tcl all-tk
all-wdiff:
configure-target-winsup: $(ALL_GCC_C)
all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
+2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elflink.h (size_dynamic_sections): If the target does not
+ support an ELF style has table, return true, indicating that
+ nothing needed to be done, rather than false, indicating that the
+ section's size could not be computed.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore, Michael Meissner, Dave Brolley:
+ * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
+ * targets.c: Support bfd_elf32_frv_vec.
+ * reloc.c: Add FRV relocs.
+ * configure.in: Add support for bfd-elf32-frv-vec.
+ * config.bfd (targ_cpu): Add support for frv-*-elf.
+ * archures.c: Add frv arch and machines.
+ * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
+ (ALL_MACHINES_CFILES): Add cpu-frv.c.
+ (BFD32_BACKENDS): Add elf32-frv.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-frv.c
+ (cpu-frv.lo): New target.
+ (elf32-frv.lo): New target.
+ * cpu-frv.c: New file.
+ * elf32-frv.c: New file.
+
+2002-06-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
+ e_shnum == 0.
+ Only read the first section header if e_shoff is non-zero.
+ Don't consider e_shstrndx if there are no sections.
+
+2002-06-17 Tom Rix <trix@redhat.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
+ R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
+ complain_overflow_bitfield.
+
+2002-06-17 Alan Modra <amodra@bigpond.net.au>
+
+ * opncls.c (bfd_openr): Remove redundant bfd_set_error.
+ (bfd_fdopenr): Likewise.
+ (bfd_openstreamr): Likewise.
+ (bfd_openw): Likewise.
+
+ * targets.c: Sort target vecs.
+ (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
+ bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
+ bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
+ bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
+ * configure.in: Sort target vecs. Add m88kmach3_vec.
+ * configure: Regenerate.
+
+2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
+ bpo_reloc_no to break sort order ties, not address of items.
+
+2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
+ Skip excluded sections in determing __gp value.
+ (elf_hppa_final_link_relocate): Use the symbol's address in
+ R_PARISC_FPTR64 relocations that don't need an opd entry.
+ * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
+ (elf64_hppa_finalize_dynreloc): Likewise.
+ (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
+ (elf64_hppa_finish_dynamic_symbol): Break up assert.
+
+2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
+
+ * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
+ alignment for .bss, .data and .text sections so that sse and sse2
+ code will work.
+ * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
+
+ config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
+ sh[1234]*-elf*.
+
+2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * elflink.h (elf_bfd_final_link): Improve error handling for missing
+ dynamic sections.
+
+ * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
+ for a symbol that has no output section.
+ (allocate_dynrel_entries): Correct comment.
+ (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
+ unless we want one.
+ (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
+ (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
+ with no section. Remove unnecessary parentheses.
+
+2002-06-11 Tom Rix <trix@redhat.com>
+
+ * coffcode.h (coff_compute_section_file_positions): Add data
+ section to AIX loader alignment check.
+
+ * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
+ alignment to 4 bytes.
+ (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
+ power accessor macro.
+ (do_shared_object_padding): Remove invalid assertion.
+
+2002-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
+ for removed output sections.
+
+2002-06-10 Geoffrey Keating <geoffk@redhat.com>
+
+ * merge.c (merge_strings): Use htab_create_alloc with calloc, not
+ htab_alloc.
+ * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
+
+2002-06-08 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
+ work around a long long bug in gcc 2.96 on mips.
+
+2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
+ (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
+ Regenerate dependency lists.
+ * Makefile.in: Regenerate.
+ * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
+ vax1knetbsd_vec to targ_selvecs.
+ * configure.in: Add vax1knetbsd_vec.
+ * configure: Regenerate.
+ * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
+ * vax1knetbsd.c: New file.
+ * vaxnetbsd.c: Update copyright years.
+ (TARGET_PAGE_SIZE): Set to 0x1000.
+ (DEFAULT_MID): Set to M_VAX4K_NETBSD.
+
+2002-06-08 Matt Thomas <matt@3am-software.com>
+
+ * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
+
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
+
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+ * armnetbsd.c: Replace CONST with const.
+ * corefile.c: Likewise.
+ * elf32-dlx.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * mmo.c: Likewise.
+ * ns32knetbsd.c: Likewise.
+
+ * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
+ table is elf64-sparc.
+
+2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
+ Fix RELA addends to get not shifted in the result. Don't do special
+ handling of R_MIPS_64 for NewABI.
+
+2002-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
+ (NAME(aout,slurp_reloc_table)): Likewise.
+ * coff-mips.c (mips_relax_section): Use bfd_zalloc.
+ * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
+ (xcoff_write_archive_contents_big): Likewise.
+ (xcoff_generate_rtinit): Likewise.
+ (xcoff_generate_rtinit): Likewise, and check error return.
+ * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
+ * coffgen.c (coff_section_symbol): Use bfd_zalloc.
+ (coff_get_normalized_symtab): Likewise.
+ (coff_make_empty_symbol): Likewise.
+ (bfd_coff_set_symbol_class): Likewise.
+ * cofflink.c (coff_link_add_symbols): Likewise.
+ * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
+ * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
+ (bfd_ecoff_write_accumulated_debug): Likewise.
+ * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
+ * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
+ * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
+ * ieee.c (do_with_relocs): Use bfd_zalloc.
+ * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
+ * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
+ (NAME(aout,slurp_reloc_table)): Likewise.
+ (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
+ * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
+ * som.c (som_build_and_write_symbol_table): Likewise.
+ (som_slurp_string_table): Likewise.
+ (som_slurp_symbol_table): Likewise.
+ (som_bfd_ar_write_symbol_stuff): Likewise.
+ * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
+ * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
+ * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
+ * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
+ * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
+
+2002-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
+ "group" union.
+ (elf_group_name): Update.
+ (elf_group_id): Define.
+ (bfd_elf_set_group_contents): Declare.
+ * elf.c (elf_fake_sections): Qualify use of elf_group_name.
+ (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
+ ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
+ that sym for the signature.
+ (_bfd_elf_compute_section_file_positions): Don't call
+ set_group_contents for "ld -r" case.
+ (swap_out_syms): Use bfd_zalloc.
+ * elflink.h (elf_link_add_archive_symbols): Likewise.
+ (NAME(bfd_elf,size_dynamic_sections)): Likewise.
+ (elf_bfd_final_link): Call bfd_elf_set_group_contents.
+
+2002-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
+ relocs in opd for non-shared too.
+
+2002-06-06 Jeffrey Law <law@redhat.com
+
+ * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
+ relocations.
+
+2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * merge.c: Include libiberty.h.
+ * elf-strtab.c: Include libiberty.h.
+
+2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * peXXigen.c (pe_print_idata): Remove unused variable.
+
+2002-06-06 David Heine <dlheine@tensilica.com>
+
+ * elf.c (assign_file_positions_for_segments): Remove unallocated
+ sections from the section to segment mapping for PT_LOAD segments.
+ Update comment about empty loadable segments.
+
+2002-06-06 Richard Sandiford <rsandifo@redhat.com>
+
+ * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
+ is within the .stabstr section.
+
+2002-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
+ are "const PTR", not "const PTR *".
+ (bfd_elf32_swap_symbol_in): Likewise.
+ (bfd_elf64_swap_symbol_in): Likewise.
+ * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
+ (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
+ * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
+ (elf_link_add_object_symbols): Likewise.
+ (elf_link_record_local_dynamic_symbol): Likewise.
+ (elf_link_input_bfd): Likewise.
+ (elf_gc_mark): Likewise.
+ (elf_reloc_symbol_deleted_p): Likewise.
+ * elf-m10200.c (mn10200_elf_relax_section): Likewise.
+ (mn10200_elf_relax_delete_bytes): Likewise.
+ (mn10200_elf_symbol_address_p): Likewise.
+ (mn10200_elf_get_relocated_section_contents): Likewise.
+ * elf-m10300.c (mn10300_elf_relax_section): Likewise.
+ (mn10300_elf_relax_section): Likewise.
+ (mn10300_elf_relax_delete_bytes): Likewise.
+ (mn10300_elf_symbol_address_p): Likewise.
+ (mn10300_elf_get_relocated_section_contents): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+ (elf32_h8_relax_delete_bytes): Likewise.
+ (elf32_h8_symbol_address_p): Likewise.
+ (elf32_h8_get_relocated_section_contents): Likewise.
+ * elf32-hppa.c (get_local_syms): Likewise.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+ * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
+ * elf32-sh.c (sh_elf_relax_section): Likewise.
+ (sh_elf_relax_delete_bytes): Likewise.
+ (sh_elf_get_relocated_section_contents): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf64-mmix.c (mmix_elf_relax_section): Likewise.
+ * elf64-ppc.c (get_local_syms): Likewise.
+ * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+
+2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
+
+2002-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (group_signature): Swap in the whole symbol, and handle
+ extracting section symbol names.
+ (setup_group): Add comment.
+ (set_group_contents): When called from objcopy or ld, arrange for
+ section contents to be written. Write group member output section
+ indices to allow objcopy to reorganize sections.
+ (_bfd_elf_copy_private_section_data): Copy group info.
+
+ * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
+ (bfd_elf32_swap_symbol_in): Update prototype.
+ (bfd_elf64_swap_symbol_in): Likewise.
+ * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
+ (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
+ * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
+ (elf_link_add_object_symbols): Likewise.
+ (elf_link_record_local_dynamic_symbol): Likewise.
+ (elf_link_input_bfd): Likewise.
+ (elf_gc_mark): Likewise.
+ (elf_reloc_symbol_deleted_p): Likewise.
+ * elf-m10200.c (mn10200_elf_relax_section): Likewise.
+ (mn10200_elf_relax_delete_bytes): Likewise.
+ (mn10200_elf_symbol_address_p): Likewise.
+ (mn10200_elf_get_relocated_section_contents): Likewise.
+ * elf-m10300.c (mn10300_elf_relax_section): Likewise.
+ (mn10300_elf_relax_section): Likewise.
+ (mn10300_elf_relax_delete_bytes): Likewise.
+ (mn10300_elf_symbol_address_p): Likewise.
+ (mn10300_elf_get_relocated_section_contents): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+ (elf32_h8_relax_delete_bytes): Likewise.
+ (elf32_h8_symbol_address_p): Likewise.
+ (elf32_h8_get_relocated_section_contents): Likewise.
+ * elf32-hppa.c (get_local_syms): Likewise.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+ * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
+ * elf32-sh.c (sh_elf_relax_section): Likewise.
+ (sh_elf_relax_delete_bytes): Likewise.
+ (sh_elf_get_relocated_section_contents): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf64-mmix.c (mmix_elf_relax_section): Likewise.
+ * elf64-ppc.c (get_local_syms): Likewise.
+ * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+ * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
+ * elf64-alpha.c (alpha_elf_size_info): Likewise.
+ * elf64-hppa.c (hppa64_elf_size_info): Likewise.
+ * elf64-mips.c (mips_elf64_size_info): Likewise.
+ * elf64-s390.c (s390_elf64_size_info): Likewise.
+ * elf64-sparc.c (sparc64_elf_size_info): Likewise.
+
+2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
+ elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
+ elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
+ _bfd_mips_elf_ignore_discarded_relocs.
+ elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
+
+2002-06-05 H.J. Lu <hjl@gnu.org>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Call
+ _bfd_elf_rel_local_sym for STT_SECTION relocations against
+ the SEC_MERGE section.
+
+2002-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-alpha.c: Update copyright date.
+ * coff-mips.c: Likewise.
+ * xcoff-target.h: Likewise.
+
+ * bfd-in.h: Remove "taken from the source" comment.
+ * libbfd-in.h: Likewise.
+ * libcoff-in.h: Likewise.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+ * elf.c (bfd_elf_discard_group): Return true.
+ * elf-bfd.h (bfd_elf_discard_group): Declare.
+ * bfd-in.h (bfd_elf_discard_group): Don't declare here.
+ * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
+ * bfd.c (bfd_discard_group): Define.
+ * targets.c (struct bfd_target): Add _bfd_discard_group.
+ (BFD_JUMP_TABLE_LINK): Here too.
+ * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
+ * aout-adobe.c (aout_32_bfd_discard_group): Define.
+ * aout-target.h (MY_bfd_discard_group): Define.
+ * aout-tic30.c (MY_bfd_discard_group): Define.
+ * binary.c (binary_bfd_discard_group): Define.
+ * bout.c (b_out_bfd_discard_group): Define.
+ * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
+ * coffcode.h (coff_bfd_discard_group): Define.
+ * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
+ * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
+ * i386msdos.c (msdos_bfd_discard_group): Define.
+ * i386os9k.c (os9k_bfd_discard_group): Define.
+ * ieee.c (ieee_bfd_discard_group): Define.
+ * ihex.c (ihex_bfd_discard_group): Define.
+ * mmo.c (mmo_bfd_discard_group): Define.
+ * nlm-target.h (nlm_bfd_discard_group): Define.
+ * oasys.c (oasys_bfd_discard_group): Define.
+ * ppcboot.c (ppcboot_bfd_discard_group): Define.
+ * som.c (som_bfd_discard_group): Define.
+ * srec.c (srec_bfd_discard_group): Define.
+ * tekhex.c (tekhex_bfd_discard_group): Define.
+ * versados.c (versados_bfd_discard_group): Define.
+ * vms.c (vms_bfd_discard_group): Define.
+ * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
+ * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
+ (aix5coff64_vec): Likewise.
+ * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
+
+2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
+ (elf32-sh64-com.lo): New dependency list.
+ * Makefile.in: Regenerate.
+ * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
+ (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
+ elf32-sh64-com.lo.
+ * configure: Regenerate.
+ * elf32-sh64.c (sh64_address_in_cranges)
+ (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
+ (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
+ (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
+ * elf32-sh64-com.c: ...here. New file.
+
+2002-06-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
+ ATTRIBUTE_UNUSED on used params.
+ * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
+ before calling bfd_section_from_elf_index on local syms.
+ * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
+
+2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
+ (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
+ (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
+ * Makefile.in: Regenerate.
+ * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
+ (sh64-*-netbsd*): New targets.
+ * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
+ bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
+ * configure: Regenerate.
+ * elf32-sh64-nbsd.c: New file.
+ * elf64-sh64-nbsd.c: New file.
+ * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
+ bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
+ bfd_elf64_sh64lnbsd_vec.
+
+2002-06-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
+ (bfd_section_from_shdr): Likewise. Set section name of group
+ sections from signature.
+ (group_signature): Split out from setup_group. Ensure symbol table
+ is available.
+ (bfd_elf_discard_group): New function.
+ (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
+ .gnu.linkonce* sections if they are members of a group.
+ (set_group_contents): Set GRP_COMDAT flag.
+ * section.c (bfd_discard_group): New function.
+ * bfd-in.h (bfd_elf_discard_group): Declare.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
+ (elf_linkonce_p): Define.
+
+2002-06-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (bfd_section_from_shdr): Make "name" const.
+ * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
+ * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
+ * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
+ * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
+ * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
+ * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
+ * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
+ * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
+
+2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
+ ABI.
+
+2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
+
+ * elf32-arc.c: Fix formatting.
+ * elf32-arm.h: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-dlx.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i386qnx.c: Likewise.
+ * elf32-or32.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+
+2002-06-02 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
+ null when there are no got entries for a symbol.
+ (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
+ uninitialized variable warning.
+
+2002-06-01 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
+ undefined symbols here.
+ (elf64_alpha_relax_section): Do it here. Also test for not
+ defined in the current module.
+ (elf64_alpha_relocate_section_r): Split out of ...
+ (elf64_alpha_relocate_section): ... here. Don't dereference
+ NULL when looking up local got entries.
+
+2002-06-01 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
+ symbols from JSR relaxation.
+ (elf64_alpha_size_plt_section_1): New.
+ (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
+ (elf64_alpha_size_rela_got_1): ... here.
+ (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
+ (elf64_alpha_size_rela_got_section): ... here.
+ (elf64_alpha_size_plt_section): New.
+ (elf64_alpha_relax_section): Call them.
+ (elf64_alpha_size_got_sections): Remove output_bfd arg.
+ (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
+
+2002-06-01 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
+ (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
+ in shared libraries. Fix DTPRELHI and TPRELHI value.
+ (INSN_ADDQ, INSN_RDUNIQ): New.
+ (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
+ (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
+ argument. Reject dynamic symbols. Use LITUSE symbolic constants.
+ (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
+ Handle GOTDTPREL and GOTTPREL relocations.
+ (elf64_alpha_relax_gprelhilo): New.
+ (elf64_alpha_relax_tls_get_addr): New.
+ (elf64_alpha_relax_find_tls_segment): New.
+ (elf64_alpha_relax_section): Handle TLS relocations.
+ (ALPHA_ELF_LINK_HASH_TLS_IE): New.
+ (elf64_alpha_check_relocs): Set it.
+
+2002-06-01 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
+ check; don't suppress dynamic relocs for non-allocated sections.
+
+ * elf64-alpha.c: Remove dead code.
+
+2002-05-31 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
+ space for bss .plt.
+
+2002-05-31 Graeme Peterson <gp@qnx.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * config.bfd: Add i[3456]86-*-nto-qnx* support.
+ * configure.in: Add bfd_elf32_i386qnx_vec support.
+ * configure: Regenerate.
+ * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
+ is_contained_by_filepos, and copy_private_bfd_data_p.
+ * elf.c (assign_file_positions_for_segments): Call backend
+ set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
+ (IS_CONTAINED_BY_FILEPOS): Define.
+ (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
+ (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
+ Fix non-K&R call to _bfd_error_handler.
+ (_bfd_elf_copy_private_section_data): Use backend
+ copy_private_bfd_data_p.
+ * elf32-i386.c: Don't include elfxx-target.h when
+ ELF32_I386_C_INCLUDED is defined.
+ * elf32-i386qnx.c: New QNX elf backend file.
+ * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
+ elf_backend_is_contained_by_filepos, and
+ elf_backend_do_copy_private_bfd_data.
+ * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
+
+2002-05-31 Alan Modra <amodra@bigpond.net.au>
+
+ * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
+ Move other similar defines to start of file.
+
+2002-05-30 Tom Rix <trix@redhat.com>
+
+ * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
+ * coff64-rs6000.c (xcoff64_rtype2howto): Same.
+
+2002-05-30 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
+ ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
+ (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
+ (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
+ (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
+ (struct alpha_elf_obj_tdata): Rename total_got_entries and
+ n_local_got_entries to total_got_size and local_got_size.
+ (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
+ (alpha_got_entry_size): New.
+ (elf64_alpha_relax_with_lituse): Use it.
+ (elf64_alpha_relax_without_lituse): Likewise.
+ (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
+ (get_got_entry): New.
+ (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
+ (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
+ (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
+ (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
+ (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
+ (elf64_alpha_calc_got_offsets): Likewise.
+ (alpha_dynamic_entries_for_reloc): New.
+ (elf64_alpha_calc_dynrel_sizes): Use it.
+ (elf64_alpha_size_dynamic_sections): Likewise.
+ (elf64_alpha_relocate_section): Handle TLS relocations.
+ * reloc.c: Add Alpha TLS relocations.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
+
+ * peXXigen.c (pe_print_idata): Remove double printed
+ import table lines; add Bound-To comment.
+
+2002-05-29 Matt Thomas <matt@3am-software.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
+ (elf32-vax.lo): New rule.
+ * Makefile.in: Regenerate.
+ * configure.in (bfd_elf32_vax_vec)
+ (vaxnetbsd_vec): New vectors.
+ * configure: Regenerate.
+ * config.bfd (vax-*-netbsdelf*)
+ (vax-*-netbsdaout*)
+ (vax-*-netbsd*): New targets.
+ * elf32-vax.c: New file.
+ * reloc.c: Add VAX relocations.
+ * bfd-in2.h: Regenerate.
+ * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
+
+2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
+ and bfd_elf32_bigarm_vec to targ_selvecs.
+
+2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
+
+ * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
+ with auto-imported symbols.
+
+2002-05-29 Adam Nemet <anemet@lnxw.com>
+
+ * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
+ sections only record bfd.
+ (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
+ * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
+ * bfd-in2.h: Regenerate.
+
+2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Move
+ declaration and initialisation of saw_line and saw_func out of
+ for loop.
+
+2002-05-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
+ (bfd_elf64_get_symbol_info): Define.
+ * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
+
+2002-05-29 Andrey Volkov <avolkov@transas.com>
+
+ * cpu-h8300.c: Make default h8300 machine first in machine list.
+
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
* config.bfd: Added DLX configuraton.
2002-05-10 Alan Modra <amodra@bigpond.net.au>
* elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
- addend in 2002-05-09 commit.
+ added in 2002-05-09 commit.
* elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
don't look for stubs on all undefined syms.
cpu-d30v.lo \
cpu-dlx.lo \
cpu-fr30.lo \
+ cpu-frv.lo \
cpu-h8300.lo \
cpu-h8500.lo \
cpu-hppa.lo \
cpu-d30v.c \
cpu-dlx.c \
cpu-fr30.c \
+ cpu-frv.c \
cpu-h8300.c \
cpu-h8500.c \
cpu-hppa.c \
elf32-d30v.lo \
elf32-dlx.lo \
elf32-fr30.lo \
+ elf32-frv.lo \
elf32-gen.lo \
elf32-h8300.lo \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
+ elf32-i386qnx.lo \
elf32-i860.lo \
elf32-i960.lo \
elf32-ia64.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sh64.lo \
+ elf32-sh64-com.lo \
elf32-sh-nbsd.lo \
+ elf32-sh64-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
+ elf32-vax.lo \
elf32-xstormy16.lo \
elf32.lo \
elflink.lo \
sparcnetbsd.lo \
sunos.lo \
vaxnetbsd.lo \
+ vax1knetbsd.lo \
versados.lo \
vms.lo \
vms-gsd.lo \
elf32-d30v.c \
elf32-dlx.c \
elf32-fr30.c \
+ elf32-frv.c \
elf32-gen.c \
elf32-h8300.c \
elf32-hppa.c \
elf32-i370.c \
elf32-i386.c \
+ elf32-i386qnx.c \
elf32-i860.c \
elf32-i960.c \
elf32-m32r.c \
elf32-pj.c \
elf32-ppc.c \
elf32-sh64.c \
+ elf32-sh64-com.c \
elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
elf32-sh-nbsd.c \
+ elf32-sh64-nbsd.c \
elf32-sparc.c \
elf32-v850.c \
+ elf32-vax.c \
elf32-xstormy16.c \
elf32.c \
elflink.c \
sparcnetbsd.c \
sunos.c \
vaxnetbsd.c \
+ vax1knetbsd.c \
versados.c \
vms.c \
vms-gsd.c \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
+ elf64-sh64-nbsd.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
elf64-ppc.c \
elf64-s390.c \
elf64-sh64.c \
+ elf64-sh64-nbsd.c \
elf64-sparc.c \
elf64.c \
mmo.c \
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
-
# What appears below is generated by a hacked mkdep using gcc -MM.
# DO NOT DELETE THIS LINE -- mkdep uses it.
$(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-d30v.c $(INCDIR)/filenames.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-frv.lo: elf32-frv.c elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/libiberty.h elf32-target.h
+elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/external.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
+elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
+ $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
# for the debugger, so if you are downloading things as S-records you
# need two copies of the executable, one to download and one for the
# debugger).
-BFD32_LIBS = \
- archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
- format.lo init.lo libbfd.lo opncls.lo reloc.lo \
- section.lo syms.lo targets.lo hash.lo linker.lo \
- srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- merge.lo dwarf2.lo
+BFD32_LIBS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo
BFD64_LIBS = archive64.lo
-BFD32_LIBS_CFILES = \
- archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
- format.c init.c libbfd.c opncls.c reloc.c \
- section.c syms.c targets.c hash.c linker.c \
- srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- merge.c dwarf2.c
+BFD32_LIBS_CFILES = archive.c archures.c bfd.c cache.c coffgen.c corefile.c format.c init.c libbfd.c opncls.c reloc.c section.c syms.c targets.c hash.c linker.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c merge.c dwarf2.c
BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
-ALL_MACHINES = \
- cpu-a29k.lo \
- cpu-alpha.lo \
- cpu-arc.lo \
- cpu-arm.lo \
- cpu-avr.lo \
- cpu-cris.lo \
- cpu-d10v.lo \
- cpu-d30v.lo \
- cpu-dlx.lo \
- cpu-fr30.lo \
- cpu-h8300.lo \
- cpu-h8500.lo \
- cpu-hppa.lo \
- cpu-ia64.lo \
- cpu-i370.lo \
- cpu-i386.lo \
- cpu-i860.lo \
- cpu-i960.lo \
- cpu-m32r.lo \
- cpu-m68hc11.lo \
- cpu-m68hc12.lo \
- cpu-m68k.lo \
- cpu-m88k.lo \
- cpu-m10200.lo \
- cpu-m10300.lo \
- cpu-mcore.lo \
- cpu-mips.lo \
- cpu-mmix.lo \
- cpu-or32.lo \
- cpu-ns32k.lo \
- cpu-openrisc.lo \
- cpu-pdp11.lo \
- cpu-pj.lo \
- cpu-powerpc.lo \
- cpu-rs6000.lo \
- cpu-s390.lo \
- cpu-sh.lo \
- cpu-sparc.lo \
- cpu-tic30.lo \
- cpu-tic54x.lo \
- cpu-tic80.lo \
- cpu-v850.lo \
- cpu-vax.lo \
- cpu-we32k.lo \
- cpu-w65.lo \
- cpu-xstormy16.lo \
- cpu-z8k.lo
-
-
-ALL_MACHINES_CFILES = \
- cpu-a29k.c \
- cpu-alpha.c \
- cpu-arc.c \
- cpu-arm.c \
- cpu-avr.c \
- cpu-cris.c \
- cpu-d10v.c \
- cpu-d30v.c \
- cpu-dlx.c \
- cpu-fr30.c \
- cpu-h8300.c \
- cpu-h8500.c \
- cpu-hppa.c \
- cpu-ia64.c \
- cpu-i370.c \
- cpu-i386.c \
- cpu-i860.c \
- cpu-i960.c \
- cpu-m32r.c \
- cpu-m68hc11.c \
- cpu-m68hc12.c \
- cpu-m68k.c \
- cpu-m88k.c \
- cpu-m10200.c \
- cpu-m10300.c \
- cpu-mcore.c \
- cpu-mips.c \
- cpu-mmix.c \
- cpu-or32.c \
- cpu-ns32k.c \
- cpu-openrisc.c \
- cpu-pdp11.c \
- cpu-pj.c \
- cpu-powerpc.c \
- cpu-rs6000.c \
- cpu-s390.c \
- cpu-sh.c \
- cpu-sparc.c \
- cpu-tic30.c \
- cpu-tic54x.c \
- cpu-tic80.c \
- cpu-v850.c \
- cpu-vax.c \
- cpu-we32k.c \
- cpu-w65.c \
- cpu-xstormy16.c \
- cpu-z8k.c
+ALL_MACHINES = cpu-a29k.lo cpu-alpha.lo cpu-arc.lo cpu-arm.lo cpu-avr.lo cpu-cris.lo cpu-d10v.lo cpu-d30v.lo cpu-dlx.lo cpu-fr30.lo cpu-frv.lo cpu-h8300.lo cpu-h8500.lo cpu-hppa.lo cpu-ia64.lo cpu-i370.lo cpu-i386.lo cpu-i860.lo cpu-i960.lo cpu-m32r.lo cpu-m68hc11.lo cpu-m68hc12.lo cpu-m68k.lo cpu-m88k.lo cpu-m10200.lo cpu-m10300.lo cpu-mcore.lo cpu-mips.lo cpu-mmix.lo cpu-or32.lo cpu-ns32k.lo cpu-openrisc.lo cpu-pdp11.lo cpu-pj.lo cpu-powerpc.lo cpu-rs6000.lo cpu-s390.lo cpu-sh.lo cpu-sparc.lo cpu-tic30.lo cpu-tic54x.lo cpu-tic80.lo cpu-v850.lo cpu-vax.lo cpu-we32k.lo cpu-w65.lo cpu-xstormy16.lo cpu-z8k.lo
+
+
+ALL_MACHINES_CFILES = cpu-a29k.c cpu-alpha.c cpu-arc.c cpu-arm.c cpu-avr.c cpu-cris.c cpu-d10v.c cpu-d30v.c cpu-dlx.c cpu-fr30.c cpu-frv.c cpu-h8300.c cpu-h8500.c cpu-hppa.c cpu-ia64.c cpu-i370.c cpu-i386.c cpu-i860.c cpu-i960.c cpu-m32r.c cpu-m68hc11.c cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-m10200.c cpu-m10300.c cpu-mcore.c cpu-mips.c cpu-mmix.c cpu-or32.c cpu-ns32k.c cpu-openrisc.c cpu-pdp11.c cpu-pj.c cpu-powerpc.c cpu-rs6000.c cpu-s390.c cpu-sh.c cpu-sparc.c cpu-tic30.c cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c cpu-we32k.c cpu-w65.c cpu-xstormy16.c cpu-z8k.c
# The .o files needed by all of the 32 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all.
-BFD32_BACKENDS = \
- aout-adobe.lo \
- aout-arm.lo \
- aout-cris.lo \
- aout-ns32k.lo \
- aout-sparcle.lo \
- aout-tic30.lo \
- aout0.lo \
- aout32.lo \
- armnetbsd.lo \
- bout.lo \
- cf-i386lynx.lo \
- cf-m68klynx.lo \
- cf-sparclynx.lo \
- coff-a29k.lo \
- coff-apollo.lo \
- coff-arm.lo \
- coff-aux.lo \
- coff-h8300.lo \
- coff-h8500.lo \
- coff-i386.lo \
- coff-go32.lo \
- coff-i860.lo \
- coff-i960.lo \
- coff-m68k.lo \
- coff-m88k.lo \
- coff-mips.lo \
- coff-or32.lo \
- coff-rs6000.lo \
- coff-sh.lo \
- coff-sparc.lo \
- coff-stgo32.lo \
- coff-svm68k.lo \
- coff-tic30.lo \
- coff-tic54x.lo \
- coff-tic80.lo \
- coff-u68k.lo \
- coff-we32k.lo \
- coff-w65.lo \
- coff-z8k.lo \
- cofflink.lo \
- dwarf1.lo \
- ecoff.lo \
- ecofflink.lo \
- efi-app-ia32.lo \
- elf.lo \
- elf32-arc.lo \
- elfarm-oabi.lo \
- elfarm-nabi.lo \
- elf32-avr.lo \
- elf32-cris.lo \
- elf32-d10v.lo \
- elf32-d30v.lo \
- elf32-dlx.lo \
- elf32-fr30.lo \
- elf32-gen.lo \
- elf32-h8300.lo \
- elf32-hppa.lo \
- elf32-i370.lo \
- elf32-i386.lo \
- elf32-i860.lo \
- elf32-i960.lo \
- elf32-ia64.lo \
- elf32-m32r.lo \
- elf32-m68hc11.lo \
- elf32-m68hc12.lo \
- elf32-m68k.lo \
- elf32-m88k.lo \
- elf-m10200.lo \
- elf-m10300.lo \
- elf32-mcore.lo \
- elfxx-mips.lo \
- elf32-mips.lo \
- elf32-openrisc.lo \
- elf32-or32.lo \
- elf32-pj.lo \
- elf32-ppc.lo \
- elf32-s390.lo \
- elf32-sh.lo \
- elf32-sh-lin.lo \
- elf32-sh64.lo \
- elf32-sh-nbsd.lo \
- elf32-sparc.lo \
- elf32-v850.lo \
- elf32-xstormy16.lo \
- elf32.lo \
- elflink.lo \
- elf-strtab.lo \
- elf-eh-frame.lo \
- epoc-pe-arm.lo \
- epoc-pei-arm.lo \
- hp300bsd.lo \
- hp300hpux.lo \
- som.lo \
- i386aout.lo \
- i386bsd.lo \
- i386dynix.lo \
- i386freebsd.lo \
- i386linux.lo \
- i386lynx.lo \
- i386msdos.lo \
- i386netbsd.lo \
- i386mach3.lo \
- i386os9k.lo \
- ieee.lo \
- m68k4knetbsd.lo \
- m68klinux.lo \
- m68klynx.lo \
- m68knetbsd.lo \
- m88kmach3.lo \
- mipsbsd.lo \
- newsos3.lo \
- nlm.lo \
- nlm32-i386.lo \
- nlm32-sparc.lo \
- nlm32-ppc.lo \
- nlm32.lo \
- ns32knetbsd.lo \
- oasys.lo \
- pc532-mach.lo \
- pdp11.lo \
- pe-arm.lo \
- pei-arm.lo \
- pe-i386.lo \
- pei-i386.lo \
- pe-mcore.lo \
- pei-mcore.lo \
- pe-ppc.lo \
- pei-ppc.lo \
- pe-sh.lo \
- pei-sh.lo \
- pe-mips.lo \
- pei-mips.lo \
- peigen.lo \
- ppcboot.lo \
- reloc16.lo \
- riscix.lo \
- sparclinux.lo \
- sparclynx.lo \
- sparcnetbsd.lo \
- sunos.lo \
- vaxnetbsd.lo \
- versados.lo \
- vms.lo \
- vms-gsd.lo \
- vms-hdr.lo \
- vms-misc.lo \
- vms-tir.lo \
- xcofflink.lo
-
-
-BFD32_BACKENDS_CFILES = \
- aout-adobe.c \
- aout-arm.c \
- aout-cris.c \
- aout-ns32k.c \
- aout-sparcle.c \
- aout-tic30.c \
- aout0.c \
- aout32.c \
- armnetbsd.c \
- bout.c \
- cf-i386lynx.c \
- cf-m68klynx.c \
- cf-sparclynx.c \
- coff-a29k.c \
- coff-apollo.c \
- coff-arm.c \
- coff-aux.c \
- coff-h8300.c \
- coff-h8500.c \
- coff-i386.c \
- coff-i860.c \
- coff-go32.c \
- coff-i960.c \
- coff-m68k.c \
- coff-m88k.c \
- coff-mips.c \
- coff-or32.c \
- coff-rs6000.c \
- coff-sh.c \
- coff-sparc.c \
- coff-stgo32.c \
- coff-svm68k.c \
- coff-tic30.c \
- coff-tic54x.c \
- coff-tic80.c \
- coff-u68k.c \
- coff-we32k.c \
- coff-w65.c \
- coff-z8k.c \
- cofflink.c \
- dwarf1.c \
- ecoff.c \
- ecofflink.c \
- efi-app-ia32.c \
- elf.c \
- elf32-arc.c \
- elfarm-oabi.c \
- elfarm-nabi.c \
- elf32-avr.c \
- elf32-cris.c \
- elf32-d10v.c \
- elf32-d30v.c \
- elf32-dlx.c \
- elf32-fr30.c \
- elf32-gen.c \
- elf32-h8300.c \
- elf32-hppa.c \
- elf32-i370.c \
- elf32-i386.c \
- elf32-i860.c \
- elf32-i960.c \
- elf32-m32r.c \
- elf32-m68k.c \
- elf32-m68hc11.c \
- elf32-m68hc12.c \
- elf32-m88k.c \
- elf-m10200.c \
- elf-m10300.c \
- elf32-mcore.c \
- elfxx-mips.c \
- elf32-mips.c \
- elf32-openrisc.c \
- elf32-or32.c \
- elf32-pj.c \
- elf32-ppc.c \
- elf32-sh64.c \
- elf32-s390.c \
- elf32-sh.c \
- elf32-sh-lin.c \
- elf32-sh-nbsd.c \
- elf32-sparc.c \
- elf32-v850.c \
- elf32-xstormy16.c \
- elf32.c \
- elflink.c \
- elf-strtab.c \
- elf-eh-frame.c \
- epoc-pe-arm.c \
- epoc-pei-arm.c \
- hp300bsd.c \
- hp300hpux.c \
- som.c \
- i386aout.c \
- i386bsd.c \
- i386dynix.c \
- i386freebsd.c \
- i386linux.c \
- i386lynx.c \
- i386msdos.c \
- i386netbsd.c \
- i386mach3.c \
- i386os9k.c \
- ieee.c \
- m68k4knetbsd.c \
- m68klinux.c \
- m68klynx.c \
- m68knetbsd.c \
- m88kmach3.c \
- mipsbsd.c \
- newsos3.c \
- nlm.c \
- nlm32-i386.c \
- nlm32-sparc.c \
- nlm32-ppc.c \
- nlm32.c \
- ns32knetbsd.c \
- oasys.c \
- pc532-mach.c \
- pdp11.c \
- pe-arm.c \
- pei-arm.c \
- pe-i386.c \
- pei-i386.c \
- pe-mcore.c \
- pei-mcore.c \
- pe-ppc.c \
- pei-ppc.c \
- pe-sh.c \
- pei-sh.c \
- pe-mips.c \
- pei-mips.c \
- ppcboot.c \
- reloc16.c \
- riscix.c \
- sparclinux.c \
- sparclynx.c \
- sparcnetbsd.c \
- sunos.c \
- vaxnetbsd.c \
- versados.c \
- vms.c \
- vms-gsd.c \
- vms-hdr.c \
- vms-misc.c \
- vms-tir.c \
- xcofflink.c
+BFD32_BACKENDS = aout-adobe.lo aout-arm.lo aout-cris.lo aout-ns32k.lo aout-sparcle.lo aout-tic30.lo aout0.lo aout32.lo armnetbsd.lo bout.lo cf-i386lynx.lo cf-m68klynx.lo cf-sparclynx.lo coff-a29k.lo coff-apollo.lo coff-arm.lo coff-aux.lo coff-h8300.lo coff-h8500.lo coff-i386.lo coff-go32.lo coff-i860.lo coff-i960.lo coff-m68k.lo coff-m88k.lo coff-mips.lo coff-or32.lo coff-rs6000.lo coff-sh.lo coff-sparc.lo coff-stgo32.lo coff-svm68k.lo coff-tic30.lo coff-tic54x.lo coff-tic80.lo coff-u68k.lo coff-we32k.lo coff-w65.lo coff-z8k.lo cofflink.lo dwarf1.lo ecoff.lo ecofflink.lo efi-app-ia32.lo elf.lo elf32-arc.lo elfarm-oabi.lo elfarm-nabi.lo elf32-avr.lo elf32-cris.lo elf32-d10v.lo elf32-d30v.lo elf32-dlx.lo elf32-fr30.lo elf32-frv.lo elf32-gen.lo elf32-h8300.lo elf32-hppa.lo elf32-i370.lo elf32-i386.lo elf32-i386qnx.lo elf32-i860.lo elf32-i960.lo elf32-ia64.lo elf32-m32r.lo elf32-m68hc11.lo elf32-m68hc12.lo elf32-m68k.lo elf32-m88k.lo elf-m10200.lo elf-m10300.lo elf32-mcore.lo elfxx-mips.lo elf32-mips.lo elf32-openrisc.lo elf32-or32.lo elf32-pj.lo elf32-ppc.lo elf32-s390.lo elf32-sh.lo elf32-sh-lin.lo elf32-sh64.lo elf32-sh64-com.lo elf32-sh-nbsd.lo elf32-sh64-nbsd.lo elf32-sparc.lo elf32-v850.lo elf32-vax.lo elf32-xstormy16.lo elf32.lo elflink.lo elf-strtab.lo elf-eh-frame.lo epoc-pe-arm.lo epoc-pei-arm.lo hp300bsd.lo hp300hpux.lo som.lo i386aout.lo i386bsd.lo i386dynix.lo i386freebsd.lo i386linux.lo i386lynx.lo i386msdos.lo i386netbsd.lo i386mach3.lo i386os9k.lo ieee.lo m68k4knetbsd.lo m68klinux.lo m68klynx.lo m68knetbsd.lo m88kmach3.lo mipsbsd.lo newsos3.lo nlm.lo nlm32-i386.lo nlm32-sparc.lo nlm32-ppc.lo nlm32.lo ns32knetbsd.lo oasys.lo pc532-mach.lo pdp11.lo pe-arm.lo pei-arm.lo pe-i386.lo pei-i386.lo pe-mcore.lo pei-mcore.lo pe-ppc.lo pei-ppc.lo pe-sh.lo pei-sh.lo pe-mips.lo pei-mips.lo peigen.lo ppcboot.lo reloc16.lo riscix.lo sparclinux.lo sparclynx.lo sparcnetbsd.lo sunos.lo vaxnetbsd.lo vax1knetbsd.lo versados.lo vms.lo vms-gsd.lo vms-hdr.lo vms-misc.lo vms-tir.lo xcofflink.lo
+
+
+BFD32_BACKENDS_CFILES = aout-adobe.c aout-arm.c aout-cris.c aout-ns32k.c aout-sparcle.c aout-tic30.c aout0.c aout32.c armnetbsd.c bout.c cf-i386lynx.c cf-m68klynx.c cf-sparclynx.c coff-a29k.c coff-apollo.c coff-arm.c coff-aux.c coff-h8300.c coff-h8500.c coff-i386.c coff-i860.c coff-go32.c coff-i960.c coff-m68k.c coff-m88k.c coff-mips.c coff-or32.c coff-rs6000.c coff-sh.c coff-sparc.c coff-stgo32.c coff-svm68k.c coff-tic30.c coff-tic54x.c coff-tic80.c coff-u68k.c coff-we32k.c coff-w65.c coff-z8k.c cofflink.c dwarf1.c ecoff.c ecofflink.c efi-app-ia32.c elf.c elf32-arc.c elfarm-oabi.c elfarm-nabi.c elf32-avr.c elf32-cris.c elf32-d10v.c elf32-d30v.c elf32-dlx.c elf32-fr30.c elf32-frv.c elf32-gen.c elf32-h8300.c elf32-hppa.c elf32-i370.c elf32-i386.c elf32-i386qnx.c elf32-i860.c elf32-i960.c elf32-m32r.c elf32-m68k.c elf32-m68hc11.c elf32-m68hc12.c elf32-m88k.c elf-m10200.c elf-m10300.c elf32-mcore.c elfxx-mips.c elf32-mips.c elf32-openrisc.c elf32-or32.c elf32-pj.c elf32-ppc.c elf32-sh64.c elf32-sh64-com.c elf32-s390.c elf32-sh.c elf32-sh-lin.c elf32-sh-nbsd.c elf32-sh64-nbsd.c elf32-sparc.c elf32-v850.c elf32-vax.c elf32-xstormy16.c elf32.c elflink.c elf-strtab.c elf-eh-frame.c epoc-pe-arm.c epoc-pei-arm.c hp300bsd.c hp300hpux.c som.c i386aout.c i386bsd.c i386dynix.c i386freebsd.c i386linux.c i386lynx.c i386msdos.c i386netbsd.c i386mach3.c i386os9k.c ieee.c m68k4knetbsd.c m68klinux.c m68klynx.c m68knetbsd.c m88kmach3.c mipsbsd.c newsos3.c nlm.c nlm32-i386.c nlm32-sparc.c nlm32-ppc.c nlm32.c ns32knetbsd.c oasys.c pc532-mach.c pdp11.c pe-arm.c pei-arm.c pe-i386.c pei-i386.c pe-mcore.c pei-mcore.c pe-ppc.c pei-ppc.c pe-sh.c pei-sh.c pe-mips.c pei-mips.c ppcboot.c reloc16.c riscix.c sparclinux.c sparclynx.c sparcnetbsd.c sunos.c vaxnetbsd.c vax1knetbsd.c versados.c vms.c vms-gsd.c vms-hdr.c vms-misc.c vms-tir.c xcofflink.c
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
# and --enable-64-bit-bfd.
-BFD64_BACKENDS = \
- aix5ppc-core.lo \
- aout64.lo \
- coff-alpha.lo \
- coff64-rs6000.lo \
- demo64.lo \
- efi-app-ia64.lo \
- elf64-x86-64.lo \
- elf64-alpha.lo \
- elf64-hppa.lo \
- elf64-ia64.lo \
- elf64-gen.lo \
- elf64-mips.lo \
- elf64-mmix.lo \
- elf64-sh64.lo \
- elf64-ppc.lo \
- elf64-s390.lo \
- elf64-sparc.lo \
- elf64.lo \
- mmo.lo \
- nlm32-alpha.lo \
- nlm64.lo \
- pepigen.lo
-
-
-BFD64_BACKENDS_CFILES = \
- aix5ppc-core.c \
- aout64.c \
- coff-alpha.c \
- coff64-rs6000.c \
- demo64.c \
- efi-app-ia64.c \
- elf64-x86-64.c \
- elf64-alpha.c \
- elf64-hppa.c \
- elf64-gen.c \
- elf64-mips.c \
- elf64-mmix.c \
- elf64-ppc.c \
- elf64-s390.c \
- elf64-sh64.c \
- elf64-sparc.c \
- elf64.c \
- mmo.c \
- nlm32-alpha.c \
- nlm64.c
-
-
-OPTIONAL_BACKENDS = \
- aix386-core.lo \
- hpux-core.lo \
- irix-core.lo \
- lynx-core.lo \
- osf-core.lo \
- sco5-core.lo \
- trad-core.lo \
- cisco-core.lo
-
-
-OPTIONAL_BACKENDS_CFILES = \
- aix386-core.c \
- hpux-core.c \
- irix-core.c \
- lynx-core.c \
- osf-core.c \
- sco5-core.c \
- trad-core.c \
- cisco-core.c
+BFD64_BACKENDS = aix5ppc-core.lo aout64.lo coff-alpha.lo coff64-rs6000.lo demo64.lo efi-app-ia64.lo elf64-x86-64.lo elf64-alpha.lo elf64-hppa.lo elf64-ia64.lo elf64-gen.lo elf64-mips.lo elf64-mmix.lo elf64-sh64.lo elf64-sh64-nbsd.lo elf64-ppc.lo elf64-s390.lo elf64-sparc.lo elf64.lo mmo.lo nlm32-alpha.lo nlm64.lo pepigen.lo
+
+
+BFD64_BACKENDS_CFILES = aix5ppc-core.c aout64.c coff-alpha.c coff64-rs6000.c demo64.c efi-app-ia64.c elf64-x86-64.c elf64-alpha.c elf64-hppa.c elf64-gen.c elf64-mips.c elf64-mmix.c elf64-ppc.c elf64-s390.c elf64-sh64.c elf64-sh64-nbsd.c elf64-sparc.c elf64.c mmo.c nlm32-alpha.c nlm64.c
+
+
+OPTIONAL_BACKENDS = aix386-core.lo hpux-core.lo irix-core.lo lynx-core.lo osf-core.lo sco5-core.lo trad-core.lo cisco-core.lo
+
+
+OPTIONAL_BACKENDS_CFILES = aix386-core.c hpux-core.c irix-core.c lynx-core.c osf-core.c sco5-core.c trad-core.c cisco-core.c
# These are defined by configure.in:
INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
# C source files that correspond to .o's.
-SOURCE_CFILES = \
- $(BFD32_LIBS_CFILES) \
- $(BFD64_LIBS_CFILES) \
- $(ALL_MACHINES_CFILES) \
- $(BFD32_BACKENDS_CFILES) \
- $(BFD64_BACKENDS_CFILES) \
- $(OPTIONAL_BACKENDS_CFILES)
+SOURCE_CFILES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES)
-BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+BUILD_CFILES = elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
-SOURCE_HFILES = \
- aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
- elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
- libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
- libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
- nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
- xcoff-target.h version.h
+SOURCE_HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h xcoff-target.h version.h
-BUILD_HFILES = \
- elf32-target.h elf64-target.h targmatch.h
+BUILD_HFILES = elf32-target.h elf64-target.h targmatch.h
HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
BFD64_H_FILES = archive64.c
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
MOSTLYCLEANFILES = ofiles stamp-ofiles
-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
- stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
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)
$(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-d30v.c $(INCDIR)/filenames.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
+ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/libiberty.h elf32-target.h
+elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/external.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+ libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
+elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
+ $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
#define aout_32_bfd_relax_section bfd_generic_relax_section
#define aout_32_bfd_gc_sections bfd_generic_gc_sections
#define aout_32_bfd_merge_sections bfd_generic_merge_sections
+#define aout_32_bfd_discard_group bfd_generic_discard_group
#define aout_32_bfd_link_hash_table_create \
_bfd_generic_link_hash_table_create
#define aout_32_bfd_link_hash_table_free \
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
#endif
#ifndef MY_bfd_merge_sections
#define MY_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
#endif
cached_size = obj_aout_external_sym_count (abfd);
cached_size *= sizeof (aout_symbol_type);
- cached = (aout_symbol_type *) bfd_malloc (cached_size);
+ cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
if (cached == NULL && cached_size != 0)
return false;
- if (cached_size != 0)
- memset (cached, 0, (size_t) cached_size);
/* Convert from external symbol information to internal. */
if (! (NAME(aout,translate_symbol_table)
count = reloc_size / each_size;
amt = count * sizeof (arelent);
- reloc_cache = (arelent *) bfd_malloc (amt);
+ reloc_cache = (arelent *) bfd_zmalloc (amt);
if (reloc_cache == NULL && count != 0)
return false;
- memset (reloc_cache, 0, (size_t) amt);
relocs = bfd_malloc (reloc_size);
if (relocs == NULL && reloc_size != 0)
.#define bfd_mach_am33 330
. bfd_arch_fr30,
.#define bfd_mach_fr30 0x46523330
+. bfd_arch_frv,
+.#define bfd_mach_frv 0
+.#define bfd_mach_frvsimple 1
+.#define bfd_mach_fr300 300
+.#define bfd_mach_fr400 400
+.#define bfd_mach_frvtomcat 499 {* fr500 prototype *}
+.#define bfd_mach_fr500 500
. bfd_arch_mcore,
. bfd_arch_ia64, {* HP/Intel ia64 *}
.#define bfd_mach_ia64_elf64 0
extern const bfd_arch_info_type bfd_d30v_arch;
extern const bfd_arch_info_type bfd_dlx_arch;
extern const bfd_arch_info_type bfd_fr30_arch;
+extern const bfd_arch_info_type bfd_frv_arch;
extern const bfd_arch_info_type bfd_h8300_arch;
extern const bfd_arch_info_type bfd_h8500_arch;
extern const bfd_arch_info_type bfd_hppa_arch;
&bfd_d30v_arch,
&bfd_dlx_arch,
&bfd_fr30_arch,
+ &bfd_frv_arch,
&bfd_h8300_arch,
&bfd_h8500_arch,
&bfd_hppa_arch,
/* BFD back-end for NetBSD/ARM a.out-ish binaries.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#include "bfd.h" /* To ensure following declaration is OK */
-CONST struct reloc_howto_struct *
+const struct reloc_howto_struct *
MY_bfd_reloc_type_lookup
PARAMS ((bfd * abfd AND
bfd_reloc_code_real_type code));
Free Software Foundation, Inc.
Contributed by 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. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
+ PARAMS ((bfd *, struct bfd_link_info *));
+
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
-/* And more from the source. */
Free Software Foundation, Inc.
Contributed by 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. */
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
extern boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
+ PARAMS ((bfd *, struct bfd_link_info *));
+
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
PARAMS ((struct sec *, int));
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
-/* And more from the source. */
+/* Extracted from init.c. */
void
bfd_init PARAMS ((void));
+/* Extracted from opncls.c. */
bfd *
bfd_openr PARAMS ((const char *filename, const char *target));
boolean
bfd_make_readable PARAMS ((bfd *abfd));
+/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
#define H_GET_S8 bfd_h_get_signed_8
+/* Extracted from section.c. */
/* This structure is used for a comdat section, as in PE. A comdat
section is associated with a particular symbol. When the linker
sees a comdat section, it keeps only one of the sections with a
void
_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
+boolean
+bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
+
+/* Extracted from archures.c. */
enum bfd_architecture
{
bfd_arch_unknown, /* File arch not known. */
#define bfd_mach_am33 330
bfd_arch_fr30,
#define bfd_mach_fr30 0x46523330
+ bfd_arch_frv,
+#define bfd_mach_frv 0
+#define bfd_mach_frvsimple 1
+#define bfd_mach_fr300 300
+#define bfd_mach_fr400 400
+#define bfd_mach_frvtomcat 499 /* fr500 prototype */
+#define bfd_mach_fr500 500
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 0
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
+/* Extracted from reloc.c. */
typedef enum bfd_reloc_status
{
/* No errors detected. */
STO_ALPHA_STD_GPLOAD. */
BFD_RELOC_ALPHA_BRSGP,
+/* Alpha thread-local storage relocations. */
+ BFD_RELOC_ALPHA_TLSGD,
+ BFD_RELOC_ALPHA_TLSLDM,
+ BFD_RELOC_ALPHA_DTPMOD64,
+ BFD_RELOC_ALPHA_GOTDTPREL16,
+ BFD_RELOC_ALPHA_DTPREL64,
+ BFD_RELOC_ALPHA_DTPREL_HI16,
+ BFD_RELOC_ALPHA_DTPREL_LO16,
+ BFD_RELOC_ALPHA_DTPREL16,
+ BFD_RELOC_ALPHA_GOTTPREL16,
+ BFD_RELOC_ALPHA_TPREL64,
+ BFD_RELOC_ALPHA_TPREL_HI16,
+ BFD_RELOC_ALPHA_TPREL_LO16,
+ BFD_RELOC_ALPHA_TPREL16,
+
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
into 22 bits. */
BFD_RELOC_AVR_CALL,
+/* Fujitsu Frv Relocations. */
+ BFD_RELOC_FRV_LABEL16,
+ BFD_RELOC_FRV_LABEL24,
+ BFD_RELOC_FRV_LO16,
+ BFD_RELOC_FRV_HI16,
+ BFD_RELOC_FRV_GPREL12,
+ BFD_RELOC_FRV_GPRELU12,
+ BFD_RELOC_FRV_GPREL32,
+ BFD_RELOC_FRV_GPRELHI,
+ BFD_RELOC_FRV_GPRELLO,
+
/* Direct 12 bit. */
BFD_RELOC_390_12,
BFD_RELOC_XSTORMY16_REL_12,
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
+
+/* Relocations used by VAX ELF. */
+ BFD_RELOC_VAX_GLOB_DAT,
+ BFD_RELOC_VAX_JMP_SLOT,
+ BFD_RELOC_VAX_RELATIVE,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
const char *
bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
+/* Extracted from syms.c. */
typedef struct symbol_cache_entry
{
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
+/* Extracted from bfd.c. */
struct _bfd
{
/* The filename the application opened the BFD with. */
#define bfd_merge_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+#define bfd_discard_group(abfd, sec) \
+ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+/* Extracted from archive.c. */
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
+/* Extracted from corefile.c. */
const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
boolean
core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+/* Extracted from targets.c. */
#define BFD_SEND(bfd, message, arglist) \
((*((bfd)->xvec->message)) arglist)
CONCAT2 (NAME,_bfd_final_link), \
CONCAT2 (NAME,_bfd_link_split_section), \
CONCAT2 (NAME,_bfd_gc_sections), \
-CONCAT2 (NAME,_bfd_merge_sections)
+CONCAT2 (NAME,_bfd_merge_sections), \
+CONCAT2 (NAME,_bfd_discard_group)
int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
bfd_byte *(*_bfd_get_relocated_section_contents)
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
/* Attempt to merge SEC_MERGE sections. */
boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
+ /* Discard members of a group. */
+ boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
const bfd_target *
bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
+/* Extracted from format.c. */
boolean
bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
.#define bfd_merge_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
.
+.#define bfd_discard_group(abfd, sec) \
+. BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+.
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
#define binary_bfd_relax_section bfd_generic_relax_section
#define binary_bfd_gc_sections bfd_generic_gc_sections
#define binary_bfd_merge_sections bfd_generic_merge_sections
+#define binary_bfd_discard_group bfd_generic_discard_group
#define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define binary_bfd_link_just_syms _bfd_generic_link_just_syms
#define b_out_bfd_link_split_section _bfd_generic_link_split_section
#define b_out_bfd_gc_sections bfd_generic_gc_sections
#define b_out_bfd_merge_sections bfd_generic_merge_sections
+#define b_out_bfd_discard_group bfd_generic_discard_group
#define aout_32_get_section_contents_in_window \
_bfd_generic_get_section_contents_in_window
/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
#define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
#define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
const bfd_target ecoffalpha_little_vec =
{
/* BFD back-end for MIPS Extended-Coff files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
bfd_size_type size;
size = (bfd_size_type) sec->reloc_count * sizeof (long);
- offsets = (long *) bfd_alloc (abfd, size);
+ offsets = (long *) bfd_zalloc (abfd, size);
if (offsets == (long *) NULL)
goto error_return;
- memset (offsets, 0, (size_t) size);
section_tdata->offsets = offsets;
}
/* Merging of sections is not done. */
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+
extern const bfd_target ecoff_big_vec;
const bfd_target ecoff_little_vec =
xcoff_data (abfd)->debug_indices = NULL;
/* text section alignment is different than the default */
- /* xcoff_data (abfd)->text_align_power = 5; */
+ bfd_xcoff_text_align_power (abfd) = 2;
return true;
}
else
ox->snentry = sec->output_section->target_index;
}
- ox->text_align_power = ix->text_align_power;
- ox->data_align_power = ix->data_align_power;
+ bfd_xcoff_text_align_power (obfd) = bfd_xcoff_text_align_power (ibfd);
+ bfd_xcoff_data_align_power (obfd) = bfd_xcoff_data_align_power (ibfd);
ox->modtype = ix->modtype;
ox->cputype = ix->cputype;
ox->maxdata = ix->maxdata;
0xffff, /* dst_mask */
false), /* pcrel_offset */
+ /* Modifiable branch relative. */
+ HOWTO (R_RBA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "R_RBA_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
};
void
relent->howto = &xcoff_howto_table[0x1c];
else if (R_RBR == internal->r_type)
relent->howto = &xcoff_howto_table[0x1d];
+ else if (R_RBA == internal->r_type)
+ relent->howto = &xcoff_howto_table[0x1e];
}
/* The r_size field of an XCOFF reloc encodes the bitsize of the
int text_align_power;
text_align_power = bfd_xcoff_text_align_power (in_bfd);
- BFD_ASSERT (2 < text_align_power);
pad = 1 << text_align_power;
pad -= (*offset + ar_header_size) & (pad - 1);
+ str_32 + (str_32 & 1);
symbol_table = NULL;
- symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+ symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
if (symbol_table == NULL)
return false;
- memset (symbol_table, 0, symbol_table_size);
hdr = (struct xcoff_ar_hdr_big *) symbol_table;
+ str_64 + (str_64 & 1);
symbol_table = NULL;
- symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+ symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
if (symbol_table == NULL)
return false;
- memset (symbol_table, 0, symbol_table_size);
hdr = (struct xcoff_ar_hdr_big *) symbol_table;
member_table_size += member_table_size & 1;
member_table = NULL;
- member_table = (bfd_byte *) bfd_malloc (member_table_size);
+ member_table = (bfd_byte *) bfd_zmalloc (member_table_size);
if (member_table == NULL)
return false;
- memset (member_table, 0, member_table_size);
hdr = (struct xcoff_ar_hdr_big *) member_table;
data_buffer_size = 0x0040 + initsz + finisz;
data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
data_buffer = NULL;
- data_buffer = (bfd_byte *) bfd_malloc (data_buffer_size);
+ data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
if (data_buffer == NULL)
return false;
-
- memset (data_buffer, 0, data_buffer_size);
if (initsz)
{
if (string_table_size)
{
string_table_size += 4;
- string_table = (bfd_byte *)bfd_malloc (string_table_size);
- memset (string_table, 0, string_table_size);
+ string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
+ if (string_table_size == NULL)
+ return false;
+
val = string_table_size;
bfd_h_put_32 (abfd, val, &string_table[0]);
st_tmp = string_table + 4;
_bfd_generic_link_split_section, /* _bfd_link_split_section */
bfd_generic_gc_sections, /* _bfd_gc_sections */
bfd_generic_merge_sections, /* _bfd_merge_sections */
+ bfd_generic_discard_group, /* _bfd_discard_group */
/* Dynamic */
/* _get_dynamic_symtab_upper_bound */
_bfd_xcoff_bfd_final_link, /* _bfd_final_link */
_bfd_generic_link_split_section, /* _bfd_link_split_section */
bfd_generic_gc_sections, /* _bfd_gc_sections */
- bfd_generic_merge_sections, /* _bfd_merge_sections */
+ bfd_generic_merge_sections, /* _bfd_merge_sections */
+ bfd_generic_discard_group, /* _bfd_discard_group */
/* Dynamic */
/* _get_dynamic_symtab_upper_bound */
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
+
+ /* Modifiable branch absolute. */
+ HOWTO (R_RBA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "R_RBA_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
};
void
relent->howto = &xcoff64_howto_table[0x1d];
else if (R_RBR == internal->r_type)
relent->howto = &xcoff64_howto_table[0x1e];
+ else if (R_RBA == internal->r_type)
+ relent->howto = &xcoff64_howto_table[0x1f];
}
/* Special case 32 bit */
else if (31 == (internal->r_size & 0x3f))
data_buffer_size = 0x0058 + initsz + finisz;
data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
data_buffer = NULL;
- data_buffer = (bfd_byte *)bfd_malloc (data_buffer_size);
+ data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
if (data_buffer == NULL)
return false;
- memset (data_buffer, 0, data_buffer_size);
-
if (initsz)
{
val = 0x18;
if (true == rtld)
string_table_size += strlen (rtld_name) + 1;
- string_table = (bfd_byte *)bfd_malloc (string_table_size);
- memset (string_table, 0, string_table_size);
+ string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
+ if (string_table == NULL)
+ return false;
+
val = string_table_size;
bfd_put_32 (abfd, val, &string_table[0]);
st_tmp = string_table + 4;
_bfd_generic_link_split_section, /* _bfd_link_split_section */
bfd_generic_gc_sections, /* _bfd_gc_sections */
bfd_generic_merge_sections, /* _bfd_merge_sections */
+ bfd_generic_discard_group, /* _bfd_discard_group */
/* Dynamic */
/* _get_dynamic_symtab_upper_bound */
_bfd_generic_link_split_section, /* _bfd_link_split_section */
bfd_generic_gc_sections, /* _bfd_gc_sections */
bfd_generic_merge_sections, /* _bfd_merge_sections */
+ bfd_generic_discard_group, /* _bfd_discard_group */
/* Dynamic */
/* _get_dynamic_symtab_upper_bound */
xcoff->toc = internal_a->o_toc;
xcoff->sntoc = internal_a->o_sntoc;
xcoff->snentry = internal_a->o_snentry;
- xcoff->text_align_power = internal_a->o_algntext;
- xcoff->data_align_power = internal_a->o_algndata;
+ bfd_xcoff_text_align_power (abfd) = internal_a->o_algntext;
+ bfd_xcoff_data_align_power (abfd) = internal_a->o_algndata;
xcoff->modtype = internal_a->o_modtype;
xcoff->cputype = internal_a->o_cputype;
xcoff->maxdata = internal_a->o_maxdata;
AIX executable is stripped with gnu strip because the default vma
of native is 0x10000150 but default for gnu is 0x10000140. Gnu
stripped gnu excutable passes this check because the filepos is
- 0x0140. */
- if (!strcmp (current->name, _TEXT))
+ 0x0140. This problem also show up with 64 bit shared objects. The
+ data section must also be aligned. */
+ if (!strcmp (current->name, _TEXT)
+ || !strcmp (current->name, _DATA))
{
bfd_vma pad;
bfd_vma align;
#define coff_bfd_merge_sections bfd_generic_merge_sections
#endif
+#ifndef coff_bfd_discard_group
+#define coff_bfd_discard_group bfd_generic_discard_group
+#endif
+
#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
const bfd_target VAR = \
{ \
/* Support for the generic parts of COFF, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
combined_entry_type e[10];
};
struct foo *f;
- f = (struct foo *) bfd_alloc (abfd, (bfd_size_type) sizeof (*f));
+
+ f = (struct foo *) bfd_zalloc (abfd, (bfd_size_type) sizeof (*f));
if (!f)
{
bfd_set_error (bfd_error_no_error);
return NULL;
}
- memset ((char *) f, 0, sizeof (*f));
coff_symbol_from (abfd, sym)->native = csym = f->e;
}
csym[0].u.syment.n_sclass = C_STAT;
if (internal_ptr->u.syment._n._n_name[i] == '\0')
break;
- newstring = (PTR) bfd_alloc (abfd, (bfd_size_type) (i + 1));
+ newstring = (PTR) bfd_zalloc (abfd, (bfd_size_type) (i + 1));
if (newstring == NULL)
return (NULL);
- memset (newstring, 0, i + 1);
strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
internal_ptr->u.syment._n._n_n._n_zeroes = 0;
bfd *abfd;
{
bfd_size_type amt = sizeof (coff_symbol_type);
- coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt);
+ coff_symbol_type *new = (coff_symbol_type *) bfd_zalloc (abfd, amt);
if (new == NULL)
return (NULL);
- memset (new, 0, sizeof *new);
new->symbol.section = 0;
new->native = 0;
new->lineno = (alent *) NULL;
combined_entry_type * native;
bfd_size_type amt = sizeof (* native);
- native = (combined_entry_type *) bfd_alloc (abfd, amt);
+ native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (native == NULL)
return false;
- memset (native, 0, sizeof (* native));
-
native->u.syment.n_type = T_NULL;
native->u.syment.n_sclass = class;
/* 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_alloc (abfd, amt);
+ sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
obj_coff_sym_hashes (abfd) = sym_hash;
- memset (sym_hash, 0,
- (size_t) symcount * sizeof (struct coff_link_hash_entry *));
symesz = bfd_coff_symesz (abfd);
BFD_ASSERT (symesz == bfd_coff_auxesz (abfd));
;;
arm-*-netbsd* | arm-*-openbsd*)
targ_defvec=armnetbsd_vec
+ targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
targ_underscore=yes
;;
arm-*-riscix*)
targ_defvec=bfd_elf32_fr30_vec
;;
+ frv-*-elf)
+ targ_defvec=bfd_elf32_frv_vec
+ ;;
+
h8300*-*-elf)
targ_defvec=bfd_elf32_h8300_vec
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
+ i[3456]86-*-nto-qnx*)
+ targ_defvec=bfd_elf32_i386qnx_vec
+ targ_selvecs=i386coff_vec
+ ;;
i[3456]86-*-chorus*)
targ_defvec=bfd_elf32_i386_vec
;;
#endif
#ifdef BFD64
+ sh64l*-*-elf*)
+ targ_defvec=bfd_elf32_sh64l_vec
+ targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
+ targ_underscore=yes
+ ;;
sh64-*-elf*)
targ_defvec=bfd_elf32_sh64_vec
targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec"
targ_defvec=bfd_elf32_shlin_vec
;;
+#ifdef BFD64
+ sh5le-*-netbsd*)
+ targ_defvec=bfd_elf32_sh64lnbsd_vec
+ targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ ;;
+ sh5-*-netbsd*)
+ targ_defvec=bfd_elf32_sh64nbsd_vec
+ targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ ;;
+
+ sh64le-*-netbsd*)
+ targ_defvec=bfd_elf64_sh64lnbsd_vec
+ targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+ ;;
+ sh64-*-netbsd*)
+ targ_defvec=bfd_elf64_sh64nbsd_vec
+ targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+ ;;
+#endif
+
shle-*-netbsdelf*)
targ_defvec=bfd_elf32_shlnbsd_vec
targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
- sh-*-elf* | sh-*-rtemself*)
+ shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf*)
+ targ_defvec=bfd_elf32_shl_vec
+ targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
+#ifdef BFD64
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+#endif
+ targ_underscore=yes
+ ;;
+ sh-*-elf* | sh[1234]*-elf* | sh-*-rtemself*)
targ_defvec=bfd_elf32_sh_vec
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
#ifdef BFD64
;;
#endif
+ vax-*-netbsdelf*)
+ targ_defvec=bfd_elf32_vax_vec
+ targ_selvecs="vaxnetbsd_vec vax1knetbsd_vec"
+ ;;
+
+ vax-*-netbsdaout* | vax-*-netbsd*)
+ targ_defvec=vaxnetbsd_vec
+ targ_selvecs="bfd_elf32_vax_vec vax1knetbsd_vec"
+ targ_underscore=yes
+ ;;
+
vax*-*-*vms*)
targ_defvec=vms_vax_vec
;;
# use one entry per line, even though this leads to long lines.
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
+ aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
+ bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+ # FIXME: We include cofflink.lo not because it's needed for
+ # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
+ # which needs it but does not list it. Should be fixed in right place.
+ bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- # FIXME: We include cofflink.lo not because it's needed for
- # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
- # which needs it but does not list it. Should be fixed in right place.
- bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
+ bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
- cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
- cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
cris_aout_vec) tb="$tb aout-cris.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
+ m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
ppcboot_vec) tb="$tb ppcboot.lo" ;;
riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
- aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
- srec_vec) tb="$tb srec.lo" ;;
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
- symbolsrec_vec) tb="$tb srec.lo" ;;
- tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
+ vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
+ vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ # These appear out of order in targets.c
+ srec_vec) tb="$tb srec.lo" ;;
+ symbolsrec_vec) tb="$tb srec.lo" ;;
+ tekhex_vec) tb="$tb tekhex.lo" ;;
+ cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
+
"") ;;
*) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
esac
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:6311: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6322: 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 6314 "configure"
+#line 6325 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6359: checking for $ac_hdr" >&5
+echo "configure:6370: 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 6364 "configure"
+#line 6375 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6380: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6398: checking for $ac_func" >&5
+echo "configure:6409: 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 6403 "configure"
+#line 6414 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6437: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6451: checking for working mmap" >&5
+echo "configure:6462: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6459 "configure"
+#line 6470 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6623: \"$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
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6637: checking for $ac_func" >&5
+echo "configure:6648: 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 6642 "configure"
+#line 6653 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6676: \"$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
# use one entry per line, even though this leads to long lines.
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
+ aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
+ bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+ # FIXME: We include cofflink.lo not because it's needed for
+ # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
+ # which needs it but does not list it. Should be fixed in right place.
+ bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- # FIXME: We include cofflink.lo not because it's needed for
- # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
- # which needs it but does not list it. Should be fixed in right place.
- bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
- bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
+ bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
- cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
- cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
cris_aout_vec) tb="$tb aout-cris.lo" ;;
demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
+ m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
ppcboot_vec) tb="$tb ppcboot.lo" ;;
riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
- aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
- srec_vec) tb="$tb srec.lo" ;;
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
- symbolsrec_vec) tb="$tb srec.lo" ;;
- tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
+ vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
+ vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
+ # These appear out of order in targets.c
+ srec_vec) tb="$tb srec.lo" ;;
+ symbolsrec_vec) tb="$tb srec.lo" ;;
+ tekhex_vec) tb="$tb tekhex.lo" ;;
+ cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
+ cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
+
"") ;;
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
esac
/* Core file generic interface routines for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
*/
-CONST char *
+const char *
bfd_core_file_failing_command (abfd)
bfd *abfd;
{
return in;
}
-static const bfd_arch_info_type h8300_info_struct =
+static const bfd_arch_info_type h8300s_info_struct =
{
- 16, /* 16 bits in a word */
- 16, /* 16 bits in an address */
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_h8300,
- bfd_mach_h8300,
- "h8300", /* arch_name */
- "h8300", /* printable name */
+ bfd_mach_h8300s,
+ "h8300s", /* arch_name */
+ "h8300s", /* printable name */
1,
- true, /* the default machine */
+ false, /* the default machine */
compatible,
h8300_scan,
-#if 0
- local_bfd_reloc_type_lookup,
-#endif
- 0,
+ 0
};
static const bfd_arch_info_type h8300h_info_struct =
false, /* the default machine */
compatible,
h8300_scan,
-#if 0
- local_bfd_reloc_type_lookup,
-#endif
- &h8300_info_struct,
+ &h8300s_info_struct
};
const bfd_arch_info_type bfd_h8300_arch =
{
- 32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
+ 16, /* 16 bits in a word */
+ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_h8300,
- bfd_mach_h8300s,
- "h8300s", /* arch_name */
- "h8300s", /* printable name */
+ bfd_mach_h8300,
+ "h8300", /* arch_name */
+ "h8300", /* printable name */
1,
- false, /* the default machine */
+ true, /* the default machine */
compatible,
h8300_scan,
-#if 0
- local_bfd_reloc_type_lookup,
-#endif
- &h8300h_info_struct,
+ &h8300h_info_struct
};
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Fix quote style in last change.
+ * Makefile.in: Regenerate.
+
+2002-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (libbfd.h): Don't use "echo -n".
+ (libcoff.h, bfd.h): Likewise.
+ * Makefile.in: Regenerate.
+
+2002-06-06 Lars Brinkhoff <lars@nocrew.org>
+
+ * bfdint.texi: Change registry@sco.com to registry@caldera.com.
+
+2002-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (libbfd.h): Add "Extracted from.." comment.
+ (libcoff.h, bfd.h): Likewise.
+ * Makefile.in: Regenerate.
+
2002-05-25 Alan Modra <amodra@bigpond.net.au>
* chew.c: Use #include "" instead of <> for local header files.
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
echo "#ifdef __cplusplus" >> $@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
case $$file in \
*-in.h) cat $$file >> $@ ;; \
*/header.sed) break ;; \
- *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ *) echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+ -e 's,$$,. */,' >> $@ ; \
+ ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
esac; \
done
echo "#ifdef __cplusplus" >> $@
@item
Define @samp{ELF_MACHINE_CODE} to the magic number which should appear
in the @samp{e_machine} field of the ELF header. As of this writing,
-these magic numbers are assigned by SCO; if you want to get a magic
+these magic numbers are assigned by Caldera; if you want to get a magic
number for a particular processor, try sending a note to
-@email{registry@@sco.com}. In the BFD sources, the magic numbers are
+@email{registry@@caldera.com}. In the BFD sources, the magic numbers are
found in @file{include/elf/common.h}; they have names beginning with
@samp{EM_}.
@item
ecoff_symbol_type *new;
bfd_size_type amt = sizeof (ecoff_symbol_type);
- new = (ecoff_symbol_type *) bfd_alloc (abfd, amt);
+ new = (ecoff_symbol_type *) bfd_zalloc (abfd, amt);
if (new == (ecoff_symbol_type *) NULL)
return (asymbol *) NULL;
- memset ((PTR) new, 0, sizeof *new);
new->symbol.section = (asection *) NULL;
new->fdr = (FDR *) NULL;
new->local = false;
/* Routines to link ECOFF debugging information.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
return false;
- memset ((PTR) s, 0, i);
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
- memset ((PTR) s, 0, i);
+
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
i = (swap->debug_align
- (debug->symbolic_header.issExtMax & (swap->debug_align - 1)));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
- memset ((PTR) s, 0, i);
+
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
PARAMS ((bfd *));
void (*write_relocs)
PARAMS ((bfd *, asection *, PTR));
+ void (*swap_symbol_in)
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
void (*swap_symbol_out)
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
boolean (*slurp_reloc_table)
/* A function to handle unusual section types when creating BFD
sections from ELF sections. */
boolean (*elf_backend_section_from_shdr)
- PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, const char *));
/* A function to convert machine dependent section header flags to
BFD internal section header flags. */
boolean (*elf_backend_write_section)
PARAMS ((bfd *, asection *, bfd_byte *));
+ /* This function, if defined, sets up the file positions for non PT_LOAD
+ segments, especially for segments containing non-allocated sections. */
+ void (*set_nonloadable_filepos)
+ PARAMS ((bfd *, Elf_Internal_Phdr *));
+
+ /* This function, if defined, returns true if the section is contained
+ within the segment. File positions are compared. */
+ boolean (*is_contained_by_filepos)
+ PARAMS ((asection *, Elf_Internal_Phdr *));
+
+ /* This function, if defined, returns true if copy_private_bfd_data
+ should be called. It provides a way of overriding default
+ test conditions in _bfd_elf_copy_private_section_data. */
+ boolean (*copy_private_bfd_data_p)
+ PARAMS ((bfd *, asection *, bfd *, asection *));
+
/* The level of IRIX compatibility we're striving for.
MIPS ELF specific function. */
irix_compat_t (*elf_backend_mips_irix_compat)
/* Type of that information. */
enum elf_link_info_type sec_info_type;
- /* Group name, if this section is part of a group. */
- const char *group_name;
+ union {
+ /* Group name, if this section is a member of a group. */
+ const char *name;
+
+ /* Group signature sym, if this is the SHT_GROUP section. */
+ struct symbol_cache_entry *id;
+ } group;
/* A linked list of sections in the group. Circular when used by
the linker. */
/* Nonzero if this section uses RELA relocations, rather than REL. */
unsigned int use_rela_p:1;
+
+ /* Nonzero when a group is COMDAT. */
+ unsigned int linkonce_p:1;
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
-#define elf_group_name(sec) (elf_section_data(sec)->group_name)
+#define elf_group_name(sec) (elf_section_data(sec)->group.name)
+#define elf_group_id(sec) (elf_section_data(sec)->group.id)
#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
+#define elf_linkonce_p(sec) (elf_section_data(sec)->linkonce_p)
/* Return true if section has been discarded. */
#define elf_discarded_section(sec) \
PARAMS ((bfd *));
extern boolean _bfd_elf_merge_sections
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf_discard_group
+ PARAMS ((bfd *, struct sec *));
+extern void bfd_elf_set_group_contents
+ PARAMS ((bfd *, asection *, PTR));
extern void _bfd_elf_link_just_syms
PARAMS ((asection *, struct bfd_link_info *));
extern boolean _bfd_elf_copy_private_symbol_data
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf32_swap_symbol_in
- PARAMS ((bfd *, const Elf32_External_Sym *, const Elf_External_Sym_Shndx *,
- Elf_Internal_Sym *));
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
extern void bfd_elf32_swap_symbol_out
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf32_swap_reloc_in
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf64_swap_symbol_in
- PARAMS ((bfd *, const Elf64_External_Sym *, const Elf_External_Sym_Shndx *,
- Elf_Internal_Sym *));
+ PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
extern void bfd_elf64_swap_symbol_out
PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf64_swap_reloc_in
address of the .plt + gp_offset.
If no .plt is found, then look for .dlt, .opd and .data (in
- that order) and set __gp to the base address of whichever section
- is found first. */
+ that order) and set __gp to the base address of whichever
+ section is found first. */
sec = hppa_info->plt_sec;
- if (sec)
+ if (sec && ! (sec->flags & SEC_EXCLUDE))
gp_val = (sec->output_offset
+ sec->output_section->vma
+ hppa_info->gp_offset);
else
{
sec = hppa_info->dlt_sec;
- if (!sec)
+ if (!sec || (sec->flags & SEC_EXCLUDE))
sec = hppa_info->opd_sec;
- if (!sec)
+ if (!sec || (sec->flags & SEC_EXCLUDE))
sec = bfd_get_section_by_name (abfd, ".data");
- if (!sec)
+ if (!sec || (sec->flags & SEC_EXCLUDE))
return false;
gp_val = sec->output_offset + sec->output_section->vma;
hppa_info->opd_sec->contents + dyn_h->opd_offset + 24);
}
- /* We want the value of the OPD offset for this symbol, not
- the symbol's actual address. */
- value = (dyn_h->opd_offset
- + hppa_info->opd_sec->output_offset
- + hppa_info->opd_sec->output_section->vma);
+ if (dyn_h->want_opd)
+ /* We want the value of the OPD offset for this symbol. */
+ value = (dyn_h->opd_offset
+ + hppa_info->opd_sec->output_offset
+ + hppa_info->opd_sec->output_section->vma);
+ else
+ /* We want the address of the symbol. */
+ value += addend;
bfd_put_64 (input_bfd, value, hit_data);
return bfd_reloc_ok;
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value > addr
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value == addr)
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
esym = extsyms + r_index;
shndx = shndx_buf + (shndx_buf ? r_index : 0);
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx,
+ bfd_elf32_swap_symbol_in (input_bfd,
+ (const PTR) esym,
+ (const PTR) shndx,
&isym);
if (isym.st_shndx == SHN_UNDEF)
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx == sec_shndx
&& ELF_ST_TYPE (isym.st_info) == STT_FUNC)
{
struct elf_link_hash_table *elftab;
bfd_size_type amt;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx != sec_shndx)
continue;
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx, &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value > addr
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value == addr)
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
/* ELF strtab with GC and suffix merging support.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
-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. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "hashtab.h"
+#include "libiberty.h"
/* An entry in the strtab hash table. */
qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
- last4tab = htab_create (size * 4, NULL, last4_eq, NULL);
+ last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free);
if (last4tab == NULL)
goto alloc_failure;
static boolean swap_out_syms PARAMS ((bfd *, struct bfd_strtab_hash **, int));
static boolean copy_private_bfd_data PARAMS ((bfd *, bfd *));
static char *elf_read PARAMS ((bfd *, file_ptr, bfd_size_type));
+static const char *group_signature PARAMS ((bfd *, Elf_Internal_Shdr *));
static boolean setup_group PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
static void merge_sections_remove_hook PARAMS ((bfd *, asection *));
static void elf_fake_sections PARAMS ((bfd *, asection *, PTR));
-static void set_group_contents PARAMS ((bfd *, asection *, PTR));
static boolean assign_section_numbers PARAMS ((bfd *));
static INLINE int sym_is_global PARAMS ((bfd *, asymbol *));
static boolean elf_map_symbols PARAMS ((bfd *));
unsigned int flags;
} Elf_Internal_Group;
+/* Return the name of the group signature symbol. Why isn't the
+ signature just a string? */
+
+static const char *
+group_signature (abfd, ghdr)
+ bfd *abfd;
+ Elf_Internal_Shdr *ghdr;
+{
+ struct elf_backend_data *bed;
+ file_ptr pos;
+ bfd_size_type amt;
+ Elf_Internal_Shdr *hdr;
+ Elf_Internal_Shdr *shndx_hdr;
+ unsigned char esym[sizeof (Elf64_External_Sym)];
+ Elf_External_Sym_Shndx eshndx;
+ Elf_Internal_Sym isym;
+ unsigned int iname;
+ unsigned int shindex;
+
+ /* First we need to ensure the symbol table is available. */
+ if (! bfd_section_from_shdr (abfd, ghdr->sh_link))
+ return NULL;
+
+ /* Go read the symbol. */
+ hdr = &elf_tdata (abfd)->symtab_hdr;
+ bed = get_elf_backend_data (abfd);
+ amt = bed->s->sizeof_sym;
+ pos = hdr->sh_offset + ghdr->sh_info * amt;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bread (esym, amt, abfd) != amt)
+ return NULL;
+
+ /* And possibly the symbol section index extension. */
+ shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+ if (elf_elfsections (abfd) != NULL
+ && elf_elfsections (abfd)[shndx_hdr->sh_link] == hdr)
+ {
+ amt = sizeof (Elf_External_Sym_Shndx);
+ pos = shndx_hdr->sh_offset + ghdr->sh_info * amt;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bread ((PTR) &eshndx, amt, abfd) != amt)
+ return NULL;
+ }
+
+ /* Convert to internal format. */
+ (*bed->s->swap_symbol_in) (abfd, (const PTR *) &esym, (const PTR *) &eshndx,
+ &isym);
+
+ /* Look up the symbol name. */
+ iname = isym.st_name;
+ shindex = hdr->sh_link;
+ if (iname == 0 && ELF_ST_TYPE (isym.st_info) == STT_SECTION)
+ {
+ iname = elf_elfsections (abfd)[isym.st_shndx]->sh_name;
+ shindex = elf_elfheader (abfd)->e_shstrndx;
+ }
+
+ return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+}
+
/* Set next_in_group list pointer, and group name for NEWSECT. */
static boolean
if (src == shdr->contents)
{
dest->flags = idx;
+ if (shdr->bfd_section != NULL && (idx & GRP_COMDAT))
+ shdr->bfd_section->flags
+ |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
break;
}
if (idx >= shnum)
}
else
{
- struct elf_backend_data *bed;
- file_ptr pos;
- unsigned char ename[4];
- unsigned long iname;
const char *gname;
- /* Humbug. Get the name from the group signature
- symbol. Why isn't the signature just a string?
- Fortunately, the name index is at the same
- place in the external symbol for both 32 and 64
- bit ELF. */
- bed = get_elf_backend_data (abfd);
- pos = elf_tdata (abfd)->symtab_hdr.sh_offset;
- pos += shdr->sh_info * bed->s->sizeof_sym;
- if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bread (ename, (bfd_size_type) 4, abfd) != 4)
+ gname = group_signature (abfd, shdr);
+ if (gname == NULL)
return false;
- iname = H_GET_32 (abfd, ename);
- gname = elf_string_from_elf_strtab (abfd, iname);
elf_group_name (newsect) = gname;
/* Start a circular list with one element. */
elf_next_in_group (newsect) = newsect;
}
+
+ /* If the group section has been created, point to the
+ new member. */
if (shdr->bfd_section != NULL)
elf_next_in_group (shdr->bfd_section) = newsect;
+
i = num_group - 1;
break;
}
return true;
}
+boolean
+bfd_elf_discard_group (abfd, group)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *group;
+{
+ asection *first = elf_next_in_group (group);
+ asection *s = first;
+
+ while (s != NULL)
+ {
+ s->output_section = bfd_abs_section_ptr;
+ s = elf_next_in_group (s);
+ /* These lists are circular. */
+ if (s == first)
+ break;
+ }
+ return true;
+}
+
/* Make a BFD section from an ELF section. We store a pointer to the
BFD section in the bfd_section field of the header. */
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0
+ && elf_next_in_group (newsect) == NULL)
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
bed = get_elf_backend_data (abfd);
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);
- char *name;
+ const char *name;
name = elf_string_from_elf_strtab (abfd, hdr->sh_name);
return true;
case SHT_GROUP:
- /* Make a section for objcopy and relocatable links. */
+ /* We need a BFD section for objcopy and relocatable linking,
+ and it's handy to have the signature available as the section
+ name. */
+ name = group_signature (abfd, hdr);
+ if (name == NULL)
+ return false;
if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name))
return false;
if (hdr->contents != NULL)
unsigned int n_elt = hdr->sh_size / 4;
asection *s;
+ if (idx->flags & GRP_COMDAT)
+ hdr->bfd_section->flags
+ |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+
while (--n_elt != 0)
if ((s = (++idx)->shdr->bfd_section) != NULL
&& elf_next_in_group (s) != NULL)
if ((asect->flags & SEC_STRINGS) != 0)
this_hdr->sh_flags |= SHF_STRINGS;
}
- if (elf_group_name (asect) != NULL)
+ if ((asect->flags & SEC_GROUP) == 0 && elf_group_name (asect) != NULL)
this_hdr->sh_flags |= SHF_GROUP;
if ((asect->flags & SEC_THREAD_LOCAL) != 0)
this_hdr->sh_flags |= SHF_TLS;
/* Fill in the contents of a SHT_GROUP section. */
-static void
-set_group_contents (abfd, sec, failedptrarg)
+void
+bfd_elf_set_group_contents (abfd, sec, failedptrarg)
bfd *abfd;
asection *sec;
- PTR failedptrarg ATTRIBUTE_UNUSED;
+ PTR failedptrarg;
{
boolean *failedptr = (boolean *) failedptrarg;
unsigned long symindx;
- asection *elt;
+ asection *elt, *first;
unsigned char *loc;
struct bfd_link_order *l;
+ boolean gas;
if (elf_section_data (sec)->this_hdr.sh_type != SHT_GROUP
|| *failedptr)
return;
- /* If called from the assembler, swap_out_syms will have set up
- elf_section_syms; If called for "ld -r", the symbols won't yet
- be mapped, so emulate elf_bfd_final_link. */
- if (elf_section_syms (abfd) != NULL)
- symindx = elf_section_syms (abfd)[sec->index]->udata.i;
- else
- symindx = elf_section_data (sec)->this_idx;
+ symindx = 0;
+ if (elf_group_id (sec) != NULL)
+ symindx = elf_group_id (sec)->udata.i;
+
+ if (symindx == 0)
+ {
+ /* If called from the assembler, swap_out_syms will have set up
+ elf_section_syms; If called for "ld -r", use target_index. */
+ if (elf_section_syms (abfd) != NULL)
+ symindx = elf_section_syms (abfd)[sec->index]->udata.i;
+ else
+ symindx = sec->target_index;
+ }
elf_section_data (sec)->this_hdr.sh_info = symindx;
- /* Nor will the contents be allocated for "ld -r". */
+ /* The contents won't be allocated for "ld -r" or objcopy. */
+ gas = true;
if (sec->contents == NULL)
{
+ gas = false;
sec->contents = bfd_alloc (abfd, sec->_raw_size);
+
+ /* Arrange for the section to be written out. */
+ elf_section_data (sec)->this_hdr.contents = sec->contents;
if (sec->contents == NULL)
{
*failedptr = true;
loc = sec->contents + sec->_raw_size;
- /* Get the pointer to the first section in the group that we
- squirreled away here. */
- elt = elf_next_in_group (sec);
+ /* Get the pointer to the first section in the group that gas
+ squirreled away here. objcopy arranges for this to be set to the
+ start of the input section group. */
+ first = elt = elf_next_in_group (sec);
/* First element is a flag word. Rest of section is elf section
indices for all the sections of the group. Write them backwards
directives, not that it matters. */
while (elt != NULL)
{
+ asection *s;
+ unsigned int idx;
+
loc -= 4;
- H_PUT_32 (abfd, elf_section_data (elt)->this_idx, loc);
+ s = elt;
+ if (!gas)
+ s = s->output_section;
+ idx = 0;
+ if (s != NULL)
+ idx = elf_section_data (s)->this_idx;
+ H_PUT_32 (abfd, idx, loc);
elt = elf_next_in_group (elt);
+ if (elt == first)
+ break;
}
/* If this is a relocatable link, then the above did nothing because
}
while (elt != elf_next_in_group (l->u.indirect.section));
- loc -= 4;
- H_PUT_32 (abfd, 0, loc);
+ /* With ld -r, merging SHT_GROUP sections results in wasted space
+ due to allowing for the flag word on each input. We may well
+ duplicate entries too. */
+ while ((loc -= 4) > sec->contents)
+ H_PUT_32 (abfd, 0, loc);
+
+ if (loc != sec->contents)
+ abort ();
- BFD_ASSERT (loc == sec->contents);
+ H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
}
/* Assign all ELF section numbers. The dummy first section is handled here
return false;
}
- if (link_info == NULL || link_info->relocateable)
+ if (link_info == NULL)
{
- bfd_map_over_sections (abfd, set_group_contents, &failed);
+ bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed);
if (failed)
return false;
}
if (! map_sections_to_segments (abfd))
return false;
}
+ else
+ {
+ /* The placement algorithm assumes that non allocated sections are
+ not in PT_LOAD segments. We ensure this here by removing such
+ sections from the segment map. */
+ for (m = elf_tdata (abfd)->segment_map;
+ m != NULL;
+ m = m->next)
+ {
+ unsigned int new_count;
+ unsigned int i;
+
+ if (m->p_type != PT_LOAD)
+ continue;
+
+ new_count = 0;
+ for (i = 0; i < m->count; i ++)
+ {
+ if ((m->sections[i]->flags & SEC_ALLOC) != 0)
+ {
+ if (i != new_count)
+ m->sections[new_count] = m->sections[i];
+
+ new_count ++;
+ }
+ }
+
+ if (new_count != m->count)
+ m->count = new_count;
+ }
+ }
if (bed->elf_backend_modify_segment_map)
{
if (p->p_vaddr < (bfd_vma) off)
{
- _bfd_error_handler (_("%s: Not enough room for program headers, try linking with -N"),
- bfd_get_filename (abfd));
+ (*_bfd_error_handler)
+ (_("%s: Not enough room for program headers, try linking with -N"),
+ bfd_get_filename (abfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
}
}
+ /* If additional nonloadable filepos adjustments are required,
+ do them now. */
+ if (bed->set_nonloadable_filepos)
+ (*bed->set_nonloadable_filepos) (abfd, phdrs);
+
/* Clear out any program headers we allocated but did not use. */
for (; count < alloc; count++, p++)
{
bfd_vma maxpagesize;
struct elf_segment_map * phdr_adjust_seg = NULL;
unsigned int phdr_adjust_num = 0;
+ struct elf_backend_data * bed;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
if (elf_tdata (ibfd)->phdr == NULL)
return true;
+ bed = get_elf_backend_data (ibfd);
iehdr = elf_elfheader (ibfd);
map_first = NULL;
&& (section->lma + section->_raw_size) \
<= SEGMENT_END (segment, base))
+ /* Returns true if the given section is contained within the
+ given segment. Filepos addresses are compared in an elf
+ backend function. */
+#define IS_CONTAINED_BY_FILEPOS(sec, seg, bed) \
+ (bed->is_contained_by_filepos \
+ && (*bed->is_contained_by_filepos) (sec, seg))
+
/* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
#define IS_COREFILE_NOTE(p, s) \
(p->p_type == PT_NOTE \
2. It is an allocated segment,
3. There is an output section associated with it,
4. The section has not already been allocated to a previous segment. */
-#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \
+#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
(((((segment->p_paddr \
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
: IS_CONTAINED_BY_VMA (section, segment)) \
|| IS_SOLARIS_PT_INTERP (segment, section)) \
&& (section->flags & SEC_ALLOC) != 0) \
- || IS_COREFILE_NOTE (segment, section)) \
+ || IS_COREFILE_NOTE (segment, section) \
+ || (IS_CONTAINED_BY_FILEPOS (section, segment, bed) \
+ && (section->flags & SEC_ALLOC) == 0)) \
&& section->output_section != NULL \
&& section->segment_mark == false)
/* Compute how many sections might be placed into this segment. */
section_count = 0;
for (section = ibfd->sections; section != NULL; section = section->next)
- if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
+ if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
++section_count;
/* Allocate a segment map big enough to contain all of the
{
/* Special segments, such as the PT_PHDR segment, may contain
no sections, but ordinary, loadable segments should contain
- something. */
+ something. They are allowed by the ELF spec however, so only
+ a warning is produced. */
if (segment->p_type == PT_LOAD)
- _bfd_error_handler
- (_("%s: warning: Empty loadable segment detected\n"),
- bfd_archive_filename (ibfd));
+ (*_bfd_error_handler)
+ (_("%s: warning: Empty loadable segment detected, is this intentional ?\n"),
+ bfd_archive_filename (ibfd));
map->count = 0;
*pointer_to_map = map;
pointers that we are interested in. As these sections get assigned
to a segment, they are removed from this array. */
- amt = (bfd_size_type) section_count * sizeof (asection *);
+ /* Gcc 2.96 miscompiles this code on mips. Don't do casting here
+ to work around this long long bug. */
+ amt = section_count * sizeof (asection *);
sections = (asection **) bfd_malloc (amt);
if (sections == NULL)
return false;
section != NULL;
section = section->next)
{
- if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
+ if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
{
output_section = section->output_section;
/* Match up the physical address of the segment with the
LMA address of the output section. */
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
+ || IS_CONTAINED_BY_FILEPOS (section, segment, bed)
|| IS_COREFILE_NOTE (segment, section))
{
if (matching_lma == 0)
}
/* Step Three: Loop over the sections again, this time assigning
- those that fit to the current segment and remvoing them from the
+ those that fit to the current segment and removing them from the
sections array; but making sure not to leave large gaps. Once all
possible sections have been assigned to the current segment it is
added to the list of built segments and if sections still remain
maxpagesize then we need to start a new segment. */
if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size,
maxpagesize)
- < BFD_ALIGN (output_section->lma, maxpagesize))
+ < BFD_ALIGN (output_section->lma, maxpagesize))
|| ((prev_sec->lma + prev_sec->_raw_size)
> output_section->lma))
{
#undef SEGMENT_END
#undef IS_CONTAINED_BY_VMA
#undef IS_CONTAINED_BY_LMA
+#undef IS_CONTAINED_BY_FILEPOS
#undef IS_COREFILE_NOTE
#undef IS_SOLARIS_PT_INTERP
#undef INCLUDE_SECTION_IN_SEGMENT
asection *osec;
{
Elf_Internal_Shdr *ihdr, *ohdr;
+ const struct elf_backend_data *bed = get_elf_backend_data (ibfd);
if (ibfd->xvec->flavour != bfd_target_elf_flavour
|| obfd->xvec->flavour != bfd_target_elf_flavour)
This must be done here, rather than in the copy_private_bfd_data
entry point, because the latter is called after the section
contents have been set, which means that the program headers have
- already been worked out. */
- if (elf_tdata (obfd)->segment_map == NULL
- && elf_tdata (ibfd)->phdr != NULL)
- {
- asection *s;
-
- /* Only set up the segments if there are no more SEC_ALLOC
- sections. FIXME: This won't do the right thing if objcopy is
- used to remove the last SEC_ALLOC section, since objcopy
- won't call this routine in that case. */
- for (s = isec->next; s != NULL; s = s->next)
- if ((s->flags & SEC_ALLOC) != 0)
- break;
- if (s == NULL)
- {
- if (! copy_private_bfd_data (ibfd, obfd))
- return false;
- }
+ already been worked out. The backend function provides a way to
+ override the test conditions and code path for the call to
+ copy_private_bfd_data. */
+ if (bed->copy_private_bfd_data_p)
+ {
+ if ((*bed->copy_private_bfd_data_p) (ibfd, isec, obfd, osec))
+ if (! copy_private_bfd_data (ibfd, obfd))
+ return false;
+ }
+ else if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ {
+ asection *s;
+
+ /* Only set up the segments if there are no more SEC_ALLOC
+ sections. FIXME: This won't do the right thing if objcopy is
+ used to remove the last SEC_ALLOC section, since objcopy
+ won't call this routine in that case. */
+ for (s = isec->next; s != NULL; s = s->next)
+ if ((s->flags & SEC_ALLOC) != 0)
+ break;
+ if (s == NULL)
+ {
+ if (! copy_private_bfd_data (ibfd, obfd))
+ return false;
+ }
}
ihdr = &elf_section_data (isec)->this_hdr;
|| ihdr->sh_type == SHT_GNU_verdef)
ohdr->sh_info = ihdr->sh_info;
+ /* Set things up for objcopy. The output SHT_GROUP section will
+ have its elf_next_in_group pointing back to the input group
+ members. */
+ elf_next_in_group (osec) = elf_next_in_group (isec);
+ elf_group_name (osec) = elf_group_name (isec);
+
elf_section_data (osec)->use_rela_p
= elf_section_data (isec)->use_rela_p;
if (symtab_shndx_hdr->sh_name != 0)
{
amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx);
- outbound_shndx = bfd_alloc (abfd, amt);
+ outbound_shndx = bfd_zalloc (abfd, amt);
if (outbound_shndx == NULL)
return false;
- memset (outbound_shndx, 0, (unsigned long) amt);
symtab_shndx_hdr->contents = outbound_shndx;
symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
symtab_shndx_hdr->sh_size = amt;
return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
}
-
+
#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
#define TARGET_LITTLE_NAME "elf32-littlearc"
#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
return;
}
-/* Select a BFD to be used to hold the sections used by the glue code.
- This function is called from the linker scripts in ld/emultempl/
- {armelf/pe}.em */
+/* Add the glue sections to ABFD. This function is called from the
+ linker scripts in ld/emultempl/{armelf}.em. */
boolean
-bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
+bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
- struct elf32_arm_link_hash_table *globals;
flagword flags;
asection *sec;
- /* If we are only performing a partial link do not bother
- getting a bfd to hold the glue. */
+ /* If we are only performing a partial
+ link do not bother adding the glue. */
if (info->relocateable)
return true;
- globals = elf32_arm_hash_table (info);
-
- BFD_ASSERT (globals != NULL);
-
- if (globals->bfd_of_glue_owner != NULL)
- return true;
-
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
if (sec == NULL)
sec->gc_mark = 1;
}
+ return true;
+}
+
+/* Select a BFD to be used to hold the sections used by the glue code.
+ This function is called from the linker scripts in ld/emultempl/
+ {armelf/pe}.em */
+
+boolean
+bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ struct elf32_arm_link_hash_table *globals;
+
+ /* If we are only performing a partial link
+ do not bother getting a bfd to hold the glue. */
+ if (info->relocateable)
+ return true;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+
+ if (globals->bfd_of_glue_owner != NULL)
+ return true;
+
/* Save the bfd for later use. */
globals->bfd_of_glue_owner = abfd;
signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask));
-
+
bfd_put_16 (input_bfd, relocation, hit_data);
/* Assumes two's complement. */
return bfd_reloc_ok;
}
-
+
case R_ARM_GNU_VTINHERIT:
case R_ARM_GNU_VTENTRY:
return bfd_reloc_ok;
if (sgot == NULL)
return bfd_reloc_notsupported;
- /* If we are addressing a Thumb function, we need to adjust the
+ /* If we are addressing a Thumb function, we need to adjust the
address by one, so that attempts to call the function pointer will
correctly interpret it as Thumb code. */
if (sym_flags == STT_ARM_TFUNC)
_bfd_error_handler (_("\
Warning: %s supports interworking, whereas %s does not"),
bfd_archive_filename (ibfd),
- bfd_get_filename (obfd));
+ bfd_get_filename (obfd));
}
else
{
static const bfd_byte elf_cris_plt0_entry[PLT_ENTRY_SIZE] =
{
0xfc, 0xe1,
- 0x7e, 0x7e, /* push mof. */
+ 0x7e, 0x7e, /* push mof. */
0x7f, 0x0d, /* (dip [pc+]) */
0, 0, 0, 0, /* Replaced with address of .got + 4. */
0x30, 0x7a, /* move [...],mof */
/* D10V-specific support for 32-bit ELF
- Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
HOWTO (R_D10V_10_PCREL_R, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
+ 7, /* bitsize */
true, /* pc_relative */
0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
+ complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_D10V_10_PCREL_R", /* name */
false, /* partial_inplace */
HOWTO (R_D10V_10_PCREL_L, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
+ 7, /* bitsize */
true, /* pc_relative */
15, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
+ complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_D10V_10_PCREL_L", /* name */
false, /* partial_inplace */
HOWTO (R_D10V_18_PCREL, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 15, /* bitsize */
true, /* pc_relative */
0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
+ complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_D10V_18_PCREL", /* name */
false, /* partial_inplace */
/* A mapping from BFD reloc types to DLX ELF reloc types.
Stolen from elf32-mips.c.
-
+
More about this table - for dlx elf relocation we do not really
need this table, if we have a rtype defined in this table will
caused tc_gen_relocate confused and die on us, but if we remove
enum elf_dlx_reloc_type elf_reloc_val;
};
-static CONST struct elf_reloc_map dlx_reloc_map[] =
+static const struct elf_reloc_map dlx_reloc_map[] =
{
{ BFD_RELOC_NONE, R_DLX_NONE },
{ BFD_RELOC_16, R_DLX_RELOC_16 },
/* Generic support for 32-bit ELF
- Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
mov.b:16 -> mov.b:8 2 bytes
mov.b:24/32 -> mov.b:8 4 bytes
- mov.[bwl]:24/32 -> mov.[bwl]:16 2 bytes
-
-
-*/
+ mov.[bwl]:24/32 -> mov.[bwl]:16 2 bytes */
static boolean
elf32_h8_relax_section (abfd, sec, link_info, again)
if (irel != internal_relocs)
last_reloc = irel - 1;
+ if (ELF32_R_TYPE (irel->r_info) != R_H8_DIR24R8
+ && ELF32_R_TYPE (irel->r_info) != R_H8_PCREL16
+ && ELF32_R_TYPE (irel->r_info) != R_H8_DIR16A8
+ && ELF32_R_TYPE (irel->r_info) != R_H8_DIR24A8
+ && ELF32_R_TYPE (irel->r_info) != R_H8_DIR32A16)
+ continue;
+
/* Get the section contents if we haven't done so already. */
if (contents == NULL)
{
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
symval = (isym.st_value
shndx = shndx_buf;
if (shndx != NULL)
shndx += ELF32_R_SYM (last_reloc->r_info);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &last_symbol);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx,
+ &last_symbol);
last_sym_sec
= bfd_section_from_elf_index (abfd, last_symbol.st_shndx);
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value > addr
{
Elf_Internal_Sym isym;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value == addr)
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
/* Set up various things so that we can make a list of input sections
for each output section included in the link. Returns -1 on error,
- 0 when no stubs will be needed, and 1 on success. */
+ 0 when no stubs will be needed, and 1 on success. */
int
elf32_hppa_setup_section_lists (output_bfd, 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);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isym);
/* Now we can free the external symbols. */
free (shndx_buf);
static boolean i370_elf_section_from_shdr PARAMS ((bfd *,
Elf32_Internal_Shdr *,
- char *));
+ const char *));
static boolean i370_elf_fake_sections PARAMS ((bfd *,
Elf32_Internal_Shdr *,
asection *));
i370_elf_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf32_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
flagword flags;
return false;
return true;
}
-
+
static boolean
elf_i386_object_p (abfd)
bfd *abfd;
}
/* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */
if (p == NULL)
{
h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
&& !info->shared
&& h->dynindx == -1
&& elf_i386_hash_entry(h)->tls_type == GOT_TLS_IE)
- h->got.offset = (bfd_vma) -1;
+ h->got.offset = (bfd_vma) -1;
else if (h->got.refcount > 0)
{
asection *s;
the .plt section. Leave the value alone. This is a clue
for the dynamic linker, to make function pointer
comparisons work between an application and shared
- library. */
+ library. */
sym->st_shndx = SHN_UNDEF;
}
}
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
+#ifndef ELF32_I386_C_INCLUDED
#include "elf32-target.h"
+#endif
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
}
PARAMS ((bfd *, Elf_Internal_Note *));
static boolean elf32_mips_discard_info
PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
-static boolean elf32_mips_ignore_discarded_relocs
- PARAMS ((asection *));
static boolean elf32_mips_write_section
PARAMS ((bfd *, asection *, bfd_byte *));
static irix_compat_t elf32_mips_irix_compat
return ret;
}
-static boolean
-elf32_mips_ignore_discarded_relocs (sec)
- asection *sec;
-{
- if (strcmp (sec->name, ".pdr") == 0)
- return true;
- return false;
-}
-
static boolean
elf32_mips_write_section (output_bfd, sec, contents)
bfd *output_bfd;
/* A local symbol. */
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
}
#define elf_backend_discard_info elf32_mips_discard_info
#define elf_backend_ignore_discarded_relocs \
- elf32_mips_ignore_discarded_relocs
+ _bfd_mips_elf_ignore_discarded_relocs
#define elf_backend_write_section elf32_mips_write_section
#define elf_backend_mips_irix_compat elf32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf32_rtype_to_howto
static asection *
openrisc_elf_gc_mark_hook (abfd, info, rel, h, sym)
- bfd *abfd ATTRIBUTE_UNUSED;
+ bfd *abfd;
struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel ATTRIBUTE_UNUSED;
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
- Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
{
if (h != NULL)
{
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
-{
+{
if (output_bfd != (bfd *) NULL)
{
unsigned long insn;
bfd_size_type addr = reloc_entry->address;
reloc_entry->address += input_section->output_offset;
-
+
insn = bfd_get_32 (abfd, (bfd_byte *) data + addr);
insn += symbol->section->output_section->vma;
insn += symbol->section->output_offset;
insn += symbol->value;
- bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
return bfd_reloc_ok;
}
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
-{
+{
if (output_bfd != (bfd *) NULL)
{
unsigned short insn;
insn += symbol->section->output_section->vma;
insn += symbol->section->output_offset;
insn += symbol->value;
- bfd_put_16 (abfd, insn, (bfd_byte *) data + addr);
+ bfd_put_16 (abfd, insn, (bfd_byte *) data + addr);
return bfd_reloc_ok;
}
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
-{
+{
if (output_bfd != (bfd *) NULL)
{
unsigned char insn;
insn += symbol->section->output_section->vma;
insn += symbol->section->output_offset;
insn += symbol->value;
- bfd_put_8 (abfd, insn, (bfd_byte *) data + addr);
+ bfd_put_8 (abfd, insn, (bfd_byte *) data + addr);
return bfd_reloc_ok;
}
bfd_reloc_status_type ret;
bfd_vma relocation;
struct or32_consth *n;
-
+
ret = bfd_reloc_ok;
if (bfd_is_und_section (symbol->section)
asection *input_section;
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
-{
+{
if (output_bfd != (bfd *) NULL)
{
unsigned long insn, tmp;
tmp = insn | 0xfc000000;
tmp -= (input_section->output_offset >> 2);
insn = (insn & 0xfc000000) | (tmp & 0x03ffffff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
return bfd_reloc_ok;
}
static boolean ppc_elf_section_from_shdr PARAMS ((bfd *,
Elf32_Internal_Shdr *,
- char *));
+ const char *));
static boolean ppc_elf_fake_sections
PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
ppc_elf_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf32_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
flagword flags;
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
- (although we could actually do it here). */
+ (although we could actually do it here). */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
esym = extsyms + ELF32_R_SYM (irelfn->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelfn->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx
!= (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
{
esym = extsyms + ELF32_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &sym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym,
+ (const PTR) shndx, &sym);
if (sym.st_shndx == sec_shndx
&& (sym.st_value <= addr
esym = extsyms + ELF32_R_SYM (irelscan->r_info);
shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelscan->r_info) : 0);
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &sym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &sym);
if (sym.st_shndx == sec_shndx
&& (sym.st_value <= addr
Elf_Internal_Sym isym;
Elf_External_Sym_Shndx dummy;
- bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf32_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == sec_shndx
&& isym.st_value > addr
{
asection *isec;
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
+ bfd_elf32_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
asection *));
static boolean sh64_backend_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static void sh64_elf_final_write_processing PARAMS ((bfd *, boolean));
static boolean sh64_bfd_elf_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
#define INCLUDE_SHMEDIA
#include "elf32-sh.c"
-/* The type sh64_elf_crange is defined in elf/sh.h which is included in
- elf32-sh.c, hence these prototypes located after including it. */
-static int crange_qsort_cmpb PARAMS ((const void *, const void *));
-static int crange_qsort_cmpl PARAMS ((const void *, const void *));
-static int crange_bsearch_cmpb PARAMS ((const void *, const void *));
-static int crange_bsearch_cmpl PARAMS ((const void *, const void *));
-static boolean sh64_address_in_cranges
- PARAMS ((asection *cranges, bfd_vma, sh64_elf_crange *));
-
/* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections, and pass
through SHT_SH5_CR_SORTED on a sorted .cranges section. */
sh64_backend_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
flagword flags = 0;
qsort (cranges->contents, cranges_size / SH64_CRANGE_SIZE,
SH64_CRANGE_SIZE,
bfd_big_endian (cranges->owner)
- ? crange_qsort_cmpb : crange_qsort_cmpl);
+ ? _bfd_sh64_crange_qsort_cmpb
+ : _bfd_sh64_crange_qsort_cmpl);
elf_section_data (cranges)->this_hdr.sh_type
= SHT_SH5_CR_SORTED;
}
}
}
}
-
-/* Ordering functions of a crange, for the qsort and bsearch calls and for
- different endianness. */
-
-static int
-crange_qsort_cmpb (p1, p2)
- const PTR p1;
- const PTR p2;
-{
- bfd_vma a1 = bfd_getb32 (p1);
- bfd_vma a2 = bfd_getb32 (p2);
-
- /* Preserve order if there's ambiguous contents. */
- if (a1 == a2)
- return (char *) p1 - (char *) p2;
-
- return a1 - a2;
-}
-
-static int
-crange_qsort_cmpl (p1, p2)
- const PTR p1;
- const PTR p2;
-{
- bfd_vma a1 = (bfd_vma) bfd_getl32 (p1);
- bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
-
- /* Preserve order if there's ambiguous contents. */
- if (a1 == a2)
- return (char *) p1 - (char *) p2;
-
- return a1 - a2;
-}
-
-static int
-crange_bsearch_cmpb (p1, p2)
- const PTR p1;
- const PTR p2;
-{
- bfd_vma a1 = *(bfd_vma *) p1;
- bfd_vma a2 = (bfd_vma) bfd_getb32 (p2);
- bfd_size_type size
- = (bfd_size_type) bfd_getb32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
- if (a1 >= a2 + size)
- return 1;
- if (a1 < a2)
- return -1;
- return 0;
-}
-
-static int
-crange_bsearch_cmpl (p1, p2)
- const PTR p1;
- const PTR p2;
-{
- bfd_vma a1 = *(bfd_vma *) p1;
- bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
- bfd_size_type size
- = (bfd_size_type) bfd_getl32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
- if (a1 >= a2 + size)
- return 1;
- if (a1 < a2)
- return -1;
- return 0;
-}
-
-/* Check whether a specific address is specified within a .cranges
- section. Return FALSE if not found, and TRUE if found, and the region
- filled into RANGEP if non-NULL. */
-
-static boolean
-sh64_address_in_cranges (cranges, addr, rangep)
- asection *cranges;
- bfd_vma addr;
- sh64_elf_crange *rangep;
-{
- bfd_byte *cranges_contents;
- bfd_byte *found_rangep;
- bfd_size_type cranges_size = bfd_section_size (cranges->owner, cranges);
-
- /* If the size is not a multiple of the cranges entry size, then
- something is badly wrong. */
- if ((cranges_size % SH64_CRANGE_SIZE) != 0)
- return false;
-
- /* If this section has relocations, then we can't do anything sane. */
- if (bfd_get_section_flags (cranges->owner, cranges) & SEC_RELOC)
- return false;
-
- /* Has some kind soul (or previous call) left processed, sorted contents
- for us? */
- if ((bfd_get_section_flags (cranges->owner, cranges) & SEC_IN_MEMORY)
- && elf_section_data (cranges)->this_hdr.sh_type == SHT_SH5_CR_SORTED)
- cranges_contents = cranges->contents;
- else
- {
- cranges_contents
- = bfd_malloc (cranges->_cooked_size == 0
- ? cranges->_cooked_size : cranges->_raw_size);
- if (cranges_contents == NULL)
- return false;
-
- if (! bfd_get_section_contents (cranges->owner, cranges,
- cranges_contents, (file_ptr) 0,
- cranges_size))
- goto error_return;
-
- /* Is it sorted? */
- if (elf_section_data (cranges)->this_hdr.sh_type
- != SHT_SH5_CR_SORTED)
- /* Nope. Lets sort it. */
- qsort (cranges_contents, cranges_size / SH64_CRANGE_SIZE,
- SH64_CRANGE_SIZE,
- bfd_big_endian (cranges->owner)
- ? crange_qsort_cmpb : crange_qsort_cmpl);
-
- /* Let's keep it around. */
- cranges->contents = cranges_contents;
- bfd_set_section_flags (cranges->owner, cranges,
- bfd_get_section_flags (cranges->owner, cranges)
- | SEC_IN_MEMORY);
-
- /* It's sorted now. */
- elf_section_data (cranges)->this_hdr.sh_type = SHT_SH5_CR_SORTED;
- }
-
- /* Try and find a matching range. */
- found_rangep
- = bsearch (&addr, cranges_contents, cranges_size / SH64_CRANGE_SIZE,
- SH64_CRANGE_SIZE,
- bfd_big_endian (cranges->owner)
- ? crange_bsearch_cmpb : crange_bsearch_cmpl);
-
- /* Fill in a few return values if we found a matching range. */
- if (found_rangep)
- {
- enum sh64_elf_cr_type cr_type
- = bfd_get_16 (cranges->owner,
- SH64_CRANGE_CR_TYPE_OFFSET + found_rangep);
- bfd_vma cr_addr
- = bfd_get_32 (cranges->owner,
- SH64_CRANGE_CR_ADDR_OFFSET
- + (char *) found_rangep);
- bfd_size_type cr_size
- = bfd_get_32 (cranges->owner,
- SH64_CRANGE_CR_SIZE_OFFSET
- + (char *) found_rangep);
-
- rangep->cr_addr = cr_addr;
- rangep->cr_size = cr_size;
- rangep->cr_type = cr_type;
-
- return true;
- }
-
- /* There is a .cranges section, but it does not have a descriptor
- matching this address. */
- return false;
-
-error_return:
- free (cranges_contents);
- return false;
-}
-
-/* Determine what ADDR points to in SEC, and fill in a range descriptor in
- *RANGEP if it's non-NULL. */
-
-enum sh64_elf_cr_type
-sh64_get_contents_type (sec, addr, rangep)
- asection *sec;
- bfd_vma addr;
- sh64_elf_crange *rangep;
-{
- asection *cranges;
-
- /* Fill in the range with the boundaries of the section as a default. */
- if (bfd_get_flavour (sec->owner) == bfd_target_elf_flavour
- && elf_elfheader (sec->owner)->e_type == ET_EXEC)
- {
- rangep->cr_addr = bfd_get_section_vma (sec->owner, sec);
- rangep->cr_size = bfd_section_size (sec->owner, sec);
- rangep->cr_type = CRT_NONE;
- }
- else
- return false;
-
- /* If none of the pertinent bits are set, then it's a SHcompact (or at
- least not SHmedia). */
- if ((elf_section_data (sec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == 0)
- {
- enum sh64_elf_cr_type cr_type
- = ((bfd_get_section_flags (sec->owner, sec) & SEC_CODE) != 0
- ? CRT_SH5_ISA16 : CRT_DATA);
- rangep->cr_type = cr_type;
- return cr_type;
- }
-
- /* If only the SHF_SH5_ISA32 bit is set, then we have SHmedia. */
- if ((elf_section_data (sec)->this_hdr.sh_flags
- & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == SHF_SH5_ISA32)
- {
- rangep->cr_type = CRT_SH5_ISA32;
- return CRT_SH5_ISA32;
- }
-
- /* Otherwise, we have to look up the .cranges section. */
- cranges = bfd_get_section_by_name (sec->owner, SH64_CRANGES_SECTION_NAME);
-
- if (cranges == NULL)
- /* A mixed section but there's no .cranges section. This is probably
- bad input; it does not comply to specs. */
- return CRT_NONE;
-
- /* If this call fails, we will still have CRT_NONE in rangep->cr_type
- and that will be suitable to return. */
- sh64_address_in_cranges (cranges, addr, rangep);
-
- return rangep->cr_type;
-}
-
-/* This is a simpler exported interface for the benefit of gdb et al. */
-
-boolean
-sh64_address_is_shmedia (sec, addr)
- asection *sec;
- bfd_vma addr;
-{
- sh64_elf_crange dummy;
- return sh64_get_contents_type (sec, addr, &dummy) == CRT_SH5_ISA32;
-}
/* V850-specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
PARAMS ((bfd *, struct bfd_link_info *, const char *,
Elf_Internal_Sym *, asection *));
static boolean v850_elf_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
static boolean v850_elf_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
v850_elf_section_from_shdr (abfd, hdr, name)
bfd * abfd;
Elf_Internal_Shdr * hdr;
- char * name;
+ const char * name;
{
/* There ought to be a place to keep ELF backend specific flags, but
at the moment there isn't one. We just keep track of the
/* Forward declarations. */
static reloc_howto_type * xstormy16_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void xstormy16_info_to_howto_rela
+static void xstormy16_info_to_howto_rela
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
-static bfd_reloc_status_type xstormy16_elf_24_reloc
+static bfd_reloc_status_type xstormy16_elf_24_reloc
PARAMS ((bfd *abfd, arelent *reloc_entry, asymbol *symbol,
PTR data, asection *input_section, bfd *output_bfd,
char **error_message));
boolean *again));
static boolean xstormy16_elf_always_size_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static boolean xstormy16_elf_relocate_section
+static boolean xstormy16_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static boolean xstormy16_elf_finish_dynamic_sections
0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* A 16 bit absolute relocation. */
HOWTO (R_XSTORMY16_16, /* type */
0, /* rightshift */
0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* An 8 bit absolute relocation. */
HOWTO (R_XSTORMY16_8, /* type */
0, /* rightshift */
0, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
/* A 32 bit pc-relative relocation. */
HOWTO (R_XSTORMY16_PC32, /* type */
0, /* rightshift */
0, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* A 16 bit pc-relative relocation. */
HOWTO (R_XSTORMY16_PC16, /* type */
0, /* rightshift */
0, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* An 8 bit pc-relative relocation. */
HOWTO (R_XSTORMY16_PC8, /* type */
0, /* rightshift */
0, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* A 12-bit pc-relative relocation suitable for the branch instructions. */
HOWTO (R_XSTORMY16_REL_12, /* type */
1, /* rightshift */
0, /* src_mask */
0x0fff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* A 24-bit absolute relocation suitable for the jump instructions. */
HOWTO (R_XSTORMY16_24, /* type */
0, /* rightshift */
0, /* src_mask */
0xffff00ff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* A 16 bit absolute relocation to a function pointer. */
HOWTO (R_XSTORMY16_FPTR16, /* type */
0, /* rightshift */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
};
-
+
static reloc_howto_type xstormy16_elf_howto_table2 [] =
{
/* GNU extension to record C++ vtable hierarchy */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
-
+
};
\f
/* Map BFD reloc types to XSTORMY16 ELF reloc types. */
return entry->table + (entry->xstormy16_reloc_val
- entry->table[0].type);
}
-
+
return NULL;
}
if (local_plt_offsets == NULL)
return false;
elf_local_got_offsets (abfd) = local_plt_offsets;
-
+
for (i = 0; i < symtab_hdr->sh_info; i++)
local_plt_offsets[i] = (bfd_vma) -1;
}
if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return false;
break;
-
+
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_XSTORMY16_GNU_VTENTRY:
if (splt->_cooked_size == 0)
splt->_cooked_size = splt->_raw_size;
- /* Map across all global symbols; see which ones happen to
+ /* Map across all global symbols; see which ones happen to
fall in the low 64k. */
relax_plt_data.splt = splt;
relax_plt_data.again = again;
shndx = shndx_buf;
if (shndx != NULL)
shndx += idx;
- bfd_elf32_swap_symbol_in (ibfd, extsyms + idx, shndx, &isym);
+ bfd_elf32_swap_symbol_in (ibfd, (const PTR) (extsyms + idx),
+ (const PTR) shndx, &isym);
if (isym.st_shndx == SHN_UNDEF)
continue;
else if (isym.st_shndx == SHN_ABS)
bfd_reloc_status_type r;
const char * name = NULL;
int r_type;
-
+
r_type = ELF32_R_TYPE (rel->r_info);
-
+
if ( r_type == R_XSTORMY16_GNU_VTINHERIT
|| r_type == R_XSTORMY16_GNU_VTENTRY)
continue;
-
+
r_symndx = ELF32_R_SYM (rel->r_info);
howto = xstormy16_elf_howto_table + ELF32_R_TYPE (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
-
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
-
+
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
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;
name = h->root.root.string;
-
+
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
relocation = 0;
}
}
-
+
switch (ELF32_R_TYPE (rel->r_info))
{
case R_XSTORMY16_24:
{
bfd_vma reloc = relocation + rel->r_addend;
unsigned int x;
-
+
x = bfd_get_32 (input_bfd, contents + rel->r_offset);
x &= 0x0000ff00;
x |= reloc & 0xff;
(info, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
-
+
case bfd_reloc_undefined:
r = info->callbacks->undefined_symbol
(info, name, input_bfd, input_section, rel->r_offset,
true);
break;
-
+
case bfd_reloc_outofrange:
msg = _("internal error: out of range error");
break;
static boolean elf64_alpha_object_p
PARAMS((bfd *));
static boolean elf64_alpha_section_from_shdr
- PARAMS((bfd *, Elf64_Internal_Shdr *, char *));
+ PARAMS((bfd *, Elf64_Internal_Shdr *, const char *));
static boolean elf64_alpha_section_flags
PARAMS((flagword *, Elf64_Internal_Shdr *));
static boolean elf64_alpha_fake_sections
PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static void elf64_alpha_calc_got_offsets PARAMS ((struct bfd_link_info *));
static boolean elf64_alpha_size_got_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_plt_section
+ PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_plt_section_1
+ PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
static boolean elf64_alpha_always_size_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static int alpha_dynamic_entries_for_reloc
+ PARAMS ((int, int, int));
static boolean elf64_alpha_calc_dynrel_sizes
PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
+static boolean elf64_alpha_size_rela_got_section
+ PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_rela_got_1
+ PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
static boolean elf64_alpha_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
const char **, flagword *, asection **, bfd_vma *));
+static struct alpha_elf_got_entry *get_got_entry
+ PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long,
+ unsigned long, bfd_vma));
static boolean elf64_alpha_check_relocs
PARAMS((bfd *, struct bfd_link_info *, asection *sec,
const Elf_Internal_Rela *));
PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
static boolean elf64_alpha_size_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
+static boolean elf64_alpha_relocate_section_r
+ PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
static boolean elf64_alpha_relocate_section
PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
/* Cumulative flags for all the .got entries. */
int flags;
- /* Contexts (LITUSE) in which a literal was referenced. */
-#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01
-#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02
-#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04
-#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x08
+ /* Contexts in which a literal was referenced. */
+#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01
+#define ALPHA_ELF_LINK_HASH_LU_MEM 0x02
+#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04
+#define ALPHA_ELF_LINK_HASH_LU_JSR 0x08
+#define ALPHA_ELF_LINK_HASH_LU_TLSGD 0x10
+#define ALPHA_ELF_LINK_HASH_LU_TLSLDM 0x20
+#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x38
+#define ALPHA_ELF_LINK_HASH_TLS_IE 0x40
/* Used to implement multiple .got subsections. */
struct alpha_elf_got_entry
/* the .got offset for this entry. */
int got_offset;
- int flags;
+ /* How many references to this entry? */
+ int use_count;
+
+ /* The relocation type of this entry. */
+ unsigned char reloc_type;
- /* Additional flags. */
-#define ALPHA_ELF_GOT_ENTRY_RELOCS_DONE 0x10
-#define ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED 0x20
+ /* How a LITERAL is used. */
+ unsigned char flags;
- int use_count;
+ /* Have we initialized the dynamic relocation for this entry? */
+ unsigned char reloc_done;
+
+ /* Have we adjusted this entry for SEC_MERGE? */
+ unsigned char reloc_xlated;
} *got_entries;
/* used to count non-got, non-plt relocations for delayed sizing
/* For every got, this is the section. */
asection *got;
- /* For every got, this is it's total number of *entries*. */
- int total_got_entries;
+ /* For every got, this is it's total number of words. */
+ int total_got_size;
- /* For every got, this is the sum of the number of *entries* required
+ /* For every got, this is the sum of the number of words required
to hold all of the member object's local got. */
- int n_local_got_entries;
+ int local_got_size;
};
#define alpha_elf_tdata(abfd) \
0x1fffff, /* src_mask */
0x1fffff, /* dst_mask */
true), /* pcrel_offset */
+
+ /* Creates a tls_index for the symbol in the got. */
+ HOWTO (R_ALPHA_TLSGD, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "TLSGD", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Creates a tls_index for the (current) module in the got. */
+ HOWTO (R_ALPHA_TLSLDM, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "TLSLDM", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A dynamic relocation for a DTP module entry. */
+ HOWTO (R_ALPHA_DTPMOD64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "DTPMOD64", /* name */
+ false, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Creates a 64-bit offset in the got for the displacement
+ from DTP to the target. */
+ HOWTO (R_ALPHA_GOTDTPREL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "GOTDTPREL", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A dynamic relocation for a displacement from DTP to the target. */
+ HOWTO (R_ALPHA_DTPREL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "DTPREL64", /* name */
+ false, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high 16 bits of the displacement from DTP to the target. */
+ HOWTO (R_ALPHA_DTPRELHI, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "DTPRELHI", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The low 16 bits of the displacement from DTP to the target. */
+ HOWTO (R_ALPHA_DTPRELLO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ 0, /* special_function */
+ "DTPRELLO", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16-bit displacement from DTP to the target. */
+ HOWTO (R_ALPHA_DTPREL16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "DTPREL16", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Creates a 64-bit offset in the got for the displacement
+ from TP to the target. */
+ HOWTO (R_ALPHA_GOTTPREL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "GOTTPREL", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A dynamic relocation for a displacement from TP to the target. */
+ HOWTO (R_ALPHA_TPREL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ 0, /* special_function */
+ "TPREL64", /* name */
+ false, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The high 16 bits of the displacement from TP to the target. */
+ HOWTO (R_ALPHA_TPRELHI, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "TPRELHI", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The low 16 bits of the displacement from TP to the target. */
+ HOWTO (R_ALPHA_TPRELLO, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ 0, /* special_function */
+ "TPRELLO", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16-bit displacement from TP to the target. */
+ HOWTO (R_ALPHA_TPREL16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ 0, /* special_function */
+ "TPREL16", /* name */
+ false, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
};
/* A relocation function which doesn't do anything. */
{BFD_RELOC_ALPHA_GPREL_LO16, R_ALPHA_GPRELLOW},
{BFD_RELOC_GPREL16, R_ALPHA_GPREL16},
{BFD_RELOC_ALPHA_BRSGP, R_ALPHA_BRSGP},
+ {BFD_RELOC_ALPHA_TLSGD, R_ALPHA_TLSGD},
+ {BFD_RELOC_ALPHA_TLSLDM, R_ALPHA_TLSLDM},
+ {BFD_RELOC_ALPHA_DTPMOD64, R_ALPHA_DTPMOD64},
+ {BFD_RELOC_ALPHA_GOTDTPREL16, R_ALPHA_GOTDTPREL},
+ {BFD_RELOC_ALPHA_DTPREL64, R_ALPHA_DTPREL64},
+ {BFD_RELOC_ALPHA_DTPREL_HI16, R_ALPHA_DTPRELHI},
+ {BFD_RELOC_ALPHA_DTPREL_LO16, R_ALPHA_DTPRELLO},
+ {BFD_RELOC_ALPHA_DTPREL16, R_ALPHA_DTPREL16},
+ {BFD_RELOC_ALPHA_GOTTPREL16, R_ALPHA_GOTTPREL},
+ {BFD_RELOC_ALPHA_TPREL64, R_ALPHA_TPREL64},
+ {BFD_RELOC_ALPHA_TPREL_HI16, R_ALPHA_TPRELHI},
+ {BFD_RELOC_ALPHA_TPREL_LO16, R_ALPHA_TPRELLO},
+ {BFD_RELOC_ALPHA_TPREL16, R_ALPHA_TPREL16},
};
/* Given a BFD reloc type, return a HOWTO structure. */
BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max);
cache_ptr->howto = &elf64_alpha_howto_table[r_type];
}
+
+/* These two relocations create a two-word entry in the got. */
+#define alpha_got_entry_size(r_type) \
+ (r_type == R_ALPHA_TLSGD || r_type == R_ALPHA_TLSLDM ? 16 : 8)
+
+/* This is PT_TLS segment p_vaddr. */
+#define alpha_get_dtprel_base(tlss) \
+ ((tlss)->start)
+
+/* Main program TLS (whose template starts at PT_TLS p_vaddr)
+ is assigned offset round(16, PT_TLS p_align). */
+#define alpha_get_tprel_base(tlss) \
+ ((tlss)->start - align_power ((bfd_vma) 16, (tlss)->align))
\f
/* These functions do relaxation for Alpha ELF.
#define OP_BR 0x30
#define OP_BSR 0x34
#define INSN_UNOP 0x2ffe0000
+#define INSN_ADDQ 0x40000400
+#define INSN_RDUNIQ 0x0000009e
struct alpha_relax_info
{
bfd *abfd;
asection *sec;
bfd_byte *contents;
+ Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *relocs, *relend;
struct bfd_link_info *link_info;
- boolean changed_contents;
- boolean changed_relocs;
+ struct elf_link_tls_segment *tls_segment;
bfd_vma gp;
bfd *gotobj;
asection *tsec;
struct alpha_elf_link_hash_entry *h;
+ struct alpha_elf_got_entry **first_gotent;
struct alpha_elf_got_entry *gotent;
+ boolean changed_contents;
+ boolean changed_relocs;
unsigned char other;
};
-static Elf_Internal_Rela * elf64_alpha_relax_with_lituse
- PARAMS((struct alpha_relax_info *info, bfd_vma symval,
- Elf_Internal_Rela *irel, Elf_Internal_Rela *irelend));
-
-static boolean elf64_alpha_relax_without_lituse
+static boolean elf64_alpha_relax_with_lituse
PARAMS((struct alpha_relax_info *info, bfd_vma symval,
Elf_Internal_Rela *irel));
-
static bfd_vma elf64_alpha_relax_opt_call
PARAMS((struct alpha_relax_info *info, bfd_vma symval));
-
+static boolean elf64_alpha_relax_got_load
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+ Elf_Internal_Rela *irel, unsigned long));
+static boolean elf64_alpha_relax_gprelhilo
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+ Elf_Internal_Rela *irel, boolean));
+static boolean elf64_alpha_relax_tls_get_addr
+ PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+ Elf_Internal_Rela *irel, boolean));
+static struct elf_link_tls_segment *elf64_alpha_relax_find_tls_segment
+ PARAMS((struct alpha_relax_info *, struct elf_link_tls_segment *));
static boolean elf64_alpha_relax_section
PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
boolean *again));
return NULL;
}
-static Elf_Internal_Rela *
-elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
+static boolean
+elf64_alpha_relax_with_lituse (info, symval, irel)
struct alpha_relax_info *info;
bfd_vma symval;
- Elf_Internal_Rela *irel, *irelend;
+ Elf_Internal_Rela *irel;
{
- Elf_Internal_Rela *urel;
+ Elf_Internal_Rela *urel, *irelend = info->relend;
int flags, count, i;
bfd_signed_vma disp;
boolean fits16;
("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
bfd_archive_filename (info->abfd), info->sec->name,
(unsigned long) irel->r_offset));
- return irel;
+ return true;
}
+ /* Can't relax dynamic symbols. */
+ if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+ return true;
+
/* Summarize how this particular LITERAL is used. */
for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count)
{
switch (urel->r_addend)
{
- default: /* 0 = ADDRESS FORMAT */
+ case LITUSE_ALPHA_ADDR:
+ default:
/* This type is really just a placeholder to note that all
uses cannot be optimized, but to still allow some. */
all_optimized = false;
break;
- case 1: /* MEM FORMAT */
+ case LITUSE_ALPHA_BASE:
/* We can always optimize 16-bit displacements. */
/* Extract the displacement from the instruction, sign-extending
it if necessary, then test whether it is within 16 or 32 bits
displacement from GP. */
insn_disp = insn & 0x0000ffff;
- if (insn_disp & 0x00008000)
- insn_disp |= 0xffff0000; /* Negative: sign-extend. */
+ if (insn_disp & 0x8000)
+ insn_disp |= ~0xffff; /* Negative: sign-extend. */
xdisp = disp + insn_disp;
- fits16 = (xdisp >= - (bfd_signed_vma) 0x00008000 && xdisp < 0x00008000);
- fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 && xdisp < 0x7fff8000);
+ fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000);
+ fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000
+ && xdisp < 0x7fff8000);
if (fits16)
{
all_optimized = false;
break;
- case 2: /* BYTE OFFSET FORMAT */
+ case LITUSE_ALPHA_BYTOFF:
/* We can always optimize byte instructions. */
/* FIXME: sanity check the insn for byte op. Check that the
info->changed_contents = true;
break;
- case 3: /* CALL FORMAT */
+ case LITUSE_ALPHA_JSR:
+ case LITUSE_ALPHA_TLSGD:
+ case LITUSE_ALPHA_TLSLDM:
{
- /* If not zero, place to jump without needing pv. */
- bfd_vma optdest = elf64_alpha_relax_opt_call (info, symval);
- bfd_vma org = (info->sec->output_section->vma
- + info->sec->output_offset
- + urel->r_offset + 4);
+ bfd_vma optdest, org;
bfd_signed_vma odisp;
+ /* If not zero, place to jump without needing pv. */
+ optdest = elf64_alpha_relax_opt_call (info, symval);
+ org = (info->sec->output_section->vma
+ + info->sec->output_offset
+ + urel->r_offset + 4);
odisp = (optdest ? optdest : symval) - org;
+
if (odisp >= -0x400000 && odisp < 0x400000)
{
Elf_Internal_Rela *xrel;
{
Elf_Internal_Rela *gpdisp
= (elf64_alpha_find_reloc_at_ofs
- (irel, irelend, urel->r_offset + 4, R_ALPHA_GPDISP));
+ (info->relocs, irelend, urel->r_offset + 4,
+ R_ALPHA_GPDISP));
if (gpdisp)
{
- bfd_byte *p_ldah = info->contents + gpdisp->r_offset;
+ bfd_byte *p_ldah = info->contents + gpdisp->r_offset;
bfd_byte *p_lda = p_ldah + gpdisp->r_addend;
unsigned int ldah = bfd_get_32 (info->abfd, p_ldah);
unsigned int lda = bfd_get_32 (info->abfd, p_lda);
got entry by one, possibly eliminating it. */
if (all_optimized)
{
- info->gotent->use_count -= 1;
- alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
- if (!info->h)
- alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
/* If the literal instruction is no longer needed (it may have been
- reused. We can eliminate it.
- ??? For now, I don't want to deal with compacting the section,
+ reused. We can eliminate it. */
+ /* ??? For now, I don't want to deal with compacting the section,
so just nop it out. */
if (!lit_reused)
{
}
}
- return irel + count;
+ return true;
}
static bfd_vma
}
static boolean
-elf64_alpha_relax_without_lituse (info, symval, irel)
+elf64_alpha_relax_got_load (info, symval, irel, r_type)
struct alpha_relax_info *info;
bfd_vma symval;
Elf_Internal_Rela *irel;
+ unsigned long r_type;
{
unsigned int insn;
bfd_signed_vma disp;
if (insn >> 26 != OP_LDQ)
{
+ reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
((*_bfd_error_handler)
- ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
+ ("%s: %s+0x%lx: warning: %s relocation against unexpected insn",
bfd_archive_filename (info->abfd), info->sec->name,
- (unsigned long) irel->r_offset));
+ (unsigned long) irel->r_offset, howto->name));
return true;
}
- /* So we aren't told much. Do what we can with the address load and
- fake the rest. All of the optimizations here require that the
- offset from the GP fit in 16 bits. */
+ /* Can't relax dynamic symbols. */
+ if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+ return true;
- disp = symval - info->gp;
- if (disp < -0x8000 || disp >= 0x8000)
+ /* Can't use local-exec relocations in shared libraries. */
+ if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared)
return true;
- /* On the LITERAL instruction itself, consider exchanging
- `ldq R,X(gp)' for `lda R,Y(gp)'. */
+ if (r_type == R_ALPHA_LITERAL)
+ disp = symval - info->gp;
+ else
+ {
+ bfd_vma dtp_base, tp_base;
+
+ BFD_ASSERT (info->tls_segment != NULL);
+ dtp_base = alpha_get_dtprel_base (info->tls_segment);
+ tp_base = alpha_get_tprel_base (info->tls_segment);
+ disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+ }
+
+ if (disp < -0x8000 || disp >= 0x8000)
+ return true;
- insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+ /* Exchange LDQ for LDA. In the case of the TLS relocs, we're loading
+ a constant, so force the base register to be $31. */
+ if (r_type == R_ALPHA_LITERAL)
+ insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+ else
+ insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
info->changed_contents = true;
- irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPREL16);
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ r_type = R_ALPHA_GPREL16;
+ break;
+ case R_ALPHA_GOTDTPREL:
+ r_type = R_ALPHA_DTPREL16;
+ break;
+ case R_ALPHA_GOTTPREL:
+ r_type = R_ALPHA_TPREL16;
+ break;
+ default:
+ BFD_ASSERT (0);
+ return false;
+ }
+
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
info->changed_relocs = true;
/* Reduce the use count on this got entry by one, possibly
eliminating it. */
- info->gotent->use_count -= 1;
- alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
- if (!info->h)
- alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (r_type);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
/* ??? Search forward through this basic block looking for insns
that use the target register. Stop after an insn modifying the
}
static boolean
-elf64_alpha_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- boolean *again;
+elf64_alpha_relax_gprelhilo (info, symval, irel, hi)
+ struct alpha_relax_info *info;
+ bfd_vma symval;
+ Elf_Internal_Rela *irel;
+ boolean hi;
{
- Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Shdr *shndx_hdr;
- Elf_Internal_Rela *internal_relocs;
- Elf_Internal_Rela *free_relocs = NULL;
- Elf_Internal_Rela *irel, *irelend;
- bfd_byte *free_contents = NULL;
- Elf64_External_Sym *extsyms = NULL;
- Elf64_External_Sym *free_extsyms = NULL;
- Elf_External_Sym_Shndx *shndx_buf = NULL;
- struct alpha_elf_got_entry **local_got_entries;
- struct alpha_relax_info info;
+ unsigned int insn;
+ bfd_signed_vma disp;
+ bfd_byte *pos = info->contents + irel->r_offset;
- /* We are not currently changing any sizes, so only one pass. */
- *again = false;
+ /* ??? This assumes that the compiler doesn't render
- if (link_info->relocateable
- || (sec->flags & SEC_RELOC) == 0
- || sec->reloc_count == 0)
+ array[i]
+ as
+ ldah t, array(gp) !gprelhigh
+ s8addl i, t, t
+ ldq r, array(t) !gprellow
+
+ which would indeed be the most efficient way to implement this. */
+
+ return true;
+
+ disp = symval - info->gp;
+ if (disp < -0x8000 || disp >= 0x8000)
return true;
- /* If this is the first time we have been called for this section,
- initialize the cooked size. */
- if (sec->_cooked_size == 0)
- sec->_cooked_size = sec->_raw_size;
+ if (hi)
+ {
+ /* Nop out the high instruction. */
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos);
+ info->changed_contents = true;
+
+ irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ irel->r_addend = 0;
+ info->changed_relocs = true;
+ }
+ else
+ {
+ /* Adjust the low instruction to reference GP directly. */
+
+ insn = bfd_get_32 (info->abfd, pos);
+ insn = (insn & 0xffe00000) | (29 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos);
+ info->changed_contents = true;
+
+ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GPREL16);
+ info->changed_relocs = true;
+ }
+
+ return true;
+}
+
+static boolean
+elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
+ struct alpha_relax_info *info;
+ bfd_vma symval;
+ Elf_Internal_Rela *irel;
+ boolean is_gd;
+{
+ bfd_byte *pos[5];
+ unsigned int insn;
+ Elf_Internal_Rela *gpdisp, *hint;
+ boolean dynamic, use_gottprel;
+
+ dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
+
+ /* ??? For LD relaxation, we need a symbol referencing the beginning
+ of the TLS segment. */
+ if (!is_gd)
+ return true;
+
+ /* If a TLS symbol is accessed using IE at least once, there is no point
+ to use dynamic model for it. */
+ if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE))
+ ;
+
+ /* If the symbol is local, and we've already committed to DF_STATIC_TLS,
+ then we might as well relax to IE. */
+ else if (info->link_info->shared && !dynamic
+ && (info->link_info->flags & DF_STATIC_TLS))
+ ;
+
+ /* Otherwise we must be building an executable to do anything. */
+ else if (info->link_info->shared)
+ return true;
+
+ /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and
+ the matching LITUSE_TLS relocations. */
+ if (irel + 2 >= info->relend)
+ return true;
+ if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL
+ || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE
+ || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM))
+ return true;
+
+ /* There must be a GPDISP relocation positioned immediately after the
+ LITUSE relocation. */
+ gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+ irel[2].r_offset + 4, R_ALPHA_GPDISP);
+ if (!gpdisp)
+ return true;
+
+ pos[0] = info->contents + irel[0].r_offset;
+ pos[1] = info->contents + irel[1].r_offset;
+ pos[2] = info->contents + irel[2].r_offset;
+ pos[3] = info->contents + gpdisp->r_offset;
+ pos[4] = pos[3] + gpdisp->r_addend;
+
+ /* Only positions 0 and 1 are allowed to be out of order. */
+ if (pos[1] < pos[0])
+ {
+ bfd_byte *tmp = pos[0];
+ pos[0] = pos[1];
+ pos[1] = tmp;
+ }
+ if (pos[1] >= pos[2] || pos[2] >= pos[3] || pos[3] >= pos[4])
+ return true;
+
+ /* Reduce the use count on the LITERAL relocation. Do this before we
+ smash the symndx when we adjust the relocations below. */
+ {
+ struct alpha_elf_got_entry *lit_gotent;
+ struct alpha_elf_link_hash_entry *lit_h;
+ unsigned long indx;
+
+ BFD_ASSERT (ELF64_R_SYM (irel[1].r_info) >= info->symtab_hdr->sh_info);
+ indx = ELF64_R_SYM (irel[1].r_info) - info->symtab_hdr->sh_info;
+ lit_h = alpha_elf_sym_hashes (info->abfd)[indx];
+
+ while (lit_h->root.root.type == bfd_link_hash_indirect
+ || lit_h->root.root.type == bfd_link_hash_warning)
+ lit_h = (struct alpha_elf_link_hash_entry *) lit_h->root.root.u.i.link;
+
+ for (lit_gotent = lit_h->got_entries; lit_gotent ;
+ lit_gotent = lit_gotent->next)
+ if (lit_gotent->gotobj == info->gotobj
+ && lit_gotent->reloc_type == R_ALPHA_LITERAL
+ && lit_gotent->addend == irel[1].r_addend)
+ break;
+ BFD_ASSERT (lit_gotent);
+
+ if (--lit_gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ }
+ }
+
+ /* Change
+
+ lda $16,x($gp) !tlsgd!1
+ ldq $27,__tls_get_addr($gp) !literal!1
+ jsr $26,($27)__tls_get_addr !lituse_tlsgd!1
+ ldah $29,0($26) !gpdisp!2
+ lda $29,0($29) !gpdisp!2
+ to
+ ldq $16,x($gp) !gottprel
+ unop
+ call_pal rduniq
+ addq $16,$0,$0
+ unop
+ or the first pair to
+ lda $16,x($gp) !tprel
+ unop
+ or
+ ldah $16,x($gp) !tprelhi
+ lda $16,x($16) !tprello
+
+ as appropriate. */
+
+ use_gottprel = false;
+ switch (!dynamic && !info->link_info->shared)
+ {
+ case 1:
+ {
+ bfd_vma tp_base;
+ bfd_signed_vma disp;
+
+ BFD_ASSERT (info->tls_segment != NULL);
+ tp_base = alpha_get_tprel_base (info->tls_segment);
+ disp = symval - tp_base;
+
+ if (disp >= -0x8000 && disp < 0x8000)
+ {
+ insn = (OP_LDA << 26) | (16 << 21) | (31 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_TPREL16);
+ irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ break;
+ }
+ else if (disp >= -(bfd_signed_vma) 0x80000000
+ && disp < (bfd_signed_vma) 0x7fff8000)
+ {
+ insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ insn = (OP_LDA << 26) | (16 << 21) | (16 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_TPRELHI);
+ irel[1].r_offset = pos[1] - info->contents;
+ irel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_TPRELLO);
+ break;
+ }
+ }
+ /* FALLTHRU */
+
+ default:
+ use_gottprel = true;
+
+ insn = (OP_LDQ << 26) | (16 << 21) | (29 << 16);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+ irel[0].r_offset = pos[0] - info->contents;
+ irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+ R_ALPHA_GOTTPREL);
+ irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ break;
+ }
+
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_RDUNIQ, pos[2]);
+
+ insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0);
+ bfd_put_32 (info->abfd, (bfd_vma) insn, pos[3]);
+
+ bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[4]);
+
+ irel[2].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+ gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ hint = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+ irel[2].r_offset, R_ALPHA_HINT);
+ if (hint)
+ hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+ info->changed_contents = true;
+ info->changed_relocs = true;
+
+ /* Reduce the use count on the TLSGD/TLSLDM relocation. */
+ if (--info->gotent->use_count == 0)
+ {
+ int sz = alpha_got_entry_size (info->gotent->reloc_type);
+ alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+ if (!info->h)
+ alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+ }
+
+ /* If we've switched to a GOTTPREL relocation, increment the reference
+ count on that got entry. */
+ if (use_gottprel)
+ {
+ struct alpha_elf_got_entry *tprel_gotent;
+
+ for (tprel_gotent = *info->first_gotent; tprel_gotent ;
+ tprel_gotent = tprel_gotent->next)
+ if (tprel_gotent->gotobj == info->gotobj
+ && tprel_gotent->reloc_type == R_ALPHA_GOTTPREL
+ && tprel_gotent->addend == irel->r_addend)
+ break;
+ if (tprel_gotent)
+ tprel_gotent->use_count++;
+ else
+ {
+ if (info->gotent->use_count == 0)
+ tprel_gotent = info->gotent;
+ else
+ {
+ tprel_gotent = (struct alpha_elf_got_entry *)
+ bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry));
+ if (!tprel_gotent)
+ return false;
+
+ tprel_gotent->next = *info->first_gotent;
+ *info->first_gotent = tprel_gotent;
+
+ tprel_gotent->gotobj = info->gotobj;
+ tprel_gotent->addend = irel->r_addend;
+ tprel_gotent->got_offset = -1;
+ tprel_gotent->reloc_done = 0;
+ tprel_gotent->reloc_xlated = 0;
+ }
+
+ tprel_gotent->use_count = 1;
+ tprel_gotent->reloc_type = R_ALPHA_GOTTPREL;
+ }
+ }
+
+ return true;
+}
+
+static struct elf_link_tls_segment *
+elf64_alpha_relax_find_tls_segment (info, seg)
+ struct alpha_relax_info *info;
+ struct elf_link_tls_segment *seg;
+{
+ bfd *output_bfd = info->sec->output_section->owner;
+ asection *o;
+ unsigned int align;
+ bfd_vma base, end;
+
+ for (o = output_bfd->sections; o ; o = o->next)
+ if ((o->flags & SEC_THREAD_LOCAL) != 0
+ && (o->flags & SEC_LOAD) != 0)
+ break;
+ if (!o)
+ return NULL;
+
+ base = o->vma;
+ align = 0;
+
+ do
+ {
+ bfd_vma size;
+
+ if (bfd_get_section_alignment (output_bfd, o) > align)
+ align = bfd_get_section_alignment (output_bfd, o);
+
+ size = o->_raw_size;
+ if (size == 0 && (o->flags & SEC_HAS_CONTENTS) == 0)
+ {
+ struct bfd_link_order *lo;
+ for (lo = o->link_order_head; lo ; lo = lo->next)
+ if (size < lo->offset + lo->size)
+ size = lo->offset + lo->size;
+ }
+ end = o->vma + size;
+ o = o->next;
+ }
+ while (o && (o->flags & SEC_THREAD_LOCAL));
+
+ seg->start = base;
+ seg->size = end - base;
+ seg->align = align;
+
+ return seg;
+}
+
+static boolean
+elf64_alpha_relax_section (abfd, sec, link_info, again)
+ bfd *abfd;
+ asection *sec;
+ struct bfd_link_info *link_info;
+ boolean *again;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Shdr *shndx_hdr;
+ Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *free_relocs = NULL;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *free_contents = NULL;
+ Elf64_External_Sym *extsyms;
+ Elf64_External_Sym *free_extsyms = NULL;
+ Elf_External_Sym_Shndx *shndx_buf = NULL;
+ struct alpha_elf_got_entry **local_got_entries;
+ struct alpha_relax_info info;
+ struct elf_link_tls_segment tls_segment;
+
+ /* We are not currently changing any sizes, so only one pass. */
+ *again = false;
+
+ if (link_info->relocateable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0)
+ return true;
+
+ /* If this is the first time we have been called for this section,
+ initialize the cooked size. */
+ if (sec->_cooked_size == 0)
+ sec->_cooked_size = sec->_raw_size;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
/* Load the relocations for this section. */
internal_relocs = (_bfd_elf64_link_read_relocs
info.abfd = abfd;
info.sec = sec;
info.link_info = link_info;
+ info.symtab_hdr = symtab_hdr;
info.relocs = internal_relocs;
info.relend = irelend = internal_relocs + sec->reloc_count;
- /* Find the GP for this object. */
+ /* Find the GP for this object. Do not store the result back via
+ _bfd_set_gp_value, since this could change again before final. */
info.gotobj = alpha_elf_tdata (abfd)->gotobj;
if (info.gotobj)
{
asection *sgot = alpha_elf_tdata (info.gotobj)->got;
- info.gp = _bfd_get_gp_value (info.gotobj);
- if (info.gp == 0)
- {
- info.gp = (sgot->output_section->vma
- + sgot->output_offset
- + 0x8000);
- _bfd_set_gp_value (info.gotobj, info.gp);
- }
+ info.gp = (sgot->output_section->vma
+ + sgot->output_offset
+ + 0x8000);
}
- for (irel = internal_relocs; irel < irelend; irel++)
+ /* Get the section contents. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ info.contents = elf_section_data (sec)->this_hdr.contents;
+ else
{
- bfd_vma symval;
- Elf_Internal_Sym isym;
- struct alpha_elf_got_entry *gotent;
-
- if (ELF64_R_TYPE (irel->r_info) != (int) R_ALPHA_LITERAL)
- continue;
-
- /* Get the section contents. */
+ info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
if (info.contents == NULL)
- {
- if (elf_section_data (sec)->this_hdr.contents != NULL)
- info.contents = elf_section_data (sec)->this_hdr.contents;
- else
- {
- info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (info.contents == NULL)
- goto error_return;
- free_contents = info.contents;
+ goto error_return;
+ free_contents = info.contents;
- if (! bfd_get_section_contents (abfd, sec, info.contents,
- (file_ptr) 0, sec->_raw_size))
- goto error_return;
- }
- }
+ if (! bfd_get_section_contents (abfd, sec, info.contents,
+ (file_ptr) 0, sec->_raw_size))
+ goto error_return;
+ }
- /* Read this BFD's symbols if we haven't done so already. */
+ /* Read this BFD's symbols. */
+ if (symtab_hdr->contents != NULL)
+ extsyms = (Elf64_External_Sym *) symtab_hdr->contents;
+ else
+ {
+ bfd_size_type amt = symtab_hdr->sh_info * sizeof (Elf64_External_Sym);
+ extsyms = (Elf64_External_Sym *) bfd_malloc (amt);
if (extsyms == NULL)
- {
- bfd_size_type amt;
+ goto error_return;
+ free_extsyms = extsyms;
+ if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
+ || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
+ goto error_return;
+ }
- if (symtab_hdr->contents != NULL)
- extsyms = (Elf64_External_Sym *) symtab_hdr->contents;
- else
- {
- amt = symtab_hdr->sh_info;
- amt *= sizeof (Elf64_External_Sym);
- extsyms = (Elf64_External_Sym *) bfd_malloc (amt);
- if (extsyms == NULL)
- goto error_return;
- free_extsyms = extsyms;
- if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
- goto error_return;
- }
+ shndx_hdr = &elf_tdata (abfd)->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_return;
+ if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
+ || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
+ goto error_return;
+ }
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- if (shndx_hdr->sh_size != 0)
- {
- amt = symtab_hdr->sh_info;
- amt *= sizeof (Elf_External_Sym_Shndx);
- shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- if (shndx_buf == NULL)
- goto error_return;
- if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
- goto error_return;
- }
+ /* Compute the TLS segment information. The version normally found in
+ elf_hash_table (link_info)->tls_segment isn't built until final_link.
+ ??? Probably should look into extracting this into a common function. */
+ info.tls_segment = elf64_alpha_relax_find_tls_segment (&info, &tls_segment);
+
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+ Elf_Internal_Sym isym;
+ struct alpha_elf_got_entry *gotent;
+ unsigned long r_type = ELF64_R_TYPE (irel->r_info);
+
+ /* Early exit for unhandled or unrelaxable relocations. */
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ case R_ALPHA_GPRELHIGH:
+ case R_ALPHA_GPRELLOW:
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ case R_ALPHA_TLSGD:
+ case R_ALPHA_TLSLDM:
+ break;
+ default:
+ continue;
}
/* Get the value of the symbol referred to by the reloc. */
esym = extsyms + ELF64_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELF64_R_SYM (irel->r_info) : 0);
- bfd_elf64_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
- info.tsec = bfd_und_section_ptr;
+ continue;
else if (isym.st_shndx == SHN_ABS)
info.tsec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
info.h = NULL;
info.other = isym.st_other;
- gotent = local_got_entries[ELF64_R_SYM(irel->r_info)];
+ info.first_gotent = &local_got_entries[ELF64_R_SYM(irel->r_info)];
symval = isym.st_value;
}
else
|| h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
- /* We can't do anthing with undefined or dynamic symbols. */
- if (h->root.root.type == bfd_link_hash_undefined
- || h->root.root.type == bfd_link_hash_undefweak
- || alpha_elf_dynamic_symbol_p (&h->root, link_info))
+ /* If the symbol is undefined, we can't do anything with it. */
+ if (h->root.root.type == bfd_link_hash_undefweak
+ || h->root.root.type == bfd_link_hash_undefined)
+ continue;
+
+ /* If the symbol isn't defined in the current module, again
+ we can't do anything. */
+ if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
continue;
info.h = h;
info.tsec = h->root.root.u.def.section;
info.other = h->root.other;
- gotent = h->got_entries;
+ info.first_gotent = &h->got_entries;
symval = h->root.root.u.def.value;
}
/* Search for the got entry to be used by this relocation. */
- while (gotent->gotobj != info.gotobj || gotent->addend != irel->r_addend)
- gotent = gotent->next;
+ for (gotent = *info.first_gotent; gotent ; gotent = gotent->next)
+ if (gotent->gotobj == info.gotobj
+ && gotent->reloc_type == r_type
+ && gotent->addend == irel->r_addend)
+ break;
info.gotent = gotent;
symval += info.tsec->output_section->vma + info.tsec->output_offset;
symval += irel->r_addend;
- BFD_ASSERT(info.gotent != NULL);
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ BFD_ASSERT(info.gotent != NULL);
- /* If there exist LITUSE relocations immediately following, this
- opens up all sorts of interesting optimizations, because we
- now know every location that this address load is used. */
+ /* If there exist LITUSE relocations immediately following, this
+ opens up all sorts of interesting optimizations, because we
+ now know every location that this address load is used. */
+ if (irel+1 < irelend
+ && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
+ {
+ if (!elf64_alpha_relax_with_lituse (&info, symval, irel))
+ goto error_return;
+ }
+ else
+ {
+ if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
+ goto error_return;
+ }
+ break;
- if (irel+1 < irelend && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
- {
- irel = elf64_alpha_relax_with_lituse (&info, symval, irel, irelend);
- if (irel == NULL)
+ case R_ALPHA_GPRELHIGH:
+ case R_ALPHA_GPRELLOW:
+ if (!elf64_alpha_relax_gprelhilo (&info, symval, irel,
+ r_type == R_ALPHA_GPRELHIGH))
goto error_return;
- }
- else
- {
- if (!elf64_alpha_relax_without_lituse (&info, symval, irel))
+ break;
+
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ BFD_ASSERT(info.gotent != NULL);
+ if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
+ goto error_return;
+ break;
+
+ case R_ALPHA_TLSGD:
+ case R_ALPHA_TLSLDM:
+ BFD_ASSERT(info.gotent != NULL);
+ if (!elf64_alpha_relax_tls_get_addr (&info, symval, irel,
+ r_type == R_ALPHA_TLSGD))
goto error_return;
+ break;
}
}
- if (!elf64_alpha_size_got_sections (abfd, link_info))
+ if (!elf64_alpha_size_plt_section (link_info))
+ return false;
+ if (!elf64_alpha_size_got_sections (link_info))
+ return false;
+ if (!elf64_alpha_size_rela_got_section (link_info))
return false;
if (info.changed_relocs)
- {
- elf_section_data (sec)->relocs = internal_relocs;
- }
+ elf_section_data (sec)->relocs = internal_relocs;
else if (free_relocs != NULL)
- {
- free (free_relocs);
- }
+ free (free_relocs);
if (info.changed_contents)
- {
- elf_section_data (sec)->this_hdr.contents = info.contents;
- }
+ elf_section_data (sec)->this_hdr.contents = info.contents;
else if (free_contents != NULL)
{
if (! link_info->keep_memory)
#define PLT_ENTRY_WORD2 0
#define PLT_ENTRY_WORD3 0
-#define MAX_GOT_ENTRIES (64*1024 / 8)
+#define MAX_GOT_SIZE (64*1024)
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
\f
elf64_alpha_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf64_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
return true;
}
-
-/* FIXME: Create a runtime procedure table from the .mdebug section.
-
-static boolean
-mips_elf_create_procedure_table (handle, abfd, info, s, debug)
- PTR handle;
- bfd *abfd;
- struct bfd_link_info *info;
- asection *s;
- struct ecoff_debug_info *debug;
-*/
\f
-/* Handle dynamic relocations when doing an Alpha ELF link. */
+/* Search for and possibly create a got entry. */
-static boolean
-elf64_alpha_check_relocs (abfd, info, sec, relocs)
+static struct alpha_elf_got_entry *
+get_got_entry (abfd, h, r_type, r_symndx, r_addend)
bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ struct alpha_elf_link_hash_entry *h;
+ unsigned long r_type, r_symndx;
+ bfd_vma r_addend;
{
- bfd *dynobj;
- asection *sreloc;
- const char *rel_sec_name;
- Elf_Internal_Shdr *symtab_hdr;
- struct alpha_elf_link_hash_entry **sym_hashes;
- struct alpha_elf_got_entry **local_got_entries;
- const Elf_Internal_Rela *rel, *relend;
- int got_created;
- bfd_size_type amt;
+ struct alpha_elf_got_entry *gotent;
+ struct alpha_elf_got_entry **slot;
- if (info->relocateable)
- return true;
+ if (h)
+ slot = &h->got_entries;
+ else
+ {
+ /* This is a local .got entry -- record for merge. */
- dynobj = elf_hash_table(info)->dynobj;
+ struct alpha_elf_got_entry **local_got_entries;
+
+ local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
+ if (!local_got_entries)
+ {
+ bfd_size_type size;
+ Elf_Internal_Shdr *symtab_hdr;
+
+ symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
+ size = symtab_hdr->sh_info;
+ size *= sizeof (struct alpha_elf_got_entry *);
+
+ local_got_entries
+ = (struct alpha_elf_got_entry **) bfd_zalloc (abfd, size);
+ if (!local_got_entries)
+ return NULL;
+
+ alpha_elf_tdata (abfd)->local_got_entries = local_got_entries;
+ }
+
+ slot = &local_got_entries[r_symndx];
+ }
+
+ for (gotent = *slot; gotent ; gotent = gotent->next)
+ if (gotent->gotobj == abfd
+ && gotent->reloc_type == r_type
+ && gotent->addend == r_addend)
+ break;
+
+ if (!gotent)
+ {
+ int entry_size;
+ bfd_size_type amt;
+
+ amt = sizeof (struct alpha_elf_got_entry);
+ gotent = (struct alpha_elf_got_entry *) bfd_alloc (abfd, amt);
+ if (!gotent)
+ return NULL;
+
+ gotent->gotobj = abfd;
+ gotent->addend = r_addend;
+ gotent->got_offset = -1;
+ gotent->use_count = 1;
+ gotent->reloc_type = r_type;
+ gotent->reloc_done = 0;
+ gotent->reloc_xlated = 0;
+
+ gotent->next = *slot;
+ *slot = gotent;
+
+ entry_size = alpha_got_entry_size (r_type);
+ alpha_elf_tdata (abfd)->total_got_size += entry_size;
+ if (!h)
+ alpha_elf_tdata(abfd)->local_got_size += entry_size;
+ }
+ else
+ gotent->use_count += 1;
+
+ return gotent;
+}
+
+/* Handle dynamic relocations when doing an Alpha ELF link. */
+
+static boolean
+elf64_alpha_check_relocs (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ bfd *dynobj;
+ asection *sreloc;
+ const char *rel_sec_name;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct alpha_elf_link_hash_entry **sym_hashes;
+ const Elf_Internal_Rela *rel, *relend;
+ boolean got_created;
+ bfd_size_type amt;
+
+ if (info->relocateable)
+ return true;
+
+ dynobj = elf_hash_table(info)->dynobj;
if (dynobj == NULL)
elf_hash_table(info)->dynobj = dynobj = abfd;
rel_sec_name = NULL;
symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
sym_hashes = alpha_elf_sym_hashes(abfd);
- local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
- got_created = 0;
+ got_created = false;
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
{
+ enum {
+ NEED_GOT = 1,
+ NEED_GOT_ENTRY = 2,
+ NEED_DYNREL = 4
+ };
+
unsigned long r_symndx, r_type;
struct alpha_elf_link_hash_entry *h;
+ unsigned int gotent_flags;
+ boolean maybe_dynamic;
+ unsigned int need;
+ bfd_vma addend;
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
}
+
+ /* We can only get preliminary data on whether a symbol is
+ locally or externally defined, as not all of the input files
+ have yet been processed. Do something with what we know, as
+ this may help reduce memory usage and processing time later. */
+ maybe_dynamic = false;
+ if (h && ((info->shared
+ && (!info->symbolic || info->allow_shlib_undefined))
+ || ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ || h->root.root.type == bfd_link_hash_defweak))
+ maybe_dynamic = true;
+
+ need = 0;
+ gotent_flags = 0;
r_type = ELF64_R_TYPE (rel->r_info);
+ addend = rel->r_addend;
switch (r_type)
{
case R_ALPHA_LITERAL:
- {
- struct alpha_elf_got_entry *gotent;
- int flags = 0;
-
- if (h)
- {
- /* Search for and possibly create a got entry. */
- for (gotent = h->got_entries; gotent ; gotent = gotent->next)
- if (gotent->gotobj == abfd &&
- gotent->addend == rel->r_addend)
- break;
-
- if (!gotent)
- {
- amt = sizeof (struct alpha_elf_got_entry);
- gotent = ((struct alpha_elf_got_entry *)
- bfd_alloc (abfd, amt));
- if (!gotent)
- return false;
-
- gotent->gotobj = abfd;
- gotent->addend = rel->r_addend;
- gotent->got_offset = -1;
- gotent->flags = 0;
- gotent->use_count = 1;
-
- gotent->next = h->got_entries;
- h->got_entries = gotent;
-
- alpha_elf_tdata (abfd)->total_got_entries++;
- }
- else
- gotent->use_count += 1;
- }
- else
- {
- /* This is a local .got entry -- record for merge. */
- if (!local_got_entries)
- {
- bfd_size_type size;
- size = symtab_hdr->sh_info;
- size *= sizeof (struct alpha_elf_got_entry *);
-
- local_got_entries = ((struct alpha_elf_got_entry **)
- bfd_alloc (abfd, size));
- if (!local_got_entries)
- return false;
-
- memset (local_got_entries, 0, (size_t) size);
- alpha_elf_tdata (abfd)->local_got_entries =
- local_got_entries;
- }
-
- for (gotent = local_got_entries[ELF64_R_SYM(rel->r_info)];
- gotent != NULL && gotent->addend != rel->r_addend;
- gotent = gotent->next)
- continue;
- if (!gotent)
- {
- amt = sizeof (struct alpha_elf_got_entry);
- gotent = ((struct alpha_elf_got_entry *)
- bfd_alloc (abfd, amt));
- if (!gotent)
- return false;
-
- gotent->gotobj = abfd;
- gotent->addend = rel->r_addend;
- gotent->got_offset = -1;
- gotent->flags = 0;
- gotent->use_count = 1;
-
- gotent->next = local_got_entries[ELF64_R_SYM(rel->r_info)];
- local_got_entries[ELF64_R_SYM(rel->r_info)] = gotent;
-
- alpha_elf_tdata(abfd)->total_got_entries++;
- alpha_elf_tdata(abfd)->n_local_got_entries++;
- }
- else
- gotent->use_count += 1;
- }
-
- /* Remember how this literal is used from its LITUSEs.
- This will be important when it comes to decide if we can
- create a .plt entry for a function symbol. */
- if (rel+1 < relend
- && ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE)
- {
- do
- {
- ++rel;
- if (rel->r_addend >= 1 && rel->r_addend <= 3)
- flags |= 1 << rel->r_addend;
- }
- while (rel+1 < relend &&
- ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE);
- }
- else
- {
- /* No LITUSEs -- presumably the address is not being
- loaded for nothing. */
- flags = ALPHA_ELF_LINK_HASH_LU_ADDR;
- }
-
- gotent->flags |= flags;
- if (h)
- {
- /* Make a guess as to whether a .plt entry will be needed. */
- if ((h->flags |= flags) == ALPHA_ELF_LINK_HASH_LU_FUNC)
- h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- else
- h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
- }
- /* FALLTHRU */
+ need = NEED_GOT | NEED_GOT_ENTRY;
+
+ /* Remember how this literal is used from its LITUSEs.
+ This will be important when it comes to decide if we can
+ create a .plt entry for a function symbol. */
+ while (++rel < relend && ELF64_R_TYPE (rel->r_info) == R_ALPHA_LITUSE)
+ if (rel->r_addend >= 1 && rel->r_addend <= 5)
+ gotent_flags |= 1 << rel->r_addend;
+ --rel;
+
+ /* No LITUSEs -- presumably the address is used somehow. */
+ if (gotent_flags == 0)
+ gotent_flags = ALPHA_ELF_LINK_HASH_LU_ADDR;
+ break;
case R_ALPHA_GPDISP:
case R_ALPHA_GPREL16:
case R_ALPHA_GPRELHIGH:
case R_ALPHA_GPRELLOW:
case R_ALPHA_BRSGP:
- /* We don't actually use the .got here, but the sections must
- be created before the linker maps input sections to output
- sections. */
+ need = NEED_GOT;
+ break;
+
+ case R_ALPHA_REFLONG:
+ case R_ALPHA_REFQUAD:
+ if (info->shared || maybe_dynamic)
+ need = NEED_DYNREL;
+ break;
+
+ case R_ALPHA_TLSGD:
+ case R_ALPHA_TLSLDM:
+ case R_ALPHA_GOTDTPREL:
+ need = NEED_GOT | NEED_GOT_ENTRY;
+ break;
+
+ case R_ALPHA_GOTTPREL:
+ need = NEED_GOT | NEED_GOT_ENTRY;
+ gotent_flags = ALPHA_ELF_LINK_HASH_TLS_IE;
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ break;
+
+ case R_ALPHA_TPREL64:
+ if (info->shared || maybe_dynamic)
+ need = NEED_DYNREL;
+ if (info->shared)
+ info->flags |= DF_STATIC_TLS;
+ break;
+ }
+
+ if (need & NEED_GOT)
+ {
if (!got_created)
{
if (!elf64_alpha_create_got_section (abfd, info))
got_created = 1;
}
- break;
+ }
- case R_ALPHA_SREL16:
- case R_ALPHA_SREL32:
- case R_ALPHA_SREL64:
- if (h == NULL)
- break;
- /* FALLTHRU */
+ if (need & NEED_GOT_ENTRY)
+ {
+ struct alpha_elf_got_entry *gotent;
- case R_ALPHA_REFLONG:
- case R_ALPHA_REFQUAD:
+ gotent = get_got_entry (abfd, h, r_type, r_symndx, addend);
+ if (!gotent)
+ return false;
+
+ if (gotent_flags)
+ {
+ gotent->flags |= gotent_flags;
+ if (h)
+ {
+ gotent_flags |= h->flags;
+ h->flags = gotent_flags;
+
+ /* Make a guess as to whether a .plt entry is needed. */
+ if ((gotent_flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
+ && !(gotent_flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC))
+ h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ else
+ h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+ }
+ }
+
+ if (need & NEED_DYNREL)
+ {
if (rel_sec_name == NULL)
{
rel_sec_name = (bfd_elf_string_from_elf_section
else
rent->count++;
}
- else if (info->shared && (sec->flags & SEC_ALLOC))
+ else if (info->shared)
{
/* If this is a shared library, and the section is to be
loaded into memory, we need a RELATIVE reloc. */
sreloc->_raw_size += sizeof (Elf64_External_Rela);
- if (sec->flags & SEC_READONLY)
+ if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC))
info->flags |= DF_TEXTREL;
}
- break;
}
}
&& ((h->type == STT_FUNC
&& !(ah->flags & ALPHA_ELF_LINK_HASH_LU_ADDR))
|| (h->type == STT_NOTYPE
- && ah->flags == ALPHA_ELF_LINK_HASH_LU_FUNC))
+ && (ah->flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
+ && !(ah->flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC)))
/* Don't prevent otherwise valid programs from linking by attempting
to create a new .got entry somewhere. A Correct Solution would be
to add a new .got section to a new object file and let it be merged
{
gin = gi->next;
for (gs = gsh; gs ; gs = gs->next)
- if (gi->gotobj == gs->gotobj && gi->addend == gs->addend)
- goto got_found;
+ if (gi->gotobj == gs->gotobj
+ && gi->reloc_type == gs->reloc_type
+ && gi->addend == gs->addend)
+ {
+ gi->use_count += gs->use_count;
+ goto got_found;
+ }
gi->next = hs->got_entries;
hs->got_entries = gi;
got_found:;
elf64_alpha_can_merge_gots (a, b)
bfd *a, *b;
{
- int total = alpha_elf_tdata (a)->total_got_entries;
+ int total = alpha_elf_tdata (a)->total_got_size;
bfd *bsub;
/* Trivial quick fallout test. */
- if (total + alpha_elf_tdata (b)->total_got_entries <= MAX_GOT_ENTRIES)
+ if (total + alpha_elf_tdata (b)->total_got_size <= MAX_GOT_SIZE)
return true;
/* By their nature, local .got entries cannot be merged. */
- if ((total += alpha_elf_tdata (b)->n_local_got_entries) > MAX_GOT_ENTRIES)
+ if ((total += alpha_elf_tdata (b)->local_got_size) > MAX_GOT_SIZE)
return false;
/* Failing the common trivial comparison, we must effectively
continue;
for (ae = h->got_entries; ae ; ae = ae->next)
- if (ae->gotobj == a && ae->addend == be->addend)
+ if (ae->gotobj == a
+ && ae->reloc_type == be->reloc_type
+ && ae->addend == be->addend)
goto global_found;
- if (++total > MAX_GOT_ENTRIES)
+ total += alpha_got_entry_size (be->reloc_type);
+ if (total > MAX_GOT_SIZE)
return false;
global_found:;
}
elf64_alpha_merge_gots (a, b)
bfd *a, *b;
{
- int total = alpha_elf_tdata (a)->total_got_entries;
+ int total = alpha_elf_tdata (a)->total_got_size;
bfd *bsub;
/* Remember local expansion. */
{
- int e = alpha_elf_tdata (b)->n_local_got_entries;
+ int e = alpha_elf_tdata (b)->local_got_size;
total += e;
- alpha_elf_tdata (a)->n_local_got_entries += e;
+ alpha_elf_tdata (a)->local_got_size += e;
}
for (bsub = b; bsub ; bsub = alpha_elf_tdata (bsub)->in_got_link_next)
continue;
for (ae = *start; ae ; ae = ae->next)
- if (ae->gotobj == a && ae->addend == be->addend)
+ if (ae->gotobj == a
+ && ae->reloc_type == be->reloc_type
+ && ae->addend == be->addend)
{
ae->flags |= be->flags;
ae->use_count += be->use_count;
goto global_found;
}
be->gotobj = a;
- total += 1;
+ total += alpha_got_entry_size (be->reloc_type);
global_found:;
}
alpha_elf_tdata (bsub)->gotobj = a;
}
- alpha_elf_tdata (a)->total_got_entries = total;
+ alpha_elf_tdata (a)->total_got_size = total;
/* Merge the two in_got chains. */
{
= &alpha_elf_tdata (gotent->gotobj)->got->_raw_size;
gotent->got_offset = *plge;
- *plge += 8;
+ *plge += alpha_got_entry_size (gotent->reloc_type);
}
return true;
if (gotent->use_count > 0)
{
gotent->got_offset = got_offset;
- got_offset += 8;
+ got_offset += alpha_got_entry_size (gotent->reloc_type);
}
}
/* Constructs the gots. */
static boolean
-elf64_alpha_size_got_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
+elf64_alpha_size_got_sections (info)
struct bfd_link_info *info;
{
bfd *i, *got_list, *cur_got_obj = NULL;
/* We are assuming no merging has yet ocurred. */
BFD_ASSERT (this_got == i);
- if (alpha_elf_tdata (this_got)->total_got_entries > MAX_GOT_ENTRIES)
+ if (alpha_elf_tdata (this_got)->total_got_size > MAX_GOT_SIZE)
{
/* Yikes! A single object file has too many entries. */
(*_bfd_error_handler)
(_("%s: .got subsegment exceeds 64K (size %d)"),
bfd_archive_filename (i),
- alpha_elf_tdata (this_got)->total_got_entries * 8);
+ alpha_elf_tdata (this_got)->total_got_size);
return false;
}
return true;
}
+/* Called from relax_section to rebuild the PLT in light of
+ potential changes in the function's status. */
+
+static boolean
+elf64_alpha_size_plt_section (info)
+ struct bfd_link_info *info;
+{
+ asection *splt, *spltrel;
+ unsigned long entries;
+ bfd *dynobj;
+
+ dynobj = elf_hash_table(info)->dynobj;
+ splt = bfd_get_section_by_name(dynobj, ".plt");
+ if (splt == NULL)
+ return true;
+
+ splt->_raw_size = 0;
+
+ alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+ elf64_alpha_size_plt_section_1, splt);
+
+ splt->_cooked_size = splt->_raw_size;
+
+ /* Every plt entry requires a JMP_SLOT relocation. */
+ spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
+ if (splt->_raw_size)
+ entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+ else
+ entries = 0;
+ spltrel->_raw_size = entries * sizeof (Elf64_External_Rela);
+ spltrel->_cooked_size = spltrel->_raw_size;
+
+ return true;
+}
+
+static boolean
+elf64_alpha_size_plt_section_1 (h, data)
+ struct alpha_elf_link_hash_entry *h;
+ PTR data;
+{
+ asection *splt = (asection *) data;
+ struct alpha_elf_got_entry *gotent;
+
+ /* If we didn't need an entry before, we still don't. */
+ if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT))
+ return true;
+
+ /* There must still be a LITERAL got entry for the function. */
+ for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+ if (gotent->reloc_type == R_ALPHA_LITERAL
+ && gotent->use_count > 0)
+ break;
+
+ /* If there is, reset the PLT offset. If not, there's no longer
+ a need for the PLT entry. */
+ if (gotent)
+ {
+ if (splt->_raw_size == 0)
+ splt->_raw_size = PLT_HEADER_SIZE;
+ h->root.plt.offset = splt->_raw_size;
+ splt->_raw_size += PLT_ENTRY_SIZE;
+ }
+ else
+ {
+ h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->root.plt.offset = -1;
+ }
+
+ return true;
+}
+
static boolean
elf64_alpha_always_size_sections (output_bfd, info)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
bfd *i;
elf64_alpha_merge_ind_symbols,
NULL);
- if (!elf64_alpha_size_got_sections (output_bfd, info))
+ if (!elf64_alpha_size_got_sections (info))
return false;
/* Allocate space for all of the .got subsections. */
return true;
}
+/* The number of dynamic relocations required by a static relocation. */
+
+static int
+alpha_dynamic_entries_for_reloc (r_type, dynamic, shared)
+ int r_type, dynamic, shared;
+{
+ switch (r_type)
+ {
+ /* May appear in GOT entries. */
+ case R_ALPHA_TLSGD:
+ return (dynamic ? 2 : shared ? 1 : 0);
+ case R_ALPHA_TLSLDM:
+ return shared;
+ case R_ALPHA_LITERAL:
+ return dynamic || shared;
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ return dynamic;
+
+ /* May appear in data sections. */
+ case R_ALPHA_REFLONG:
+ case R_ALPHA_REFQUAD:
+ return dynamic || shared;
+ case R_ALPHA_SREL64:
+ case R_ALPHA_TPREL64:
+ return dynamic;
+
+ /* Everything else is illegal. We'll issue an error during
+ relocate_section. */
+ default:
+ return 0;
+ }
+}
+
/* Work out the sizes of the dynamic relocation entries. */
static boolean
struct alpha_elf_link_hash_entry *h;
struct bfd_link_info *info;
{
+ boolean dynamic;
+ struct alpha_elf_reloc_entry *relent;
+ unsigned long entries;
+
if (h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
&& (h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak)
&& !(h->root.root.u.def.section->owner->flags & DYNAMIC))
- {
- h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- }
+ h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
/* If the symbol is dynamic, we'll need all the relocations in their
natural form. If this is a shared object, and it has been forced
local, we'll need the same number of RELATIVE relocations. */
- if (alpha_elf_dynamic_symbol_p (&h->root, info) || info->shared)
+ dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+
+ for (relent = h->reloc_entries; relent; relent = relent->next)
{
- struct alpha_elf_reloc_entry *relent;
- bfd *dynobj;
- struct alpha_elf_got_entry *gotent;
- bfd_size_type count;
- asection *srel;
+ entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
+ info->shared);
+ if (entries)
+ {
+ relent->srel->_raw_size +=
+ entries * sizeof (Elf64_External_Rela) * relent->count;
+ if (relent->reltext)
+ info->flags |= DT_TEXTREL;
+ }
+ }
- for (relent = h->reloc_entries; relent; relent = relent->next)
- if (relent->rtype == R_ALPHA_REFLONG
- || relent->rtype == R_ALPHA_REFQUAD)
- {
- relent->srel->_raw_size +=
- sizeof (Elf64_External_Rela) * relent->count;
- if (relent->reltext)
- info->flags |= DT_TEXTREL;
- }
+ return true;
+}
- dynobj = elf_hash_table(info)->dynobj;
- count = 0;
+/* Set the sizes of the dynamic relocation sections. */
- for (gotent = h->got_entries; gotent ; gotent = gotent->next)
- count++;
+static boolean
+elf64_alpha_size_rela_got_section (info)
+ struct bfd_link_info *info;
+{
+ unsigned long entries;
+ bfd *i, *dynobj;
+ asection *srel;
- /* If we are using a .plt entry, subtract one, as the first
- reference uses a .rela.plt entry instead. */
- if (h->root.plt.offset != MINUS_ONE)
- count--;
+ /* Shared libraries often require RELATIVE relocs, and some relocs
+ require attention for the main application as well. */
- if (count > 0)
+ entries = 0;
+ for (i = alpha_elf_hash_table(info)->got_list;
+ i ; i = alpha_elf_tdata(i)->got_link_next)
+ {
+ bfd *j;
+
+ for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next)
{
- srel = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (srel != NULL);
- srel->_raw_size += sizeof (Elf64_External_Rela) * count;
+ struct alpha_elf_got_entry **local_got_entries, *gotent;
+ int k, n;
+
+ local_got_entries = alpha_elf_tdata(j)->local_got_entries;
+ if (!local_got_entries)
+ continue;
+
+ for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k)
+ for (gotent = local_got_entries[k];
+ gotent ; gotent = gotent->next)
+ if (gotent->use_count > 0)
+ entries += (alpha_dynamic_entries_for_reloc
+ (gotent->reloc_type, 0, info->shared));
}
}
+ dynobj = elf_hash_table(info)->dynobj;
+ srel = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (!srel)
+ {
+ BFD_ASSERT (entries == 0);
+ return true;
+ }
+ srel->_raw_size = sizeof (Elf64_External_Rela) * entries;
+
+ /* Now do the non-local symbols. */
+ alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+ elf64_alpha_size_rela_got_1, info);
+
+ srel->_cooked_size = srel->_raw_size;
+
+ return true;
+}
+
+/* Subroutine of elf64_alpha_size_rela_got_section for doing the
+ global symbols. */
+
+static boolean
+elf64_alpha_size_rela_got_1 (h, info)
+ struct alpha_elf_link_hash_entry *h;
+ struct bfd_link_info *info;
+{
+ boolean dynamic;
+ struct alpha_elf_got_entry *gotent;
+ unsigned long entries;
+
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ /* If the symbol is dynamic, we'll need all the relocations in their
+ natural form. If this is a shared object, and it has been forced
+ local, we'll need the same number of RELATIVE relocations. */
+
+ dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+
+ entries = 0;
+ for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+ if (gotent->use_count > 0)
+ entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type,
+ dynamic, info->shared);
+
+ /* If we are using a .plt entry, subtract one, as the first
+ reference uses a .rela.plt entry instead. */
+ if (h->root.plt.offset != MINUS_ONE)
+ entries--;
+
+ if (entries > 0)
+ {
+ bfd *dynobj = elf_hash_table(info)->dynobj;
+ asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf64_External_Rela) * entries;
+ }
+
return true;
}
collected information in check_relocs that we can now apply to
size the dynamic relocation sections. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
- elf64_alpha_calc_dynrel_sizes,
- info);
-
- /* When building shared libraries, each local .got entry needs a
- RELATIVE reloc. */
- if (info->shared)
- {
- bfd *i;
- asection *srel;
- bfd_size_type count;
+ elf64_alpha_calc_dynrel_sizes, info);
- srel = bfd_get_section_by_name (dynobj, ".rela.got");
- BFD_ASSERT (srel != NULL);
-
- for (i = alpha_elf_hash_table(info)->got_list, count = 0;
- i != NULL;
- i = alpha_elf_tdata(i)->got_link_next)
- count += alpha_elf_tdata(i)->n_local_got_entries;
-
- srel->_raw_size += count * sizeof (Elf64_External_Rela);
- }
+ elf64_alpha_size_rela_got_section (info);
}
/* else we're not dynamic and by definition we don't need such things. */
return true;
}
+/* Relocate an Alpha ELF section for a relocatable link.
+
+ We don't have to change anything unless the reloc is against a section
+ symbol, in which case we have to adjust according to where the section
+ symbol winds up in the output section. */
+
+static boolean
+elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ unsigned long symtab_hdr_sh_info;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+ boolean ret_val = true;
+
+ symtab_hdr_sh_info = elf_tdata (input_bfd)->symtab_hdr.sh_info;
+
+ relend = relocs + input_section->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ {
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ unsigned long r_type;
+
+ r_type = ELF64_R_TYPE(rel->r_info);
+ if (r_type >= R_ALPHA_max)
+ {
+ (*_bfd_error_handler)
+ (_("%s: unknown relocation type %d"),
+ bfd_archive_filename (input_bfd), (int)r_type);
+ bfd_set_error (bfd_error_bad_value);
+ ret_val = false;
+ continue;
+ }
+
+ r_symndx = ELF64_R_SYM(rel->r_info);
+
+ /* The symbol associated with GPDISP and LITUSE is
+ immaterial. Only the addend is significant. */
+ if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
+ continue;
+
+ if (r_symndx < symtab_hdr_sh_info)
+ {
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
+ {
+ sec = local_sections[r_symndx];
+ rel->r_addend += sec->output_offset + sym->st_value;
+ }
+ }
+ }
+
+ return ret_val;
+}
+
/* Relocate an Alpha ELF section. */
static boolean
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- asection *sec, *sgot, *srel, *srelgot;
+ struct elf_link_tls_segment *tls_segment;
+ asection *sgot, *srel, *srelgot;
bfd *dynobj, *gotobj;
- bfd_vma gp;
- boolean ret_val = true;
+ bfd_vma gp, tp_base, dtp_base;
+ struct alpha_elf_got_entry **local_got_entries;
+ boolean ret_val;
+ const char *section_name;
+
+ /* Handle relocatable links with a smaller loop. */
+ if (info->relocateable)
+ return elf64_alpha_relocate_section_r (output_bfd, info, input_bfd,
+ input_section, contents, relocs,
+ local_syms, local_sections);
+
+ /* This is a final link. */
+
+ ret_val = true;
- srelgot = srel = NULL;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+
dynobj = elf_hash_table (info)->dynobj;
if (dynobj)
- {
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- }
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ else
+ srelgot = NULL;
+
+ section_name = (bfd_elf_string_from_elf_section
+ (input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
+ elf_section_data(input_section)->rel_hdr.sh_name));
+ BFD_ASSERT(section_name != NULL);
+ srel = bfd_get_section_by_name (dynobj, section_name);
/* Find the gp value for this input bfd. */
- sgot = NULL;
- gp = 0;
gotobj = alpha_elf_tdata (input_bfd)->gotobj;
if (gotobj)
{
_bfd_set_gp_value (gotobj, gp);
}
}
+ else
+ {
+ sgot = NULL;
+ gp = 0;
+ }
+
+ local_got_entries = alpha_elf_tdata(input_bfd)->local_got_entries;
+
+ tls_segment = elf_hash_table (info)->tls_segment;
+ if (tls_segment)
+ {
+ dtp_base = alpha_get_dtprel_base (tls_segment);
+ tp_base = alpha_get_tprel_base (tls_segment);
+ }
+ else
+ dtp_base = tp_base = 0;
- rel = relocs;
relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
+ for (rel = relocs; rel < relend; rel++)
{
- int r_type;
+ struct alpha_elf_link_hash_entry *h = NULL;
+ struct alpha_elf_got_entry *gotent;
+ bfd_reloc_status_type r;
reloc_howto_type *howto;
unsigned long r_symndx;
- struct alpha_elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
- bfd_vma relocation;
+ Elf_Internal_Sym *sym = NULL;
+ asection *sec = NULL;
+ bfd_vma value;
bfd_vma addend;
- bfd_reloc_status_type r;
+ boolean dynamic_symbol_p;
+ boolean undef_weak_ref = false;
+ unsigned long r_type;
r_type = ELF64_R_TYPE(rel->r_info);
- if (r_type < 0 || r_type >= (int) R_ALPHA_max)
+ if (r_type >= R_ALPHA_max)
{
+ (*_bfd_error_handler)
+ (_("%s: unknown relocation type %d"),
+ bfd_archive_filename (input_bfd), (int)r_type);
bfd_set_error (bfd_error_bad_value);
- return false;
+ ret_val = false;
+ continue;
}
- howto = elf64_alpha_howto_table + r_type;
+ howto = elf64_alpha_howto_table + r_type;
r_symndx = ELF64_R_SYM(rel->r_info);
- if (info->relocateable)
+ if (r_symndx < symtab_hdr->sh_info)
{
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
-
- /* The symbol associated with GPDISP and LITUSE is
- immaterial. Only the addend is significant. */
- if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
- continue;
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
- if (r_symndx < symtab_hdr->sh_info)
+ if (local_got_entries)
+ gotent = local_got_entries[r_symndx];
+ else
+ gotent = NULL;
+
+ /* Need to adjust local GOT entries' addends for SEC_MERGE
+ unless it has been done already. */
+ if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION
+ && (elf_section_data (sec)->sec_info_type
+ == ELF_INFO_TYPE_MERGE)
+ && gotent
+ && !gotent->reloc_xlated)
{
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
+ struct alpha_elf_got_entry *ent;
+ asection *msec;
+
+ for (ent = gotent; ent; ent = ent->next)
{
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
+ ent->reloc_xlated = 1;
+ if (ent->use_count == 0)
+ continue;
+ msec = sec;
+ ent->addend =
+ _bfd_merged_section_offset (output_bfd, &msec,
+ elf_section_data (sec)->
+ sec_info,
+ sym->st_value + ent->addend,
+ (bfd_vma) 0);
+ ent->addend -= sym->st_value;
+ ent->addend += msec->output_section->vma
+ + msec->output_offset
+ - sec->output_section->vma
+ - sec->output_offset;
}
}
- continue;
- }
-
- /* This is a final link. */
-
- h = NULL;
- sym = NULL;
- sec = NULL;
-
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ dynamic_symbol_p = false;
}
else
{
|| h->root.root.type == bfd_link_hash_warning)
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+ 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;
- if (sec->output_section == NULL)
- relocation = 0;
- else
- {
- relocation = (h->root.root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
+ /* 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)
- relocation = 0;
+ undef_weak_ref = true;
else if (info->shared
&& (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
- relocation = 0;
+ ;
else
{
if (!((*info->callbacks->undefined_symbol)
input_section, rel->r_offset,
(!info->shared || info->no_undefined
|| ELF_ST_VISIBILITY (h->root.other)))))
- ret_val = false;
- relocation = 0;
+ return false;
+ ret_val = false;
+ continue;
}
+
+ dynamic_symbol_p = alpha_elf_dynamic_symbol_p (&h->root, info);
+ gotent = h->got_entries;
}
+
addend = rel->r_addend;
+ value += addend;
+
+ /* Search for the proper got entry. */
+ for (; gotent ; gotent = gotent->next)
+ if (gotent->gotobj == gotobj
+ && gotent->reloc_type == r_type
+ && gotent->addend == addend)
+ break;
switch (r_type)
{
BFD_ASSERT(gp != 0);
- relocation = (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
+ value = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
- p_ldah = contents + rel->r_offset - input_section->vma;
+ p_ldah = contents + rel->r_offset;
p_lda = p_ldah + rel->r_addend;
- r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - relocation,
+ r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - value,
p_ldah, p_lda);
}
break;
case R_ALPHA_LITERAL:
- {
- struct alpha_elf_got_entry *gotent;
- boolean dynamic_symbol;
-
- BFD_ASSERT(sgot != NULL);
- BFD_ASSERT(gp != 0);
-
- if (h != NULL)
- {
- gotent = h->got_entries;
- dynamic_symbol = alpha_elf_dynamic_symbol_p (&h->root, info);
- }
- else
- {
- gotent = (alpha_elf_tdata(input_bfd)->
- local_got_entries[r_symndx]);
- dynamic_symbol = false;
-
- /* Need to adjust local GOT entries' addends for SEC_MERGE
- unless it has been done already. */
- if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION
- && (elf_section_data (sec)->sec_info_type
- == ELF_INFO_TYPE_MERGE)
- && (gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED) == 0)
- {
- struct alpha_elf_got_entry *ent;
- asection *msec;
-
- for (ent = gotent; ent; ent = ent->next)
- {
- ent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED;
- if (ent->use_count == 0)
- continue;
- msec = sec;
- ent->addend =
- _bfd_merged_section_offset (output_bfd, &msec,
- elf_section_data (sec)->
- sec_info,
- sym->st_value
- + ent->addend,
- (bfd_vma) 0);
- ent->addend -= sym->st_value;
- ent->addend += msec->output_section->vma
- + msec->output_offset
- - sec->output_section->vma
- - sec->output_offset;
- }
- }
- }
+ BFD_ASSERT(sgot != NULL);
+ BFD_ASSERT(gp != 0);
+ BFD_ASSERT(gotent != NULL);
+ BFD_ASSERT(gotent->use_count >= 1);
- BFD_ASSERT(gotent != NULL);
+ if (!gotent->reloc_done)
+ {
+ gotent->reloc_done = 1;
- while (gotent->gotobj != gotobj || gotent->addend != addend)
- gotent = gotent->next;
+ bfd_put_64 (output_bfd, value,
+ sgot->contents + gotent->got_offset);
- BFD_ASSERT(gotent->use_count >= 1);
+ /* If the symbol has been forced local, output a
+ RELATIVE reloc, otherwise it will be handled in
+ finish_dynamic_symbol. */
+ if (info->shared && !dynamic_symbol_p)
+ {
+ Elf_Internal_Rela outrel;
- /* Initialize the .got entry's value. */
- if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE))
- {
- bfd_put_64 (output_bfd, relocation + addend,
- sgot->contents + gotent->got_offset);
+ BFD_ASSERT(srelgot != NULL);
- /* If the symbol has been forced local, output a
- RELATIVE reloc, otherwise it will be handled in
- finish_dynamic_symbol. */
- if (info->shared && !dynamic_symbol)
- {
- Elf_Internal_Rela outrel;
-
- BFD_ASSERT(srelgot != NULL);
-
- outrel.r_offset = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
- outrel.r_addend = relocation + addend;
-
- bfd_elf64_swap_reloca_out (output_bfd, &outrel,
- ((Elf64_External_Rela *)
- srelgot->contents)
- + srelgot->reloc_count++);
- BFD_ASSERT (sizeof (Elf64_External_Rela)
- * srelgot->reloc_count
- <= srelgot->_cooked_size);
- }
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
+ outrel.r_addend = value;
- gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
- }
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ ((Elf64_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count++);
+ BFD_ASSERT (sizeof (Elf64_External_Rela)
+ * srelgot->reloc_count
+ <= srelgot->_cooked_size);
+ }
+ }
- /* Figure the gprel relocation. */
- addend = 0;
- relocation = (sgot->output_section->vma
- + sgot->output_offset
- + gotent->got_offset);
- relocation -= gp;
- }
- /* overflow handled by _bfd_final_link_relocate */
+ value = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ value -= gp;
goto default_reloc;
case R_ALPHA_GPREL16:
case R_ALPHA_GPREL32:
case R_ALPHA_GPRELLOW:
- if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+ if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
ret_val = false;
}
BFD_ASSERT(gp != 0);
- relocation -= gp;
+ value -= gp;
goto default_reloc;
case R_ALPHA_GPRELHIGH:
- if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+ if (dynamic_symbol_p)
{
(*_bfd_error_handler)
(_("%s: gp-relative relocation against dynamic symbol %s"),
ret_val = false;
}
BFD_ASSERT(gp != 0);
- relocation -= gp;
- relocation += addend;
- addend = 0;
- relocation = (((bfd_signed_vma) relocation >> 16)
- + ((relocation >> 15) & 1));
+ value -= gp;
+ value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
goto default_reloc;
case R_ALPHA_HINT:
/* A call to a dynamic symbol is definitely out of range of
the 16-bit displacement. Don't bother writing anything. */
- if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+ if (dynamic_symbol_p)
{
r = bfd_reloc_ok;
break;
}
- /* FALLTHRU */
+ /* The regular PC-relative stuff measures from the start of
+ the instruction rather than the end. */
+ value -= 4;
+ goto default_reloc;
case R_ALPHA_BRADDR:
+ if (dynamic_symbol_p)
+ {
+ (*_bfd_error_handler)
+ (_("%s: pc-relative relocation against dynamic symbol %s"),
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
+ ret_val = false;
+ }
/* The regular PC-relative stuff measures from the start of
the instruction rather than the end. */
- addend -= 4;
+ value -= 4;
goto default_reloc;
case R_ALPHA_BRSGP:
/* The regular PC-relative stuff measures from the start of
the instruction rather than the end. */
- addend -= 4;
+ value -= 4;
/* The source and destination gp must be the same. Note that
the source will always have an assigned gp, since we forced
one in check_relocs, but that the destination may not, as
- it might not have had any relocations at all. Also take
+ it might not have had any relocations at all. Also take
care not to crash if H is an undefined symbol. */
if (h != NULL && sec != NULL
&& alpha_elf_tdata (sec->owner)->gotobj
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
+ case R_ALPHA_DTPREL64:
+ case R_ALPHA_TPREL64:
{
Elf_Internal_Rela outrel;
/* Careful here to remember RELATIVE relocations for global
variables for symbolic shared objects. */
- if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+ if (dynamic_symbol_p)
{
BFD_ASSERT(h->root.dynindx != -1);
- outrel.r_info = ELF64_R_INFO(h->root.dynindx, r_type);
+ outrel.r_info = ELF64_R_INFO (h->root.dynindx, r_type);
outrel.r_addend = addend;
- addend = 0, relocation = 0;
+ addend = 0, value = 0;
+ }
+ else if (r_type == R_ALPHA_DTPREL64)
+ {
+ BFD_ASSERT(tls_segment != NULL);
+ value -= dtp_base;
+ goto default_reloc;
+ }
+ else if (r_type == R_ALPHA_TPREL64)
+ {
+ BFD_ASSERT(tls_segment != NULL);
+ value -= dtp_base;
+ goto default_reloc;
}
else if (info->shared
&& r_symndx != 0
&& (input_section->flags & SEC_ALLOC))
{
- outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
- outrel.r_addend = relocation + addend;
+ if (r_type == R_ALPHA_REFLONG)
+ {
+ (*_bfd_error_handler)
+ (_("%s: unhandled dynamic relocation against %s"),
+ bfd_archive_filename (input_bfd),
+ h->root.root.root.string);
+ ret_val = false;
+ }
+ outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
+ outrel.r_addend = value;
}
else
goto default_reloc;
- if (!srel)
- {
- const char *name;
-
- name = (bfd_elf_string_from_elf_section
- (input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
- elf_section_data(input_section)->rel_hdr.sh_name));
- BFD_ASSERT(name != NULL);
-
- srel = bfd_get_section_by_name (dynobj, name);
- BFD_ASSERT(srel != NULL);
- }
+ BFD_ASSERT(srel != NULL);
outrel.r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section,
}
goto default_reloc;
+ case R_ALPHA_SREL16:
case R_ALPHA_SREL32:
case R_ALPHA_SREL64:
+ if (dynamic_symbol_p)
+ {
+ (*_bfd_error_handler)
+ (_("%s: pc-relative relocation against dynamic symbol %s"),
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
+ ret_val = false;
+ }
+
/* ??? .eh_frame references to discarded sections will be smashed
to relocations against SHN_UNDEF. The .eh_frame format allows
NULL to be encoded as 0 in any format, so this works here. */
+ (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG));
goto default_reloc;
+ case R_ALPHA_TLSLDM:
+ /* Ignore the symbol for the relocation. The result is always
+ the current module. */
+ dynamic_symbol_p = 0;
+ /* FALLTHRU */
+
+ case R_ALPHA_TLSGD:
+ if (!gotent->reloc_done)
+ {
+ gotent->reloc_done = 1;
+
+ /* Note that the module index for the main program is 1. */
+ bfd_put_64 (output_bfd, !info->shared && !dynamic_symbol_p,
+ sgot->contents + gotent->got_offset);
+
+ /* If the symbol has been forced local, output a
+ DTPMOD64 reloc, otherwise it will be handled in
+ finish_dynamic_symbol. */
+ if (info->shared && !dynamic_symbol_p)
+ {
+ Elf_Internal_Rela outrel;
+
+ BFD_ASSERT(srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ /* ??? Proper dynindx here. */
+ outrel.r_info = ELF64_R_INFO (0, R_ALPHA_DTPMOD64);
+ outrel.r_addend = 0;
+
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ ((Elf64_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count++);
+ BFD_ASSERT (sizeof (Elf64_External_Rela)
+ * srelgot->reloc_count
+ <= srelgot->_cooked_size);
+ }
+
+ if (dynamic_symbol_p || r_type == R_ALPHA_TLSLDM)
+ value = 0;
+ else
+ {
+ BFD_ASSERT(tls_segment != NULL);
+ value -= dtp_base;
+ }
+ bfd_put_64 (output_bfd, value,
+ sgot->contents + gotent->got_offset + 8);
+ }
+
+ value = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ value -= gp;
+ goto default_reloc;
+
+ case R_ALPHA_DTPRELHI:
+ case R_ALPHA_DTPRELLO:
+ case R_ALPHA_DTPREL16:
+ if (dynamic_symbol_p)
+ {
+ (*_bfd_error_handler)
+ (_("%s: dtp-relative relocation against dynamic symbol %s"),
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
+ ret_val = false;
+ }
+ BFD_ASSERT(tls_segment != NULL);
+ value -= dtp_base;
+ if (r_type == R_ALPHA_DTPRELHI)
+ value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
+ goto default_reloc;
+
+ case R_ALPHA_TPRELHI:
+ case R_ALPHA_TPRELLO:
+ case R_ALPHA_TPREL16:
+ if (info->shared)
+ {
+ (*_bfd_error_handler)
+ (_("%s: TLS local exec code cannot be linked into shared objects"),
+ bfd_archive_filename (input_bfd));
+ ret_val = false;
+ }
+ else if (dynamic_symbol_p)
+ {
+ (*_bfd_error_handler)
+ (_("%s: tp-relative relocation against dynamic symbol %s"),
+ bfd_archive_filename (input_bfd), h->root.root.root.string);
+ ret_val = false;
+ }
+ BFD_ASSERT(tls_segment != NULL);
+ value -= tp_base;
+ if (r_type == R_ALPHA_TPRELHI)
+ value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
+ goto default_reloc;
+
+ case R_ALPHA_GOTDTPREL:
+ case R_ALPHA_GOTTPREL:
+ BFD_ASSERT(sgot != NULL);
+ BFD_ASSERT(gp != 0);
+ BFD_ASSERT(gotent != NULL);
+ BFD_ASSERT(gotent->use_count >= 1);
+
+ if (!gotent->reloc_done)
+ {
+ gotent->reloc_done = 1;
+
+ if (dynamic_symbol_p)
+ value = 0;
+ else
+ {
+ BFD_ASSERT(tls_segment != NULL);
+ value -= (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+ }
+ bfd_put_64 (output_bfd, value,
+ sgot->contents + gotent->got_offset);
+ }
+
+ value = (sgot->output_section->vma
+ + sgot->output_offset
+ + gotent->got_offset);
+ value -= gp;
+ goto default_reloc;
+
default:
default_reloc:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, relocation,
- addend);
+ contents, rel->r_offset, value, 0);
break;
}
srel = bfd_get_section_by_name (dynobj, ".rela.got");
BFD_ASSERT (srel != NULL);
- outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_GLOB_DAT);
for (gotent = ((struct alpha_elf_link_hash_entry *) h)->got_entries;
gotent != NULL;
gotent = gotent->next)
{
- asection *sgot = alpha_elf_tdata (gotent->gotobj)->got;
+ asection *sgot;
+ int r_type;
+
+ if (gotent->use_count == 0)
+ continue;
+
+ sgot = alpha_elf_tdata (gotent->gotobj)->got;
outrel.r_offset = (sgot->output_section->vma
+ sgot->output_offset
+ gotent->got_offset);
+
+ r_type = gotent->reloc_type;
+ switch (r_type)
+ {
+ case R_ALPHA_LITERAL:
+ r_type = R_ALPHA_GLOB_DAT;
+ break;
+ case R_ALPHA_TLSGD:
+ r_type = R_ALPHA_DTPMOD64;
+ break;
+ case R_ALPHA_GOTDTPREL:
+ r_type = R_ALPHA_DTPREL64;
+ break;
+ case R_ALPHA_GOTTPREL:
+ r_type = R_ALPHA_TPREL64;
+ break;
+ case R_ALPHA_TLSLDM:
+ default:
+ abort ();
+ }
+
+ outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
outrel.r_addend = gotent->addend;
bfd_elf64_swap_reloca_out (output_bfd, &outrel,
((Elf64_External_Rela *)srel->contents
+ srel->reloc_count++));
+
+ if (gotent->reloc_type == R_ALPHA_TLSGD)
+ {
+ outrel.r_offset += 8;
+ outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_DTPREL64);
+
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ ((Elf64_External_Rela *)srel->contents
+ + srel->reloc_count++));
+ }
+
BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
<= srel->_cooked_size);
}
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
bfd_elf64_write_relocs,
+ bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
bfd_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
PARAMS ((bfd *));
static boolean elf64_hppa_section_from_shdr
- PARAMS ((bfd *, Elf64_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf64_Internal_Shdr *, const char *));
static void elf64_hppa_post_process_headers
PARAMS ((bfd *, struct bfd_link_info *));
elf64_hppa_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf64_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
i < symtab_hdr->sh_info;
i++, esym++, isym++, shndx = (shndx != NULL ? shndx + 1 : NULL))
{
- bfd_elf64_swap_symbol_in (abfd, esym, shndx, isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ isym);
if (isym->st_shndx > highest_shndx)
highest_shndx = isym->st_shndx;
}
/* We never need an opd entry for a symbol which is not
defined by this output file. */
- if (h && h->root.type == bfd_link_hash_undefined)
+ if (h && (h->root.type == bfd_link_hash_undefined
+ || h->root.u.def.section->output_section == NULL))
dyn_h->want_opd = 0;
/* If we are creating a shared library, took the address of a local
else if (x->info->shared
|| h == NULL
|| h->dynindx == -1
- || ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && h->root.u.def.section->output_section != NULL))
+ || (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
{
/* If we are creating a shared library, then we will have to
create a runtime relocation for the symbol to properly
for (rent = dyn_h->reloc_entries; rent; rent = rent->next)
{
- switch (rent->type)
- {
- case R_PARISC_FPTR64:
- /* Allocate one iff we are not building a shared library and
- !want_opd, which by this point will be true only if we're
- actually allocating one statically in the main executable. */
- if (!x->info->shared && dyn_h->want_opd)
- continue;
- break;
- }
+ /* Allocate one iff we are building a shared library, the relocation
+ isn't a R_PARISC_FPTR64, or we don't want an opd entry. */
+ if (!shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
+ continue;
+
hppa_info->other_rel_sec->_raw_size += sizeof (Elf64_External_Rela);
/* Make sure this symbol gets into the dynamic symbol table if it is
if (strcmp (name, ".plt") == 0)
{
+ /* Strip this section if we don't need it; see the comment below. */
if (s->_raw_size == 0)
{
- /* Strip this section if we don't need it; see the
- comment below. */
strip = true;
}
else
}
else if (strcmp (name, ".dlt") == 0)
{
+ /* Strip this section if we don't need it; see the comment below. */
if (s->_raw_size == 0)
{
- /* Strip this section if we don't need it; see the
- comment below. */
strip = true;
}
}
else if (strcmp (name, ".opd") == 0)
{
+ /* Strip this section if we don't need it; see the comment below. */
if (s->_raw_size == 0)
{
- /* Strip this section if we don't need it; see the
- comment below. */
strip = true;
}
}
- else if (strncmp (name, ".rela", 4) == 0)
+ else if (strncmp (name, ".rela", 5) == 0)
{
+ /* If we don't need this section, strip it from the output file.
+ This is mostly to handle .rela.bss and .rela.plt. We must
+ create both sections in create_dynamic_sections, because they
+ must be created before the linker maps input sections to output
+ sections. The linker does that before adjust_dynamic_symbol
+ is called, and it is that function which decides whether
+ anything needs to go into these sections. */
if (s->_raw_size == 0)
{
/* If we don't need this section, strip it from the
spltrel = hppa_info->plt_rel_sec;
sdltrel = hppa_info->dlt_rel_sec;
- BFD_ASSERT (stub != NULL && splt != NULL
- && sopd != NULL && sdlt != NULL)
-
/* Incredible. It is actually necessary to NOT use the symbol's real
value when building the dynamic symbol table for a shared library.
At least for symbols that refer to functions.
the original values (in elf64_hppa_link_output_symbol_hook). */
if (dyn_h && dyn_h->want_opd)
{
+ BFD_ASSERT (sopd != NULL)
+
/* Save away the original value and section index so that we
can restore them later. */
dyn_h->st_value = sym->st_value;
bfd_vma value;
Elf_Internal_Rela rel;
+ BFD_ASSERT (splt != NULL && spltrel != NULL)
+
/* We do not actually care about the value in the PLT entry
if we are creating a shared library and the symbol is
still undefined, we create a dynamic relocation to fill
int insn;
unsigned int max_offset;
+ BFD_ASSERT (stub != NULL)
+
/* Install the generic stub template.
We are modifying the contents of the stub section, so we do not
{
struct bfd_link_info *info = (struct bfd_link_info *)data;
struct elf64_hppa_link_hash_table *hppa_info;
- struct elf_link_hash_entry *h = dyn_h->h;
+ struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL;
asection *sopd;
asection *sopdrel;
sopd = hppa_info->opd_sec;
sopdrel = hppa_info->opd_rel_sec;
- if (h && dyn_h && dyn_h->want_opd)
+ if (h && dyn_h->want_opd)
{
bfd_vma value;
struct bfd_link_info *info = (struct bfd_link_info *)data;
struct elf64_hppa_link_hash_table *hppa_info;
asection *sdlt, *sdltrel;
- struct elf_link_hash_entry *h = dyn_h->h;
+ struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL;
hppa_info = elf64_hppa_hash_table (info);
address, so there is no need to create a relocation. Just install
the proper value into the DLT, note this shortcut can not be
skipped when building a shared library. */
- if (! info->shared && h && dyn_h && dyn_h->want_dlt)
+ if (! info->shared && h && dyn_h->want_dlt)
{
bfd_vma value;
+ hppa_info->opd_sec->output_offset
+ hppa_info->opd_sec->output_section->vma);
}
- else
+ else if (h->root.u.def.section)
{
- value = (h->root.u.def.value
- + h->root.u.def.section->output_offset);
-
+ value = h->root.u.def.value + h->root.u.def.section->output_offset;
if (h->root.u.def.section->output_section)
value += h->root.u.def.section->output_section->vma;
else
value += h->root.u.def.section->vma;
}
+ else
+ /* We have an undefined function reference. */
+ value = 0;
/* We do not need to include the output offset of the DLT section
here because we are modifying the in-memory contents. */
{
Elf64_Internal_Rela rel;
- switch (rent->type)
- {
- case R_PARISC_FPTR64:
- /* Allocate one iff we are not building a shared library and
- !want_opd, which by this point will be true only if we're
- actually allocating one statically in the main executable. */
- if (!info->shared && dyn_h->want_opd)
- continue;
- break;
- }
+ /* Allocate one iff we are building a shared library, the relocation
+ isn't a R_PARISC_FPTR64, or we don't want an opd entry. */
+ if (!info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
+ continue;
/* Create a dynamic relocation for this entry.
We use a section symbol recorded by check_relocs as the
base symbol for the relocation. The addend is the difference
between the section symbol and the address of the .opd entry. */
- if (info->shared && rent->type == R_PARISC_FPTR64)
+ if (info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
{
bfd_vma value, value2;
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
bfd_elf64_write_relocs,
+ bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
bfd_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
{
for (i = 0; i < count; i++, sym++)
{
- register CONST char *name;
+ register const char *name;
name = bfd_asymbol_name (*sym);
if (*name == '_' && strcmp (name, "_gp") == 0)
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
mips_elf64_write_relocs,
+ bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
mips_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
#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_hide_symbol _bfd_mips_elf_hide_symbol
+#define elf_backend_ignore_discarded_relocs \
+ _bfd_mips_elf_ignore_discarded_relocs
#define elf_backend_mips_irix_compat elf64_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf64_rtype_to_howto
#define elf_backend_ecoff_debug_swap &mips_elf64_ecoff_debug_swap
value += addr;
break;
}
- /* FALLTHROUGH. */
+ /* FALLTHROUGH. */
case R_MMIX_ADDR19:
case R_MMIX_ADDR27:
/* These must be in range, or else we emit an error. */
if (r1->value != r2->value)
return r1->value > r2->value ? 1 : -1;
- /* As a last re-sort, use the address so we get a stable sort. */
- return r1 > r2 ? 1 : (r1 < r2 ? -1 : 0);
+ /* As a last re-sort, use the relocation number, so we get a stable
+ sort. The *addresses* aren't stable since items are swapped during
+ sorting. It depends on the qsort implementation if this actually
+ happens. */
+ return r1->bpo_reloc_no > r2->bpo_reloc_no
+ ? 1 : (r1->bpo_reloc_no < r2->bpo_reloc_no ? -1 : 0);
}
/* For debug use only. Dumps the global register allocations resulting
esym = extsyms + ELF64_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf
? ELF64_R_SYM (irel->r_info) : 0);
- bfd_elf64_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elf64_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type ppc64_elf_unhandled_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static void ppc64_elf_get_symbol_info
+ PARAMS ((bfd *, asymbol *, symbol_info *));
static boolean ppc64_elf_set_private_flags
PARAMS ((bfd *, flagword));
static boolean ppc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean ppc64_elf_section_from_shdr
- PARAMS ((bfd *, Elf64_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf64_Internal_Shdr *, const char *));
/* The name of the dynamic interpreter. This is put in the .interp
#define CROR_151515 0x4def7b82
#define CROR_313131 0x4ffffb82
-/* .glink entries for the first 32k functions are two instructions. */
+/* .glink entries for the first 32k functions are two instructions. */
#define LI_R0_0 0x38000000 /* li %r0,0 */
#define B_DOT 0x48000000 /* b . */
32, /* bitsize */
true, /* pc_relative */
0, /* bitpos */
- /* FIXME: Verify. Was complain_overflow_bitfield. */
+ /* FIXME: Verify. Was complain_overflow_bitfield. */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_REL32", /* name */
0xffffffffffffffff, /* dst_mask */
true), /* pcrel_offset */
- /* 64-bit relocation to the symbol's procedure linkage table. */
+ /* 64-bit relocation to the symbol's procedure linkage table. */
HOWTO (R_PPC64_PLT64, /* type */
0, /* rightshift */
4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
/* Adjust the addend for sign extension of the low 16 bits.
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
octets = reloc_entry->address * bfd_octets_per_byte (abfd);
r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type;
if (r_type == R_PPC64_ADDR14_BRTAKEN
|| r_type == R_PPC64_REL14_BRTAKEN)
- insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
+ insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
if (is_power4)
{
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
/* Subtract the symbol section base address. */
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
/* Subtract the symbol section base address. */
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
call the generic function. Any adjustment will be done at final
link time. */
if (output_bfd != NULL)
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
if (error_message != NULL)
return bfd_reloc_dangerous;
}
+/* Return symbol info as per usual for ELF targets, except that
+ symbols in .opd are given 'd' or 'D' for type. */
+
+static void
+ppc64_elf_get_symbol_info (abfd, symbol, ret)
+ bfd *abfd;
+ asymbol *symbol;
+ symbol_info *ret;
+{
+ _bfd_elf_get_symbol_info (abfd, symbol, ret);
+ if (ret->type == '?'
+ && (symbol->flags & (BSF_GLOBAL | BSF_LOCAL)) != 0
+ && strcmp (symbol->section->name, ".opd") == 0)
+ ret->type = (symbol->flags & BSF_GLOBAL) != 0 ? 'D' : 'd';
+}
+
/* Function to set whether a module needs the -mrelocatable bit set. */
static boolean
elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
/* The output is -mrelocatable iff it can't be -mrelocatable-lib,
- but each input file is either -mrelocatable or -mrelocatable-lib. */
+ but each input file is either -mrelocatable or -mrelocatable-lib. */
if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
&& (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
&& (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
ppc64_elf_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf64_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
flagword flags;
case R_PPC64_PLT32:
case R_PPC64_PLT64:
/* This symbol requires a procedure linkage table entry. We
- actually build the entry in adjust_dynamic_symbol,
- because this might be a case of linking PIC code without
- linking in any dynamic objects, in which case we don't
- need to generate a procedure linkage table after all. */
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code without
+ linking in any dynamic objects, in which case we don't
+ need to generate a procedure linkage table after all. */
if (h == NULL)
{
/* It does not make sense to have a procedure linkage
- table entry for a local symbol. */
+ table entry for a local symbol. */
bfd_set_error (bfd_error_bad_value);
return false;
}
continue;
}
+ /* .plt is in the bss section. We don't initialise it. */
+ if ((s->flags & SEC_LOAD) == 0)
+ continue;
+
/* Allocate memory for the section contents. We use bfd_zalloc
here in case unused entries are not reclaimed before the
section's contents are written out. This should not happen,
/* Set up various things so that we can make a list of input sections
for each output section included in the link. Returns -1 on error,
- 0 when no stubs will be needed, and 1 on success. */
+ 0 when no stubs will be needed, and 1 on success. */
int
ppc64_elf_setup_section_lists (output_bfd, info)
isym = local_syms, shndx = shndx_buf;
esym < end_sy;
esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
- bfd_elf64_swap_symbol_in (input_bfd, esym, shndx, isym);
+ bfd_elf64_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isym);
/* Now we can free the external symbols. */
free (shndx_buf);
/* Branch taken prediction relocations. */
case R_PPC64_ADDR14_BRTAKEN:
case R_PPC64_REL14_BRTAKEN:
- insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
- /* Fall thru. */
+ insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
+ /* Fall thru. */
/* Branch not taken prediction relocations. */
case R_PPC64_ADDR14_BRNTAKEN:
relocate = true;
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
{
- if (is_opd && h != NULL && info->shared)
+ if (is_opd && h != NULL)
{
/* Lie about opd entries. This case occurs
when building shared libraries and we
reference a function in another shared
- lib. In that case we won't use the opd
+ lib. The same thing happens for a weak
+ definition in an application that's
+ overridden by a strong definition in a
+ shared lib. (I believe this is a generic
+ bug in binutils handling of weak syms.)
+ In these cases we won't use the opd
entry in this lib; We ought to edit the
opd section to remove unused entries. */
unresolved_reloc = false;
Elf64_External_Rela *loc;
/* This symbol has an entry in the procedure linkage table. Set
- it up. */
+ it up. */
if (htab->splt == NULL
|| htab->srelplt == NULL
Elf64_External_Rela *loc;
/* This symbol has an entry in the global offset table. Set it
- up. */
+ up. */
if (htab->sgot == NULL || htab->srelgot == NULL)
abort ();
#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
+#define bfd_elf64_get_symbol_info ppc64_elf_get_symbol_info
#define elf_backend_section_from_shdr ppc64_elf_section_from_shdr
#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
- (although we could actually do it here). */
+ (although we could actually do it here). */
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
bfd_elf64_write_relocs,
+ bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
bfd_elf64_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
static boolean sh64_elf64_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
const char **, flagword *, asection **, bfd_vma *));
-extern boolean sh64_elf64_link_output_symbol_hook
+static boolean sh64_elf64_link_output_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
asection *));
static boolean sh64_elf64_fake_sections
return bfd_reloc_undefined;
if (bfd_is_com_section (symbol_in->section))
- sym_value = 0;
- else
+ sym_value = 0;
+ else
sym_value = (symbol_in->value +
symbol_in->section->output_section->vma +
symbol_in->section->output_offset);
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. */
+ sec->output_section will be NULL. */
if (r_type == R_SH_GOTPC_LOW16
|| r_type == R_SH_GOTPC_MEDLOW16
|| r_type == R_SH_GOTPC_MEDHI16
skip = true;
else if (outrel.r_offset == (bfd_vma) -2)
skip = true, relocate = true;
-
+
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
{
asection *isec;
- bfd_elf64_swap_symbol_in (input_bfd, esym, shndx, isymp);
+ bfd_elf64_swap_symbol_in (input_bfd, (const PTR) esym,
+ (const PTR) shndx, isymp);
if (isymp->st_shndx == SHN_UNDEF)
isec = bfd_und_section_ptr;
}
else
{
- if (!(elf_bad_symtab (abfd)
- && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
- && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
- && sym->st_shndx != SHN_COMMON))
- return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return NULL;
/* Look through the relocs for a section during the first phase.
Since we don't do .gots or .plts, we just need to consider the
virtual table relocs for gc. */
-
+
static boolean
sh_elf64_check_relocs (abfd, info, sec, relocs)
bfd *abfd;
sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym);
if (!elf_bad_symtab (abfd))
sym_hashes_end -= symtab_hdr->sh_info;
-
+
dynobj = elf_hash_table (info)->dynobj;
local_got_offsets = elf_local_got_offsets (abfd);
{
struct elf_link_hash_entry *h;
unsigned long r_symndx;
-
+
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
h = NULL;
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
+
/* Some relocs require a global offset table. */
if (dynobj == NULL)
{
if (!_bfd_elf64_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return false;
break;
-
+
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_SH_GNU_VTENTRY:
break;
}
}
-
+
return true;
}
we don't need to look up and make sure to emit the main symbol for each
DataLabel symbol. */
-boolean
+static boolean
sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
return true;
}
else if (*namep && **namep
- && info->hash->creator->flavour == bfd_target_elf_flavour)
+ && info->hash->creator == abfd->xvec)
{
int i;
struct sparc64_elf_app_reg *p;
bfd_elf64_write_out_phdrs,
bfd_elf64_write_shdrs_and_ehdr,
sparc64_elf_write_relocs,
+ bfd_elf64_swap_symbol_in,
bfd_elf64_swap_symbol_out,
sparc64_elf_slurp_reloc_table,
bfd_elf64_slurp_symbol_table,
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void elf64_x86_64_info_to_howto
PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *));
-static boolean elf64_x86_64_grok_prstatus
+static boolean elf64_x86_64_grok_prstatus
PARAMS ((bfd *, Elf_Internal_Note *));
-static boolean elf64_x86_64_grok_psinfo
+static boolean elf64_x86_64_grok_psinfo
PARAMS ((bfd *, Elf_Internal_Note *));
static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create
PARAMS ((bfd *));
case 336: /* sizeof(istruct elf_prstatus) on Linux/x86_64 */
/* pr_cursig */
- elf_tdata (abfd)->core_signal
+ elf_tdata (abfd)->core_signal
= bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
- elf_tdata (abfd)->core_pid
+ elf_tdata (abfd)->core_pid
= bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
/* We must generate a R_X86_64_COPY reloc to tell the dynamic linker
to copy the initial value out of the dynamic object and into the
- runtime process image. */
+ runtime process image. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
/* 32-bit ELF support for ARM old abi option.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define OLD_ARM_ABI
+#define bfd_elf32_arm_allocate_interworking_sections \
+ bfd_elf32_arm_oabi_allocate_interworking_sections
+#define bfd_elf32_arm_get_bfd_for_interworking \
+ bfd_elf32_arm_oabi_get_bfd_for_interworking
+#define bfd_elf32_arm_process_before_allocation \
+ bfd_elf32_arm_oabi_process_before_allocation
+#define bfd_elf32_arm_add_glue_sections_to_bfd \
+ bfd_elf32_arm_oabi_add_glue_sections_to_bfd
#include "elf/arm.h"
#include "bfd.h"
return NULL;
}
-#define bfd_elf32_arm_allocate_interworking_sections \
- bfd_elf32_arm_oabi_allocate_interworking_sections
-#define bfd_elf32_arm_get_bfd_for_interworking \
- bfd_elf32_arm_oabi_get_bfd_for_interworking
-#define bfd_elf32_arm_process_before_allocation \
- bfd_elf32_arm_oabi_process_before_allocation
-
#include "elf32-arm.h"
/* ELF executable support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001 Free Software Foundation, Inc.
+ 2001, 2002 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
format. */
void
-elf_swap_symbol_in (abfd, src, shndx, dst)
+elf_swap_symbol_in (abfd, psrc, pshn, dst)
bfd *abfd;
- const Elf_External_Sym *src;
- const Elf_External_Sym_Shndx *shndx;
+ const PTR psrc;
+ const PTR pshn;
Elf_Internal_Sym *dst;
{
+ const Elf_External_Sym *src = (const Elf_External_Sym *) psrc;
+ const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn;
int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
dst->st_name = H_GET_32 (abfd, src->st_name);
if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
goto got_wrong_format_error;
+ /* Further sanity check. */
+ if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
+ goto got_wrong_format_error;
+
ebd = get_elf_backend_data (abfd);
/* Check that the ELF e_machine field matches what this particular
/* Remember the entry point specified in the ELF file header. */
bfd_set_start_address (abfd, i_ehdrp->e_entry);
- /* Seek to the section header table in the file. */
- if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
- goto got_no_match;
+ if (i_ehdrp->e_shoff != 0)
+ {
+ /* Seek to the section header table in the file. */
+ if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
+ goto got_no_match;
- /* Read the first section header at index 0, and convert to internal
- form. */
- if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
- != sizeof (x_shdr))
- goto got_no_match;
- elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
+ /* Read the first section header at index 0, and convert to internal
+ form. */
+ if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
+ != sizeof (x_shdr))
+ goto got_no_match;
+ elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
- /* If the section count is zero, the actual count is in the first
- section header. */
- if (i_ehdrp->e_shnum == SHN_UNDEF)
- i_ehdrp->e_shnum = i_shdr.sh_size;
+ /* If the section count is zero, the actual count is in the first
+ section header. */
+ if (i_ehdrp->e_shnum == SHN_UNDEF)
+ i_ehdrp->e_shnum = i_shdr.sh_size;
- /* And similarly for the string table index. */
- if (i_ehdrp->e_shstrndx == SHN_XINDEX)
- i_ehdrp->e_shstrndx = i_shdr.sh_link;
+ /* And similarly for the string table index. */
+ if (i_ehdrp->e_shstrndx == SHN_XINDEX)
+ i_ehdrp->e_shstrndx = i_shdr.sh_link;
+ }
/* Allocate space for a copy of the section header table in
internal form. */
}
}
- if (i_ehdrp->e_shstrndx)
+ if (i_ehdrp->e_shstrndx && i_ehdrp->e_shoff)
{
if (! bfd_section_from_shdr (abfd, i_ehdrp->e_shstrndx))
goto got_no_match;
bfd_section_from_shdr with it (since this particular strtab is
used to find all of the ELF section names.) */
- if (i_ehdrp->e_shstrndx != 0)
+ if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff)
{
unsigned int num_sec;
/* Skip first symbol, which is a null dummy. */
for (i = 1; i < symcount; i++)
{
- elf_swap_symbol_in (abfd, x_symp + i,
- x_shndx + (x_shndx != NULL ? i : 0), &i_sym);
+ elf_swap_symbol_in (abfd, (const PTR) (x_symp + i),
+ (const PTR) (x_shndx + (x_shndx ? i : 0)),
+ &i_sym);
memcpy (&sym->internal_elf_sym, &i_sym, sizeof (Elf_Internal_Sym));
#ifdef ELF_KEEP_EXTSYM
memcpy (&sym->native_elf_sym, x_symp + i, sizeof (Elf_External_Sym));
elf_write_out_phdrs,
elf_write_shdrs_and_ehdr,
elf_write_relocs,
+ elf_swap_symbol_in,
elf_swap_symbol_out,
elf_slurp_reloc_table,
elf_slurp_symbol_table,
Elf_Internal_Sym sym;
const char * name;
- elf_swap_symbol_in (abfd, esym, shndx, &sym);
+ elf_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx, &sym);
name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name);
if (name == (const char *) NULL)
return true;
amt = c;
amt *= sizeof (boolean);
- defined = (boolean *) bfd_malloc (amt);
- included = (boolean *) bfd_malloc (amt);
+ defined = (boolean *) bfd_zmalloc (amt);
+ included = (boolean *) bfd_zmalloc (amt);
if (defined == (boolean *) NULL || included == (boolean *) NULL)
goto error_return;
- memset (defined, 0, (size_t) amt);
- memset (included, 0, (size_t) amt);
symdefs = bfd_ardata (abfd)->symdefs;
override = false;
- elf_swap_symbol_in (abfd, esym, shndx, &sym);
+ elf_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx, &sym);
flags = BSF_NO_FLAGS;
sec = NULL;
|| bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
return false;
}
- elf_swap_symbol_in (input_bfd, &esym, shndx, &entry->isym);
+ elf_swap_symbol_in (input_bfd, (const PTR) &esym, (const PTR) shndx,
+ &entry->isym);
name = (bfd_elf_string_from_elf_section
(input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
return true;
if (! is_elf_hash_table (info))
- return false;
+ return true;
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
BFD_ASSERT (s != NULL);
hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
- memset (s->contents, 0, (size_t) s->_raw_size);
bfd_put (8 * hash_entry_size, output_bfd, (bfd_vma) bucketcount,
s->contents);
name = ".fini_array";
get_size:
o = bfd_get_section_by_name (abfd, name);
- BFD_ASSERT (o != NULL);
+ if (o == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: could not find output section %s"),
+ bfd_get_filename (abfd), name);
+ goto error_return;
+ }
if (o->_raw_size == 0)
(*_bfd_error_handler)
(_("warning: %s section has zero size"), name);
name = ".gnu.version";
get_vma:
o = bfd_get_section_by_name (abfd, name);
- BFD_ASSERT (o != NULL);
+ if (o == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: could not find output section %s"),
+ bfd_get_filename (abfd), name);
+ goto error_return;
+ }
dyn.d_un.d_ptr = o->vma;
elf_swap_dyn_out (dynobj, &dyn, dyncon);
break;
}
}
+ if (info->relocateable)
+ {
+ boolean failed = false;
+
+ bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed);
+ if (failed)
+ goto error_return;
+ }
+
/* If we have optimized stabs strings, output them. */
if (elf_hash_table (info)->stab_info != NULL)
{
const char *name;
Elf_Internal_Sym osym;
- elf_swap_symbol_in (input_bfd, esym, shndx, isym);
+ elf_swap_symbol_in (input_bfd, (const PTR) esym, (const PTR) shndx,
+ isym);
*pindex = -1;
if (elf_bad_symtab (input_bfd))
asection *rsec;
struct elf_link_hash_entry *h;
Elf_Internal_Sym s;
+ Elf_External_Sym_Shndx *locshndx;
r_symndx = ELF_R_SYM (rel->r_info);
if (r_symndx == 0)
if (elf_bad_symtab (sec->owner))
{
+ locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- locsyms + r_symndx,
- locsym_shndx + (locsym_shndx ? r_symndx : 0),
+ (const PTR) (locsyms + r_symndx),
+ (const PTR) locshndx,
&s);
if (ELF_ST_BIND (s.st_info) == STB_LOCAL)
rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
}
else
{
+ locshndx = locsym_shndx + (locsym_shndx ? r_symndx : 0);
elf_swap_symbol_in (input_bfd,
- locsyms + r_symndx,
- locsym_shndx + (locsym_shndx ? r_symndx : 0),
+ (const PTR) (locsyms + r_symndx),
+ (const PTR) locshndx,
&s);
rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
}
lshndx = (Elf_External_Sym_Shndx *) rcookie->locsym_shndx;
if (lshndx != NULL)
lshndx += r_symndx;
- elf_swap_symbol_in (rcookie->abfd, lsym, lshndx, &isym);
+ elf_swap_symbol_in (rcookie->abfd, (const PTR) lsym,
+ (const PTR) lshndx, &isym);
}
if (r_symndx >= rcookie->locsymcount
static boolean is_unwind_section_name
PARAMS ((bfd *abfd, const char *));
static boolean elfNN_ia64_section_from_shdr
- PARAMS ((bfd *, ElfNN_Internal_Shdr *, char *));
+ PARAMS ((bfd *, ElfNN_Internal_Shdr *, const char *));
static boolean elfNN_ia64_section_flags
PARAMS ((flagword *, ElfNN_Internal_Shdr *));
static boolean elfNN_ia64_fake_sections
/* A local symbol. */
esym = extsyms + ELFNN_R_SYM (irel->r_info);
shndx = shndx_buf + (shndx_buf ? ELFNN_R_SYM (irel->r_info) : 0);
- bfd_elfNN_swap_symbol_in (abfd, esym, shndx, &isym);
+ bfd_elfNN_swap_symbol_in (abfd, (const PTR) esym, (const PTR) shndx,
+ &isym);
if (isym.st_shndx == SHN_UNDEF)
continue; /* We can't do anthing with undefined symbols. */
else if (isym.st_shndx == SHN_ABS)
elfNN_ia64_section_from_shdr (abfd, hdr, name)
bfd *abfd;
ElfNN_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
asection *newsect;
/* Nonzero if ABFD is using the 64-bit ABI. */
#define ABI_64_P(abfd) \
- ((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
+ ((get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64) != 0)
#define IRIX_COMPAT(abfd) \
(get_elf_backend_data (abfd)->elf_backend_mips_irix_compat (abfd))
sec = local_sections[r_symndx];
symbol = sec->output_section->vma + sec->output_offset;
- if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+ if (ELF_ST_TYPE (sym->st_info) != STT_SECTION
+ || (sec->flags & SEC_MERGE))
symbol += sym->st_value;
+ if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ addend = _bfd_elf_rel_local_sym (abfd, sym, &sec, addend);
+ addend -= symbol;
+ addend += sec->output_section->vma + sec->output_offset;
+ }
/* MIPS16 text labels should be treated as odd. */
if (sym->st_other == STO_MIPS16)
_bfd_mips_elf_section_from_shdr (abfd, hdr, name)
bfd *abfd;
Elf_Internal_Shdr *hdr;
- char *name;
+ const char *name;
{
flagword flags = 0;
space. Thus, when they use an R_MIPS_64 they mean what is
usually meant by R_MIPS_32, with the exception that the
stored value is sign-extended to 64 bits. */
- howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32,
- NEWABI_P (input_bfd));
+ howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32, false);
/* On big-endian systems, we need to lie about the position
of the reloc. */
addend = mips_elf_obtain_contents (howto, rel, input_bfd,
contents);
addend &= howto->src_mask;
+ addend <<= howto->rightshift;
/* For some kinds of relocations, the ADDEND is a
combination of the addend stored in two different
return false;
/* Obtain the addend kept there. */
- lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, lo,
- rela_relocation_p);
+ lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, lo, false);
l = mips_elf_obtain_contents (lo16_howto, lo16_relocation,
input_bfd, contents);
l &= lo16_howto->src_mask;
+ l <<= lo16_howto->rightshift;
l = mips_elf_sign_extend (l, 16);
addend <<= 16;
|| r_type == R_MIPS_LITERAL)
addend -= (_bfd_get_gp_value (output_bfd)
- _bfd_get_gp_value (input_bfd));
- else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
- || r_type == R_MIPS_GNU_REL16_S2)
- /* The addend is stored without its two least
- significant bits (which are always zero.) In a
- non-relocateable link, calculate_relocation will do
- this shift; here, we must do it ourselves. */
- addend <<= 2;
r_symndx = ELF_R_SYM (output_bfd, rel->r_info);
sym = local_syms + r_symndx;
/* Adjust the addend appropriately. */
addend += local_sections[r_symndx]->output_offset;
- /* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
- then we only want to write out the high-order 16 bits.
- The subsequent R_MIPS_LO16 will handle the low-order bits. */
- if (r_type == R_MIPS_HI16 || r_type == R_MIPS_GOT16
- || r_type == R_MIPS_GNU_REL_HI16)
- addend = mips_elf_high (addend);
- else if (r_type == R_MIPS_HIGHER)
- addend = mips_elf_higher (addend);
- else if (r_type == R_MIPS_HIGHEST)
- addend = mips_elf_highest (addend);
-
- /* If the relocation is for an R_MIPS_26 relocation, then
- the two low-order bits are not stored in the object file;
- they are implicitly zero. */
- else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
- || r_type == R_MIPS_GNU_REL16_S2)
- addend >>= 2;
+ if (howto->partial_inplace)
+ {
+ /* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
+ then we only want to write out the high-order 16 bits.
+ The subsequent R_MIPS_LO16 will handle the low-order bits.
+ */
+ if (r_type == R_MIPS_HI16 || r_type == R_MIPS_GOT16
+ || r_type == R_MIPS_GNU_REL_HI16)
+ addend = mips_elf_high (addend);
+ else if (r_type == R_MIPS_HIGHER)
+ addend = mips_elf_higher (addend);
+ else if (r_type == R_MIPS_HIGHEST)
+ addend = mips_elf_highest (addend);
+ }
if (rela_relocation_p)
/* If this is a RELA relocation, just update the addend.
destination mask because the place to which we are
writing will be source of the addend in the final
link. */
+ addend >>= howto->rightshift;
addend &= howto->src_mask;
- if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+ if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd))
/* See the comment above about using R_MIPS_64 in the 32-bit
ABI. Here, we need to update the addend. It would be
possible to get away with just using the R_MIPS_32 reloc
else
use_saved_addend_p = false;
+ addend >>= howto->rightshift;
+
/* Figure out what value we are supposed to relocate. */
switch (mips_elf_calculate_relocation (output_bfd, input_bfd,
input_section, info, rel,
got->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
}
\f
+boolean
+_bfd_mips_elf_ignore_discarded_relocs (sec)
+ asection *sec;
+{
+ if (strcmp (sec->name, ".pdr") == 0)
+ return true;
+ return false;
+}
+\f
/* MIPS ELF uses a special find_nearest_line routine in order the
handle the ECOFF debugging information. */
extern boolean _bfd_mips_elf_section_processing
PARAMS ((bfd *, Elf_Internal_Shdr *));
extern boolean _bfd_mips_elf_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
extern boolean _bfd_mips_elf_fake_sections
PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
extern boolean _bfd_mips_elf_section_from_bfd_section
PARAMS ((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 *, boolean));
+extern boolean _bfd_mips_elf_ignore_discarded_relocs
+ PARAMS ((asection *));
extern boolean _bfd_mips_elf_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));
#ifndef bfd_elfNN_get_reloc_upper_bound
#define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
#endif
+#ifndef bfd_elfNN_get_symbol_info
#define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info
+#endif
#define bfd_elfNN_get_symtab _bfd_elf_get_symtab
#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
#if 0 /* done in elf-bfd.h */
_bfd_elf_merge_sections
#endif
+#ifndef bfd_elfNN_bfd_discard_group
+#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
+#endif
+
#ifndef bfd_elfNN_bfd_make_debug_symbol
#define bfd_elfNN_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
#ifndef elf_backend_write_section
#define elf_backend_write_section NULL
#endif
+#ifndef elf_backend_set_nonloadable_filepos
+#define elf_backend_set_nonloadable_filepos NULL
+#endif
+#ifndef elf_backend_is_contained_by_filepos
+#define elf_backend_is_contained_by_filepos NULL
+#endif
+#ifndef elf_backend_copy_private_bfd_data_p
+#define elf_backend_copy_private_bfd_data_p NULL
+#endif
#ifndef elf_backend_mips_irix_compat
#define elf_backend_mips_irix_compat NULL
#endif
elf_backend_discard_info,
elf_backend_ignore_discarded_relocs,
elf_backend_write_section,
+ elf_backend_set_nonloadable_filepos,
+ elf_backend_is_contained_by_filepos,
+ elf_backend_copy_private_bfd_data_p,
elf_backend_mips_irix_compat,
elf_backend_mips_rtype_to_howto,
elf_backend_ecoff_debug_swap,
{
s->_raw_size = linux_hash_table (info)->fixup_count + 1;
s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
- memset (s->contents, 0, (size_t) s->_raw_size);
}
return true;
/* BFD back-end for i386 a.out binaries under LynxOS.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
count = reloc_size / each_size;
- reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
+ reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent));
if (!reloc_cache && count != 0)
return false;
- memset (reloc_cache, 0, (size_t) count * sizeof (arelent));
relocs = (PTR) bfd_alloc (abfd, reloc_size);
if (!relocs && reloc_size != 0)
#define msdos_bfd_relax_section bfd_generic_relax_section
#define msdos_bfd_gc_sections bfd_generic_gc_sections
#define msdos_bfd_merge_sections bfd_generic_merge_sections
+#define msdos_bfd_discard_group bfd_generic_discard_group
#define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define os9k_bfd_relax_section bfd_generic_relax_section
#define os9k_bfd_gc_sections bfd_generic_gc_sections
#define os9k_bfd_merge_sections bfd_generic_merge_sections
+#define os9k_bfd_discard_group bfd_generic_discard_group
#define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
if ((PTR) stream == (PTR) NULL)
{
/* Outputting a section without data, fill it up */
- stream = (unsigned char *) (bfd_alloc (abfd, s->_raw_size));
+ stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
if (!stream)
return false;
- memset ((PTR) stream, 0, (size_t) s->_raw_size);
}
while (current_byte_index < s->_raw_size)
{
#define ieee_bfd_relax_section bfd_generic_relax_section
#define ieee_bfd_gc_sections bfd_generic_gc_sections
#define ieee_bfd_merge_sections bfd_generic_merge_sections
+#define ieee_bfd_discard_group bfd_generic_discard_group
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ihex_bfd_relax_section bfd_generic_relax_section
#define ihex_bfd_gc_sections bfd_generic_gc_sections
#define ihex_bfd_merge_sections bfd_generic_merge_sections
+#define ihex_bfd_discard_group bfd_generic_discard_group
#define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
M_ALPHA_NETBSD = 141, /* NetBSD/alpha binary */
M_ARM6_NETBSD = 143, /* NetBSD/arm32 binary */
M_SPARCLET_1 = 147, /* 0x93, reserved */
+ M_VAX4K_NETBSD = 150, /* NetBSD/vax 4K pages binary */
M_MIPS1 = 151, /* MIPS R2000/R3000 binary */
M_MIPS2 = 152, /* MIPS R4000/R6000 binary */
M_SPARCLET_2 = 163, /* 0xa3, reserved */
((boolean (*) \
PARAMS ((bfd *, struct bfd_link_info *))) \
bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+ ((boolean (*) \
+ PARAMS ((bfd *, struct sec *))) \
+ bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
#define _bfd_nolink_bfd_link_hash_table_free \
boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
-/* And more follows */
-
((boolean (*) \
PARAMS ((bfd *, struct bfd_link_info *))) \
bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+ ((boolean (*) \
+ PARAMS ((bfd *, struct sec *))) \
+ bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
#define _bfd_nolink_bfd_link_hash_table_free \
boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
-/* And more follows */
-
+/* Extracted from init.c. */
+/* Extracted from libbfd.c. */
boolean
bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
unsigned int
bfd_log2 PARAMS ((bfd_vma x));
+/* Extracted from cache.c. */
#define BFD_CACHE_MAX_OPEN 10
extern bfd *bfd_last_cache;
FILE *
bfd_cache_lookup_worker PARAMS ((bfd *abfd));
+/* Extracted from reloc.c. */
#ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ALPHA_GPREL_HI16",
"BFD_RELOC_ALPHA_GPREL_LO16",
"BFD_RELOC_ALPHA_BRSGP",
+ "BFD_RELOC_ALPHA_TLSGD",
+ "BFD_RELOC_ALPHA_TLSLDM",
+ "BFD_RELOC_ALPHA_DTPMOD64",
+ "BFD_RELOC_ALPHA_GOTDTPREL16",
+ "BFD_RELOC_ALPHA_DTPREL64",
+ "BFD_RELOC_ALPHA_DTPREL_HI16",
+ "BFD_RELOC_ALPHA_DTPREL_LO16",
+ "BFD_RELOC_ALPHA_DTPREL16",
+ "BFD_RELOC_ALPHA_GOTTPREL16",
+ "BFD_RELOC_ALPHA_TPREL64",
+ "BFD_RELOC_ALPHA_TPREL_HI16",
+ "BFD_RELOC_ALPHA_TPREL_LO16",
+ "BFD_RELOC_ALPHA_TPREL16",
"BFD_RELOC_MIPS_JMP",
"BFD_RELOC_MIPS16_JMP",
"BFD_RELOC_MIPS16_GPREL",
"BFD_RELOC_XSTORMY16_REL_12",
"BFD_RELOC_XSTORMY16_24",
"BFD_RELOC_XSTORMY16_FPTR16",
+ "BFD_RELOC_VAX_GLOB_DAT",
+ "BFD_RELOC_VAX_JMP_SLOT",
+ "BFD_RELOC_VAX_RELATIVE",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
boolean relocateable,
asymbol **symbols));
+/* Extracted from archures.c. */
extern const bfd_arch_info_type bfd_default_arch_struct;
boolean
bfd_default_set_arch_mach PARAMS ((bfd *abfd,
boolean
bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
+/* Extracted from elf.c. */
struct elf_internal_shdr *
bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
extern boolean ppc_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *));
-/* And more taken from the source .. */
-
extern boolean ppc_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *));
-/* And more taken from the source .. */
-
+/* Extracted from coffcode.h. */
typedef struct coff_ptr_struct
{
/* Remembers the offset from the first symbol in the file for
{
s->_raw_size = linux_hash_table (info)->fixup_count + 1;
s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return false;
}
- memset (s->contents, 0, (size_t) s->_raw_size);
}
return true;
/* SEC_MERGE support.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
-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 support for merging duplicate entities within sections,
as used in ELF SHF_MERGE. */
#include "sysdep.h"
#include "libbfd.h"
#include "hashtab.h"
+#include "libiberty.h"
struct sec_merge_sec_info;
/* Start of this string needs to be aligned to
alignment octets (not 1 << align). */
unsigned int alignment;
- union {
+ union
+ {
/* Index within the merged section. */
bfd_size_type index;
/* Entity size (if present in suffix hash tables). */
ret->next = NULL;
}
- return (struct bfd_hash_entry *)ret;
+ return (struct bfd_hash_entry *) ret;
}
/* Look up an entry in a section merge hash table. */
qsort (array, (size_t) sinfo->htab->size,
sizeof (struct sec_merge_hash_entry *), cmplengthentry);
- last4tab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last4_eq, NULL);
- lasttab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last_eq, NULL);
+ last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
+ NULL, last4_eq, NULL, calloc, free);
+ lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
+ NULL, last_eq, NULL, calloc, free);
if (lasttab == NULL || last4tab == NULL)
goto alloc_failure;
struct mmo_symbol
{
struct mmo_symbol *next;
- CONST char *name;
+ const char *name;
bfd_vma value;
enum mmo_sym_type sym_type;
unsigned int serno;
PARAMS ((bfd *, asection *, PTR));
static void mmo_find_sec_w_addr PARAMS ((bfd *, asection *, PTR));
static void mmo_find_sec_w_addr_grow PARAMS ((bfd *, asection *, PTR));
-static asection *mmo_make_section PARAMS ((bfd *, CONST char *));
+static asection *mmo_make_section PARAMS ((bfd *, const char *));
static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static void mmo_print_symbol
PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
static void mmo_xore_64 PARAMS ((asection *, bfd_vma vma, bfd_vma value));
static void mmo_xore_32 PARAMS ((asection *, bfd_vma vma, unsigned int));
static void mmo_xore_16 PARAMS ((asection *, bfd_vma vma, unsigned int));
-static CONST bfd_target *mmo_object_p PARAMS ((bfd *));
+static const bfd_target *mmo_object_p PARAMS ((bfd *));
static void mmo_map_set_sizes PARAMS ((bfd *, asection *, PTR));
static boolean mmo_get_symbols PARAMS ((bfd *));
-static boolean mmo_create_symbol PARAMS ((bfd *, CONST char *, bfd_vma,
+static boolean mmo_create_symbol PARAMS ((bfd *, const char *, bfd_vma,
enum mmo_sym_type, unsigned int));
static boolean mmo_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static boolean mmo_internal_write_header PARAMS ((bfd *));
static boolean mmo_internal_write_post PARAMS ((bfd *, int, asection *));
static boolean mmo_internal_add_3_sym
- PARAMS ((bfd *, struct mmo_symbol_trie *, CONST struct mmo_symbol *));
+ PARAMS ((bfd *, struct mmo_symbol_trie *, const struct mmo_symbol *));
static unsigned int mmo_internal_3_length
PARAMS ((bfd *, struct mmo_symbol_trie *));
static void mmo_internal_3_dump
static void mmo_write_octa PARAMS ((bfd *, bfd_vma));
static void mmo_write_octa_raw PARAMS ((bfd *, bfd_vma));
static boolean mmo_write_chunk
- PARAMS ((bfd *, CONST bfd_byte *, unsigned int));
+ PARAMS ((bfd *, const bfd_byte *, unsigned int));
static boolean mmo_flush_chunk PARAMS ((bfd *));
static boolean mmo_write_loc_chunk
- PARAMS ((bfd *, bfd_vma, CONST bfd_byte *, unsigned int, bfd_vma *));
+ PARAMS ((bfd *, bfd_vma, const bfd_byte *, unsigned int, bfd_vma *));
static boolean mmo_write_chunk_list PARAMS ((bfd *, mmo_data_list_type *));
static boolean mmo_write_loc_chunk_list
PARAMS ((bfd *, mmo_data_list_type *));
static bfd_byte mmo_get_byte PARAMS ((bfd *));
static void mmo_write_byte PARAMS ((bfd *, bfd_byte));
static boolean mmo_new_section_hook PARAMS ((bfd *, asection *));
-static int mmo_sort_mmo_symbols PARAMS ((CONST PTR, CONST PTR));
+static int mmo_sort_mmo_symbols PARAMS ((const PTR, const PTR));
static boolean mmo_write_object_contents PARAMS ((bfd *));
static long mmo_canonicalize_reloc
PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
static asection *
mmo_make_section (abfd, secname)
bfd *abfd;
- CONST char *secname;
+ const char *secname;
{
asection *sec = bfd_get_section_by_name (abfd, secname);
/* Check whether an existing file is an mmo file. */
-static CONST bfd_target *
+static const bfd_target *
mmo_object_p (abfd)
bfd *abfd;
{
static INLINE boolean
mmo_write_chunk (abfd, loc, len)
bfd *abfd;
- CONST bfd_byte *loc;
+ const bfd_byte *loc;
unsigned int len;
{
boolean retval = true;
mmo_write_loc_chunk (abfd, vma, loc, len, last_vmap)
bfd *abfd;
bfd_vma vma;
- CONST bfd_byte *loc;
+ const bfd_byte *loc;
unsigned int len;
bfd_vma *last_vmap;
{
static boolean
mmo_create_symbol (abfd, symname, addr, sym_type, serno)
bfd *abfd;
- CONST char *symname;
+ const char *symname;
bfd_vma addr;
enum mmo_sym_type sym_type;
unsigned int serno;
static int
mmo_sort_mmo_symbols (arg1, arg2)
- CONST PTR arg1;
- CONST PTR arg2;
+ const PTR arg1;
+ const PTR arg2;
{
- CONST struct mmo_symbol *sym1 = *(CONST struct mmo_symbol **) arg1;
- CONST struct mmo_symbol *sym2 = *(CONST struct mmo_symbol **) arg2;
+ const struct mmo_symbol *sym1 = *(const struct mmo_symbol **) arg1;
+ const struct mmo_symbol *sym2 = *(const struct mmo_symbol **) arg2;
/* Sort by serial number first. */
if (sym1->serno < sym2->serno)
return 1;
/* Then sort by address of the table entries. */
- return ((CONST char *) arg1 - (CONST char *) arg2);
+ return ((const char *) arg1 - (const char *) arg2);
}
/* Translate the symbol table. */
mmo_internal_write_header (abfd)
bfd *abfd;
{
- CONST char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1};
+ const char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1};
if (bfd_bwrite (lop_pre_bfd, 4, abfd) != 4)
return false;
mmo_internal_add_3_sym (abfd, rootp, symp)
bfd *abfd;
struct mmo_symbol_trie *rootp;
- CONST struct mmo_symbol *symp;
+ const struct mmo_symbol *symp;
{
- CONST char *name = symp->name;
+ const char *name = symp->name;
struct mmo_symbol_trie *trie = rootp;
struct mmo_symbol_trie **triep = NULL;
#define mmo_set_arch_mach bfd_default_set_arch_mach
#define mmo_bfd_relax_section bfd_generic_relax_section
#define mmo_bfd_merge_sections bfd_generic_merge_sections
+#define mmo_bfd_discard_group bfd_generic_discard_group
/* objcopy will be upset if we return -1 from bfd_get_reloc_upper_bound by
using BFD_JUMP_TABLE_RELOCS (_bfd_norelocs) rather than 0. FIXME: Most
#define mmo_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define mmo_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
-CONST bfd_target bfd_mmo_vec =
+const bfd_target bfd_mmo_vec =
{
"mmo", /* name */
bfd_target_mmo_flavour,
#define nlm_bfd_relax_section bfd_generic_relax_section
#define nlm_bfd_gc_sections bfd_generic_gc_sections
#define nlm_bfd_merge_sections bfd_generic_merge_sections
+#define nlm_bfd_discard_group bfd_generic_discard_group
#define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
/* BFD back-end for NetBSD/ns32k a.out-ish binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000, 2001
+ Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#include "bfd.h" /* To ensure following declaration is OK */
-CONST struct reloc_howto_struct *
+const struct reloc_howto_struct *
MY_bfd_reloc_type_lookup
PARAMS((bfd *abfd AND
bfd_reloc_code_real_type code));
#define oasys_bfd_relax_section bfd_generic_relax_section
#define oasys_bfd_gc_sections bfd_generic_gc_sections
#define oasys_bfd_merge_sections bfd_generic_merge_sections
+#define oasys_bfd_discard_group bfd_generic_discard_group
#define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
target_vec = bfd_find_target (target, nbfd);
if (target_vec == NULL)
{
- bfd_set_error (bfd_error_invalid_target);
_bfd_delete_bfd (nbfd);
return NULL;
}
#else
fdflags = fcntl (fd, F_GETFL, NULL);
#endif
- if (fdflags == -1) return NULL;
+ if (fdflags == -1)
+ return NULL;
nbfd = _bfd_new_bfd ();
if (nbfd == NULL)
target_vec = bfd_find_target (target, nbfd);
if (target_vec == NULL)
{
- bfd_set_error (bfd_error_invalid_target);
_bfd_delete_bfd (nbfd);
return NULL;
}
target_vec = bfd_find_target (target, nbfd);
if (target_vec == NULL)
{
- bfd_set_error (bfd_error_invalid_target);
_bfd_delete_bfd (nbfd);
return NULL;
}
bfd *nbfd;
const bfd_target *target_vec;
- bfd_set_error (bfd_error_system_call);
-
/* nbfd has to point to head of malloc'ed block so that bfd_close may
reclaim it correctly. */
nbfd = _bfd_new_bfd ();
cached_size = obj_aout_external_sym_count (abfd);
cached_size *= sizeof (aout_symbol_type);
- cached = (aout_symbol_type *) bfd_malloc (cached_size);
+ cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
if (cached == NULL && cached_size != 0)
return false;
- if (cached_size != 0)
- memset (cached, 0, (size_t) cached_size);
/* Convert from external symbol information to internal. */
if (! (NAME(aout,translate_symbol_table)
count = real_count;
}
- reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
+ reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent));
if (reloc_cache == NULL && count != 0)
return false;
- memset (reloc_cache, 0, (size_t) count * sizeof (arelent));
cache_ptr = reloc_cache;
if (!native)
return false;
- memset ((PTR)native, 0, (size_t) natsize);
-
generic = section->orelocation;
if (generic != NULL)
{
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc.
-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. */
#include "bfd.h"
#include "sysdep.h"
#define COFF_LONG_FILENAMES
#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
Free Software Foundation, Inc.
Written by Cygnus Solutions.
-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. */
/* Most of this hacked by Steve Chamberlain <sac@cygnus.com>.
adj = section->vma - extra->ImageBase;
+ /* Print all image import descriptors. */
for (i = 0; i < datasize; i += onaline)
{
bfd_vma hint_addr;
bfd_size_type j;
char *dll;
- /* print (i + extra->DataDirectory[1].VirtualAddress) */
+ /* Print (i + extra->DataDirectory[1].VirtualAddress). */
fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
#if 0
if (i + 20 > datasize)
if (hint_addr != 0)
{
- fprintf (file, _("\tvma: Hint/Ord Member-Name\n"));
+ bfd_byte *ft_data;
+ asection *ft_section;
+ bfd_vma ft_addr;
+ bfd_size_type ft_datasize;
+ int ft_idx;
+ int ft_allocated = 0;
+
+ fprintf (file, _("\tvma: Hint/Ord Member-Name Bound-To\n"));
idx = hint_addr - adj;
+
+ ft_addr = first_thunk + extra->ImageBase;
+ ft_data = data;
+ ft_idx = first_thunk - adj;
+ ft_allocated = 0;
+
+ if (first_thunk != hint_addr)
+ {
+ /* Find the section which contains the first thunk. */
+ for (ft_section = abfd->sections;
+ ft_section != NULL;
+ ft_section = ft_section->next)
+ {
+ ft_datasize = bfd_section_size (abfd, ft_section);
+ if (ft_addr >= ft_section->vma
+ && ft_addr < ft_section->vma + ft_datasize)
+ break;
+ }
+
+ if (ft_section == NULL)
+ {
+ fprintf (file,
+ _("\nThere is a first thunk, but the section containing it could not be found\n"));
+ continue;
+ }
+
+ /* Now check to see if this section is the same as our current
+ section. If it is not then we will have to load its data in. */
+ if (ft_section == section)
+ {
+ ft_data = data;
+ ft_idx = first_thunk - adj;
+ }
+ else
+ {
+ ft_idx = first_thunk - (ft_section->vma - extra->ImageBase);
+ ft_data = (bfd_byte *) bfd_malloc (datasize);
+ if (ft_data == NULL)
+ continue;
+
+ /* Read datasize bfd_bytes starting at offset ft_idx. */
+ if (! bfd_get_section_contents (abfd, ft_section,
+ (PTR) ft_data,
+ (bfd_vma) ft_idx,
+ datasize))
+ {
+ free (ft_data);
+ continue;
+ }
+ ft_idx = 0;
+ ft_allocated = 1;
+ }
+ }
+
+ /* Print HintName vector entries. */
for (j = 0; j < datasize; j += 4)
{
unsigned long member = bfd_get_32 (abfd, data + idx + j);
+ /* Print single IMAGE_IMPORT_BY_NAME vector. */
if (member == 0)
break;
+
if (member & 0x80000000)
- fprintf (file, "\t%04lx\t %4lu", member,
- member & 0x7fffffff);
+ fprintf (file, "\t%04lx\t %4lu <none>",
+ member, member & 0x7fffffff);
else
{
int ordinal;
}
/* If the time stamp is not zero, the import address
- table holds actual addresses. */
+ table holds actual addresses. */
if (time_stamp != 0
&& first_thunk != 0
&& first_thunk != hint_addr)
fprintf (file, "\t%04lx",
- (long) bfd_get_32 (abfd, data + first_thunk - adj + j));
+ (long) bfd_get_32 (abfd, ft_data + ft_idx + j));
fprintf (file, "\n");
}
- }
-
- if (hint_addr != first_thunk && time_stamp == 0)
- {
- bfd_byte *ft_data;
- asection *ft_section;
- bfd_vma ft_addr;
- bfd_size_type ft_datasize;
- int ft_idx;
- int differ = 0;
- int ft_allocated = 0;
-
- ft_addr = first_thunk + extra->ImageBase;
-
- /* Find the section which contains the first thunk. */
- for (ft_section = abfd->sections;
- ft_section != NULL;
- ft_section = ft_section->next)
- {
- ft_datasize = bfd_section_size (abfd, ft_section);
- if (ft_addr >= ft_section->vma
- && ft_addr < ft_section->vma + ft_datasize)
- break;
- }
-
- if (ft_section == NULL)
- {
- fprintf (file,
- _("\nThere is a first thunk, but the section containing it could not be found\n"));
- continue;
- }
-
- /* Now check to see if this section is the same as our current
- section. If it is not then we will have to load its data in. */
- if (ft_section == section)
- {
- ft_data = data;
- ft_idx = first_thunk - adj;
- }
- else
- {
- ft_idx = first_thunk - (ft_section->vma - extra->ImageBase);
- ft_data = (bfd_byte *) bfd_malloc (datasize);
- if (ft_data == NULL)
- continue;
-
- /* Read datasize bfd_bytes starting at offset ft_idx. */
- if (! bfd_get_section_contents (abfd, ft_section, (PTR) ft_data, (bfd_vma) ft_idx, datasize))
- {
- free (ft_data);
- continue;
- }
-
- ft_idx = 0;
- ft_allocated = 1;
- }
-
- for (j = 0; j < datasize; j += 4)
- {
- int ordinal;
- char *member_name;
- bfd_vma hint_member = 0;
- bfd_vma iat_member;
-
- if (hint_addr != 0)
- hint_member = bfd_get_32 (abfd, data + idx + j);
- iat_member = bfd_get_32 (abfd, ft_data + ft_idx + j);
-
- if (hint_addr == 0 && iat_member == 0)
- break;
-
- if (hint_addr == 0 || hint_member != iat_member)
- {
- if (differ == 0)
- {
- fprintf (file,
- _("\tThe Import Address Table (difference found)\n"));
- fprintf (file, _("\tvma: Hint/Ord Member-Name\n"));
- differ = 1;
- }
-
- if (iat_member == 0)
- fprintf (file,
- _("\t>>> Ran out of IAT members!\n"));
- else
- {
- ordinal = bfd_get_16 (abfd, data + iat_member - adj);
- member_name = (char *) data + iat_member - adj + 2;
- fprintf (file, "\t%04lx\t %4d %s\n",
- (unsigned long) iat_member,
- ordinal,
- member_name);
- }
- }
-
- if (hint_addr != 0 && hint_member == 0)
- break;
- }
-
- if (differ == 0)
- fprintf (file,
- _("\tThe Import Address Table is identical\n"));
if (ft_allocated)
free (ft_data);
/* BFD back-end for Intel 386 PE IMAGE COFF files.
- Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2002 Free Software Foundation, Inc.
-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. */
#include "bfd.h"
#include "sysdep.h"
#define COFF_LONG_FILENAMES
#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
cpu-cris.c
cpu-d10v.c
cpu-d30v.c
+cpu-dlx.c
cpu-fr30.c
+cpu-frv.c
cpu-h8300.c
cpu-h8500.c
cpu-hppa.c
elf32-cris.c
elf32-d10v.c
elf32-d30v.c
+elf32-dlx.c
elf32-fr30.c
+elf32-frv.c
elf32-gen.c
elf32-h8300.c
elf32-hppa.c
elf32-hppa.h
elf32-i370.c
elf32-i386.c
+elf32-i386qnx.c
elf32-i860.c
elf32-i960.c
elf32-m32r.c
elf32-sh-lin.c
elf32-sh-nbsd.c
elf32-sh.c
+elf32-sh64-com.c
+elf32-sh64-nbsd.c
elf32-sh64.c
elf32-sparc.c
elf32-v850.c
+elf32-vax.c
elf32-xstormy16.c
elf32.c
elf64-alpha.c
elf64-mmix.c
elf64-ppc.c
elf64-s390.c
+elf64-sh64-nbsd.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
#define ppcboot_bfd_relax_section bfd_generic_relax_section
#define ppcboot_bfd_gc_sections bfd_generic_gc_sections
#define ppcboot_bfd_merge_sections bfd_generic_merge_sections
+#define ppcboot_bfd_discard_group bfd_generic_discard_group
#define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
share a common GP, and the target address is adjusted for
STO_ALPHA_STD_GPLOAD.
+ENUM
+ BFD_RELOC_ALPHA_TLSGD
+ENUMX
+ BFD_RELOC_ALPHA_TLSLDM
+ENUMX
+ BFD_RELOC_ALPHA_DTPMOD64
+ENUMX
+ BFD_RELOC_ALPHA_GOTDTPREL16
+ENUMX
+ BFD_RELOC_ALPHA_DTPREL64
+ENUMX
+ BFD_RELOC_ALPHA_DTPREL_HI16
+ENUMX
+ BFD_RELOC_ALPHA_DTPREL_LO16
+ENUMX
+ BFD_RELOC_ALPHA_DTPREL16
+ENUMX
+ BFD_RELOC_ALPHA_GOTTPREL16
+ENUMX
+ BFD_RELOC_ALPHA_TPREL64
+ENUMX
+ BFD_RELOC_ALPHA_TPREL_HI16
+ENUMX
+ BFD_RELOC_ALPHA_TPREL_LO16
+ENUMX
+ BFD_RELOC_ALPHA_TPREL16
+ENUMDOC
+ Alpha thread-local storage relocations.
+
ENUM
BFD_RELOC_MIPS_JMP
ENUMDOC
ENUMX
BFD_RELOC_MIPS_JALR
COMMENT
+ENUM
+ BFD_RELOC_FRV_LABEL16
+ENUMX
+ BFD_RELOC_FRV_LABEL24
+ENUMX
+ BFD_RELOC_FRV_LO16
+ENUMX
+ BFD_RELOC_FRV_HI16
+ENUMX
+ BFD_RELOC_FRV_GPREL12
+ENUMX
+ BFD_RELOC_FRV_GPRELU12
+ENUMX
+ BFD_RELOC_FRV_GPREL32
+ENUMX
+ BFD_RELOC_FRV_GPRELHI
+ENUMX
+ BFD_RELOC_FRV_GPRELLO
+ENUMDOC
+ Fujitsu Frv Relocations.
+COMMENT
COMMENT
ENUMDOC
MIPS ELF relocations.
ENUMDOC
Sony Xstormy16 Relocations.
+ENUM
+ BFD_RELOC_VAX_GLOB_DAT
+ENUMX
+ BFD_RELOC_VAX_JMP_SLOT
+ENUMX
+ BFD_RELOC_VAX_RELATIVE
+ENUMDOC
+ Relocations used by VAX ELF.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
The last element is used as an accumlator of shrinks. */
amt = reloc_count + 1;
amt *= sizeof (unsigned);
- shrinks = (unsigned *) bfd_malloc (amt);
- memset (shrinks, 0, (size_t) amt);
+ shrinks = (unsigned *) bfd_zmalloc (amt);
/* Loop until nothing changes in this section. */
do {
if (*spp == os)
{
bfd_section_list_remove (os->owner, spp);
+ os->flags |= SEC_EXCLUDE;
os->owner->section_count--;
break;
}
s->flags |= SEC_EXCLUDE;
}
+
+/*
+FUNCTION
+ bfd_generic_discard_group
+
+SYNOPSIS
+ boolean bfd_generic_discard_group (bfd *abfd, asection *group);
+
+DESCRIPTION
+ Remove all members of @var{group} from the output.
+*/
+
+boolean
+bfd_generic_discard_group (abfd, group)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *group ATTRIBUTE_UNUSED;
+{
+ return true;
+}
to hold the symbol table as we build it. */
symtab_size = num_syms;
symtab_size *= sizeof (struct symbol_dictionary_record);
- som_symtab = (struct symbol_dictionary_record *) bfd_malloc (symtab_size);
+ som_symtab = (struct symbol_dictionary_record *) bfd_zmalloc (symtab_size);
if (som_symtab == NULL && symtab_size != 0)
goto error_return;
- memset (som_symtab, 0, (size_t) symtab_size);
/* Walk over each symbol. */
for (i = 0; i < num_syms; i++)
/* Allocate and read in the string table. */
amt = obj_som_stringtab_size (abfd);
- stringtab = bfd_malloc (amt);
+ stringtab = bfd_zmalloc (amt);
if (stringtab == NULL)
return false;
- memset (stringtab, 0, obj_som_stringtab_size (abfd));
if (bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET) != 0)
return false;
amt = symbol_count;
amt *= sizeof (som_symbol_type);
- symbase = (som_symbol_type *) bfd_malloc (amt);
+ symbase = (som_symbol_type *) bfd_zmalloc (amt);
if (symbase == NULL)
goto error_return;
- memset (symbase, 0, symbol_count * sizeof (som_symbol_type));
/* Read in the external SOM representation. */
amt = symbol_count;
amt = lst.hash_size;
amt *= sizeof (unsigned int);
- hash_table = (unsigned int *) bfd_malloc (amt);
+ hash_table = (unsigned int *) bfd_zmalloc (amt);
if (hash_table == NULL && lst.hash_size != 0)
goto error_return;
amt = lst.module_count;
amt *= sizeof (struct som_entry);
- som_dict = (struct som_entry *) bfd_malloc (amt);
+ som_dict = (struct som_entry *) bfd_zmalloc (amt);
if (som_dict == NULL && lst.module_count != 0)
goto error_return;
amt = lst.hash_size;
amt *= sizeof (struct lst_symbol_record *);
- last_hash_entry = ((struct lst_symbol_record **) bfd_malloc (amt));
+ last_hash_entry = ((struct lst_symbol_record **) bfd_zmalloc (amt));
if (last_hash_entry == NULL && lst.hash_size != 0)
goto error_return;
of the lst record. So save its location. */
lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
- /* Some initialization. */
- memset (hash_table, 0, 4 * lst.hash_size);
- memset (som_dict, 0, lst.module_count * sizeof (struct som_entry));
- memset (last_hash_entry, 0,
- lst.hash_size * sizeof (struct lst_symbol_record *));
-
/* Symbols have som_index fields, so we have to keep track of the
index of each SOM in the archive.
#define som_bfd_gc_sections bfd_generic_gc_sections
#define som_bfd_merge_sections bfd_generic_merge_sections
+#define som_bfd_discard_group bfd_generic_discard_group
const bfd_target som_vec = {
"som", /* name */
{
s->_raw_size = linux_hash_table (info)->fixup_count + 1;
s->_raw_size *= 8;
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
- memset (s->contents, 0, (size_t) s->_raw_size);
}
return true;
#define srec_bfd_relax_section bfd_generic_relax_section
#define srec_bfd_gc_sections bfd_generic_gc_sections
#define srec_bfd_merge_sections bfd_generic_merge_sections
+#define srec_bfd_discard_group bfd_generic_discard_group
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
sym < symend;
sym += STABSIZE, ++pstridx)
{
+ bfd_size_type symstroff;
int type;
const char *string;
}
/* Store the string in the hash table, and record the index. */
- string = ((char *) stabstrbuf
- + stroff
- + bfd_get_32 (abfd, sym + STRDXOFF));
+ symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF);
+ if (symstroff >= stabstrsec->_raw_size)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): Stabs entry has invalid string index."),
+ bfd_archive_filename (abfd),
+ bfd_get_section_name (abfd, stabsec),
+ (long) (sym - stabbuf));
+ bfd_set_error (bfd_error_bad_value);
+ goto error_return;
+ }
+ string = (char *) stabstrbuf + symstroff;
*pstridx = _bfd_stringtab_add (sinfo->strings, string, true, true);
/* An N_BINCL symbol indicates the start of the stabs entries
s = bfd_get_section_by_name (dynobj, ".hash");
BFD_ASSERT (s != NULL);
hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
- s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc);
if (s->contents == NULL && dynsymcount > 0)
return false;
- memset (s->contents, 0, (size_t) hashalloc);
for (i = 0; i < bucketcount; i++)
PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
.CONCAT2 (NAME,_bfd_final_link), \
.CONCAT2 (NAME,_bfd_link_split_section), \
.CONCAT2 (NAME,_bfd_gc_sections), \
-.CONCAT2 (NAME,_bfd_merge_sections)
+.CONCAT2 (NAME,_bfd_merge_sections), \
+.CONCAT2 (NAME,_bfd_discard_group)
. int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
. bfd_byte *(*_bfd_get_relocated_section_contents)
. PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
. {* Attempt to merge SEC_MERGE sections. *}
. boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
.
+. {* Discard members of a group. *}
+. boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
.CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
we can't intermix extern's and initializers. */
extern const bfd_target a29kcoff_big_vec;
extern const bfd_target a_out_adobe_vec;
+extern const bfd_target aix5coff64_vec;
extern const bfd_target aout0_big_vec;
extern const bfd_target aout_arm_big_vec;
extern const bfd_target aout_arm_little_vec;
extern const bfd_target bfd_elf32_d30v_vec;
extern const bfd_target bfd_elf32_dlx_big_vec;
extern const bfd_target bfd_elf32_fr30_vec;
+extern const bfd_target bfd_elf32_frv_vec;
extern const bfd_target bfd_elf32_h8300_vec;
extern const bfd_target bfd_elf32_hppa_linux_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_vec;
+extern const bfd_target bfd_elf32_i386qnx_vec;
extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
extern const bfd_target bfd_elf32_s390_vec;
+extern const bfd_target bfd_elf32_sh64_vec;
+extern const bfd_target bfd_elf32_sh64l_vec;
+extern const bfd_target bfd_elf32_sh64lnbsd_vec;
+extern const bfd_target bfd_elf32_sh64nbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_us_cris_vec;
extern const bfd_target bfd_elf32_v850_vec;
+extern const bfd_target bfd_elf32_vax_vec;
extern const bfd_target bfd_elf32_xstormy16_vec;
extern const bfd_target bfd_elf64_alpha_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
extern const bfd_target bfd_elf64_powerpc_vec;
extern const bfd_target bfd_elf64_powerpcle_vec;
extern const bfd_target bfd_elf64_s390_vec;
+extern const bfd_target bfd_elf64_sh64_vec;
+extern const bfd_target bfd_elf64_sh64l_vec;
+extern const bfd_target bfd_elf64_sh64lnbsd_vec;
+extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target riscix_vec;
extern const bfd_target rs6000coff64_vec;
extern const bfd_target rs6000coff_vec;
-extern const bfd_target aix5coff64_vec;
extern const bfd_target shcoff_small_vec;
extern const bfd_target shcoff_vec;
extern const bfd_target shlcoff_small_vec;
extern const bfd_target tic54x_coff2_vec;
extern const bfd_target tic80coff_vec;
extern const bfd_target vaxnetbsd_vec;
+extern const bfd_target vax1knetbsd_vec;
extern const bfd_target versados_vec;
extern const bfd_target vms_alpha_vec;
extern const bfd_target vms_vax_vec;
extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
-extern const bfd_target bfd_elf32_sh64_vec;
-extern const bfd_target bfd_elf32_sh64l_vec;
-extern const bfd_target bfd_elf64_sh64_vec;
-extern const bfd_target bfd_elf64_sh64l_vec;
static const bfd_target * const _bfd_target_vector[] = {
#ifdef SELECT_VECS
it wasn't omitted by mistake. */
&a29kcoff_big_vec,
&a_out_adobe_vec,
+ &aix5coff64_vec,
&aout0_big_vec,
#if 0
/* We have no way of distinguishing these from other a.out variants */
&bfd_elf32_d30v_vec,
&bfd_elf32_dlx_big_vec,
&bfd_elf32_fr30_vec,
+ &bfd_elf32_frv_vec,
&bfd_elf32_h8300_vec,
&bfd_elf32_hppa_linux_vec,
&bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_vec,
+ &bfd_elf32_i386qnx_vec,
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
&bfd_elf32_shnbsd_vec,
+#ifdef BFD64
+ &bfd_elf32_sh64_vec,
+ &bfd_elf32_sh64l_vec,
+ &bfd_elf32_sh64lnbsd_vec,
+ &bfd_elf32_sh64nbsd_vec,
+#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_us_cris_vec,
&bfd_elf32_v850_vec,
+ &bfd_elf32_vax_vec,
&bfd_elf32_xstormy16_vec,
#ifdef BFD64
&bfd_elf64_alpha_vec,
&bfd_elf64_powerpc_vec,
&bfd_elf64_powerpcle_vec,
&bfd_elf64_s390_vec,
+ &bfd_elf64_sh64_vec,
+ &bfd_elf64_sh64l_vec,
+ &bfd_elf64_sh64lnbsd_vec,
+ &bfd_elf64_sh64nbsd_vec,
#if 0
&bfd_elf64_sparc_vec,
#endif
&tic54x_coff2_vec,
&tic80coff_vec,
&vaxnetbsd_vec,
+ &vax1knetbsd_vec,
&versados_vec,
#ifdef BFD64
&vms_alpha_vec,
}
if (!d)
{
- char *sname = bfd_alloc (abfd, (bfd_size_type) 12);
-
/* No chunk for this address, so make one up */
d = ((struct data_struct *)
- bfd_alloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
+ bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
- if (!sname || !d)
+ if (!d)
return NULL;
- memset (d->chunk_init, 0, CHUNK_MASK + 1);
- memset (d->chunk_data, 0, CHUNK_MASK + 1);
d->next = abfd->tdata.tekhex_data->data;
d->vma = vma;
abfd->tdata.tekhex_data->data = d;
#define tekhex_bfd_relax_section bfd_generic_relax_section
#define tekhex_bfd_gc_sections bfd_generic_gc_sections
#define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_discard_group bfd_generic_discard_group
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
-/* BFD back-end for NetBSD/VAX a.out-ish binaries.
- Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
+/* BFD back-end for NetBSD/VAX (4K page size) a.out-ish binaries.
+ Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
-#define TARGET_PAGE_SIZE 1024
+#define TARGET_PAGE_SIZE 0x1000
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define DEFAULT_ARCH bfd_arch_vax
-#define DEFAULT_MID M_VAX_NETBSD
+#define DEFAULT_MID M_VAX4K_NETBSD
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
#define versados_bfd_relax_section bfd_generic_relax_section
#define versados_bfd_gc_sections bfd_generic_gc_sections
#define versados_bfd_merge_sections bfd_generic_merge_sections
+#define versados_bfd_discard_group bfd_generic_discard_group
#define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define BFD_VERSION_DATE 20020528
+#define BFD_VERSION_DATE 20020619
else
{
section->contents = ((unsigned char *)
- bfd_malloc (section->_raw_size));
+ bfd_zmalloc (section->_raw_size));
if (section->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return -1;
}
- memset (section->contents, 0, (size_t) section->_raw_size);
}
section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
section->vma = (bfd_vma)base_addr;
base_addr += section->_raw_size;
section->contents = ((unsigned char *)
- bfd_malloc (section->_raw_size));
+ bfd_zmalloc (section->_raw_size));
if (section->contents == NULL)
return -1;
- memset (section->contents, 0, (size_t) section->_raw_size);
section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
vms_debug(4, "egsd psc %d (%s, flags %04x=%s) ",
#define vms_make_empty_symbol _bfd_generic_make_empty_symbol
#define vms_bfd_link_just_syms _bfd_generic_link_just_syms
+#define vms_bfd_discard_group bfd_generic_discard_group
\f
/*===========================================================================*/
/* Common definitions for backends based on IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001
+ Copyright 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support.
#define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section
#define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
#define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
+#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
#define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
/* XCOFF archives do not have anything which corresponds to an
/* We keep a list of the linker hash table entries that correspond
to each external symbol. */
amt = symcount * sizeof (struct xcoff_link_hash_entry *);
- sym_hash = (struct xcoff_link_hash_entry **) bfd_alloc (abfd, amt);
+ sym_hash = (struct xcoff_link_hash_entry **) bfd_zalloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
coff_data (abfd)->sym_hashes = (struct coff_link_hash_entry **) sym_hash;
- memset (sym_hash, 0, (size_t) amt);
/* Because of the weird stuff we are doing with XCOFF csects, we can
not easily determine which section a symbol is in, so we store
the information in the tdata for the input file. */
amt = symcount * sizeof (asection *);
- csect_cache = (asection **) bfd_alloc (abfd, amt);
+ csect_cache = (asection **) bfd_zalloc (abfd, amt);
if (csect_cache == NULL && symcount != 0)
goto error_return;
xcoff_data (abfd)->csects = csect_cache;
- memset (csect_cache, 0, (size_t) amt);
/* While splitting sections into csects, we need to assign the
relocs correctly. The relocs and the csects must both be in
into reloc_info using the section target_index. */
amt = abfd->section_count + 1;
amt *= sizeof (struct reloc_info_struct);
- reloc_info = (struct reloc_info_struct *) bfd_malloc (amt);
+ reloc_info = (struct reloc_info_struct *) bfd_zmalloc (amt);
if (reloc_info == NULL)
goto error_return;
- memset ((PTR) reloc_info, 0, (size_t) amt);
/* Read in the relocs and line numbers for each section. */
linesz = bfd_coff_linesz (abfd);
false, (struct internal_reloc *) NULL);
amt = o->reloc_count;
amt *= sizeof (asection *);
- reloc_info[o->target_index].csects = (asection **) bfd_malloc (amt);
+ reloc_info[o->target_index].csects = (asection **) bfd_zmalloc (amt);
if (reloc_info[o->target_index].csects == NULL)
goto error_return;
- memset (reloc_info[o->target_index].csects, 0, (size_t) amt);
-
}
if ((info->strip == strip_none || info->strip == strip_some)
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
LDFLAGS="$(LDFLAGS) $${flags}" \
+ DESTDIR="$(DESTDIR)" \
$(DO)); then \
true; \
else \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 \
+ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| m32r | m68000 | m68k | m88k | mcore \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
- tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
- tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
+ tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
+ tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
tools="${tools} OBJCOPY OBJDUMP"
DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
- HOST_PREFIX=${build_alias}-
- HOST_PREFIX_1=${build_alias}-
+ BUILD_PREFIX=${build_alias}-
+ BUILD_PREFIX_1=${build_alias}-
LD=${LD-${host_alias}-ld}
LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
MAKEINFO=${MAKEINFO-makeinfo}
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib"
libstdcxx_version="target-libstdc++-v3"
# Don't use libstdc++-v3's flags to configure/build itself.
esac
skipdirs=
-gasdir=gas
use_gnu_ld=
use_gnu_as=
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
+ frv-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ if test x${is_cross_compiler} != xno ; then
+ target_configdirs="${target_configdirs} target-bsp target-cygmon"
+ fi
+ ;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
# --without-gnu-ld options for the configure script.
if test x${use_gnu_as} = x ; then
- if test x${with_gnu_as} != xno && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && test -d ${srcdir}/${gasdir} ; then
+ if test x${with_gnu_as} != xno && echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 && test -d ${srcdir}/gas ; then
with_gnu_as=yes
withoptions="$withoptions --with-gnu-as"
fi
+2002-06-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ Import the following patches from the FSF GCC sources:
+ 2002-03-25 Zack Weinberg <zack@codesourcery.com>
+
+ * texi2pod.pl: Handle @end ftable and @end vtable.
+
+ 2001-12-12 Matthias Klose <doko@debian.org>
+
+ * texi2pod.pl: Merge changes from binutils' texi2pod.pl. Allows
+ generation of more than one man page from one source.
+ Add '-' to set of valid chars for an identifier.
+ Let -D option accept flags of the form <flag>=<value>.
+ Use \s+ for whitespace detection in '@c man' lines.
+ Handle @set and @clear independent of $output.
+ Substitute all @value{}'s in a line.
+
+ 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * texi2pod.pl: Handle @ifnottex, @iftex and @display. Handle @var
+ in verbatim blocks specially. Handle @unnumbered, @unnumberedsec
+ and @center. Allow [a-z] after @enumerate. Handle 0 and numbers
+ greater than 9 in enumerations.
+
+ 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * texi2pod.pl: Handle @r inside @item.
+
2002-02-27 Andrew Cagney <ac131313@redhat.com>
* fdl.texi: New file.
* add-log.el, add-log.vi: New files.
-Wed Jan 20 01:33:50 1999 Angela Marie Thomas (angela@cygnus.com)
+1999-01-20 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-verify: Remove some checks that are no longer valid.
* targetdoc/fr30.texi: New document.
-Thu Oct 1 21:15:59 1998 Angela Marie Thomas (angela@cygnus.com)
+1998-10-01 Angela Marie Thomas (angela@cygnus.com)
* comp-tools-fix, cross-tools-fix: Replace /usr/include
with ${FIXINCDIR}.
-Tue Aug 11 19:22:11 1998 Doug Evans <devans@canuck.cygnus.com>
+1998-08-11 Doug Evans <devans@canuck.cygnus.com>
* make-rel-sym-tree (version): Update calculation.
-Fri Jun 12 21:34:01 1998 Ian Lance Taylor <ian@cygnus.com>
+1998-06-12 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: Various additions.
* Makefile.in (TEXI2HTML, DVIPS): New variables.
* configbuild.ein: New file (EPS version of configbuild.fig).
* configbuild.jin: New file (JPEG version of configbuild.fig).
-Wed Jun 10 14:41:25 1998 Ian Lance Taylor <ian@cygnus.com>
+1998-06-10 Ian Lance Taylor <ian@cygnus.com>
* configure.texi: New file.
* configdev.tin: New file.
#! /usr/bin/perl -w
-# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 200 Free Software Foundation, Inc.
# This file is part of GNU CC.
@icstack = ();
@endwstack = ();
@skstack = ();
+@instack = ();
$shift = "";
%defs = ();
$fnno = 1;
+$inf = "";
+$ibase = "";
while ($_ = shift) {
if (/^-D(.*)$/) {
} else {
$flag = shift;
}
- $value=$flag;
- $value =~ s,^[a-zA-Z0-9_]+,,;
- $value =~ s,.*=,,;
- $flag =~ s,=.*$,,;
+ $value = "";
+ ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
die "no flag specified for -D\n"
unless $flag ne "";
- #print STDERR "FL = $flag, V = $value\n";
+ die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
+ unless $flag =~ /^[a-zA-Z0-9_-]+$/;
$defs{$flag} = $value;
-
} elsif (/^-/) {
usage();
} else {
}
if (defined $in) {
- open(STDIN, $in) or die "opening \"$in\": $!\n";
+ $inf = gensym();
+ open($inf, "<$in") or die "opening \"$in\": $!\n";
+ $ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
+} else {
+ $inf = \*STDIN;
}
+
if (defined $out) {
open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
}
-while(<STDIN>)
-{
+while(defined $inf) {
+while(<$inf>) {
# Certain commands are discarded without further processing.
/^\@(?:
[a-z]+index # @*index: useful only in complete manual
|(?:end\s+)?group # @group .. @end group: ditto
|page # @page: ditto
|node # @node: useful only in .info file
+ |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents
)\b/x and next;
-
+
chomp;
# Look for filename and title markers.
/^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
# Identify a man title but keep only the one we are interested in.
- /^\@c man title ([A-Za-z0-9]+) (.+)/ and do {
+ /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
if (exists $defs{$1}) {
$fn = $1;
$tl = postprocess($2);
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
# This really oughta be @ifman ... @end ifman and the like, but such
# would require rev'ing all other Texinfo translators.
- /^\@c man begin ([A-Z]+) ([A-Za-z0-9]+)/ and do {
+ /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
$output = 1 if exists $defs{$2};
$sect = $1;
next;
};
- /^\@c man begin ([A-Z]+)/ and $sect = $1, $output = 1, next;
- /^\@c man end/ and do {
+ /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
+ /^\@c\s+man\s+end/ and do {
$sects{$sect} = "" unless exists $sects{$sect};
$sects{$sect} .= postprocess($section);
$section = "";
$output = 0;
next;
};
+
+ # handle variables
+ /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
+ $defs{$1} = $2;
+ next;
+ };
+ /^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
+ delete $defs{$1};
+ next;
+ };
+
next unless $output;
# Discard comments. (Can't do it above, because then we'd never see
# Ignore @end foo, where foo is not an operation which may
# cause us to skip, if we are presently skipping.
my $ended = $1;
- next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu)$/;
+ next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
$endw = pop @endwstack;
- if ($ended =~ /^(?:ifset|ifclear|ignore|menu)$/) {
+ if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
$skipping = pop @skstack;
next;
- } elsif ($ended =~ /^(?:example|smallexample)$/) {
+ } elsif ($ended =~ /^(?:example|smallexample|display)$/) {
$shift = "";
$_ = ""; # need a paragraph break
- } elsif ($ended =~ /^(?:itemize|enumerate|table)$/) {
+ } elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
$_ = "\n=back\n";
$ic = pop @icstack;
} else {
next;
};
- /^\@(ignore|menu)\b/ and do {
+ /^\@(ignore|menu|iftex)\b/ and do {
push @endwstack, $endw;
push @skstack, $skipping;
$endw = $1;
s/\@\{/{/g;
s/\@\}/}/g;
s/\@\@/&at;/g;
+
+ # Inside a verbatim block, handle @var specially.
+ if ($shift ne "") {
+ s/\@var\{([^\}]*)\}/<$1>/g;
+ }
+
# POD doesn't interpret E<> inside a verbatim block.
if ($shift eq "") {
s/</</g;
}
# Single line command handlers.
- /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and $defs{$1} = $2, next;
- /^\@clear\s+([a-zA-Z0-9_-]+)/ and delete $defs{$1}, next;
- /^\@section\s+(.+)$/ and $_ = "\n=head2 $1\n";
- /^\@subsection\s+(.+)$/ and $_ = "\n=head3 $1\n";
+ /^\@include\s+(.+)$/ and do {
+ push @instack, $inf;
+ $inf = gensym();
+
+ # Try cwd and $ibase.
+ open($inf, "<" . $1)
+ or open($inf, "<" . $ibase . "/" . $1)
+ or die "cannot open $1 or $ibase/$1: $!\n";
+ next;
+ };
+
+ /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+ and $_ = "\n=head2 $1\n";
+ /^\@subsection\s+(.+)$/
+ and $_ = "\n=head3 $1\n";
# Block command handlers:
/^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
$endw = "itemize";
};
- /^\@enumerate(?:\s+([A-Z0-9]+))?/ and do {
+ /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
push @endwstack, $endw;
push @icstack, $ic;
if (defined $1) {
$endw = "enumerate";
};
- /^\@table\s+(\@[a-z]+)/ and do {
+ /^\@([fv]?table)\s+(\@[a-z]+)/ and do {
push @endwstack, $endw;
push @icstack, $ic;
- $ic = $1;
+ $endw = $1;
+ $ic = $2;
$ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
$ic =~ s/\@(?:code|kbd)/C/;
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
$ic =~ s/\@(?:file)/F/;
$_ = "\n=over 4\n";
- $endw = "table";
};
- /^\@((?:small)?example)/ and do {
+ /^\@((?:small)?example|display)/ and do {
push @endwstack, $endw;
$endw = $1;
$shift = "\t";
$_ = "\n=item $ic\<$1\>\n";
} else {
$_ = "\n=item $ic\n";
- $ic =~ y/A-Ya-y1-8/B-Zb-z2-9/;
+ $ic =~ y/A-Ya-y/B-Zb-z/;
+ $ic =~ s/(\d+)/$1 + 1/eg;
}
};
$section .= $shift.$_."\n";
}
+# End of current file.
+close($inf);
+$inf = pop @instack;
+}
die "No filename or title\n" unless defined $fn && defined $tl;
local $_ = $_[0];
# @value{foo} is replaced by whatever 'foo' is defined as.
- if (/\@value\{([a-zA-Z0-9_-]+)\}/) {
- if (! exists $defs{$1}) {
- print STDERR "Option $1 not define\n";
+ while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
+ if (! exists $defs{$2}) {
+ print STDERR "Option $2 not defined\n";
+ s/\Q$1\E//;
+ } else {
+ $value = $defs{$2};
+ s/\Q$1\E/$value/;
}
-
}
- s/\@value\{([a-zA-Z0-9_-]+)\}/$defs{$1}/g;
# Formatting commands.
# Temporary escape for @r.
s/\@w\{([^\}]*)\}/S<$1>/g;
s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
- # Handle @r inside bold.
- 1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B</g;
-
# Cross references are thrown away, as are @noindent and @refill.
# (@noindent is impossible in .pod, and @refill is unnecessary.)
# @* is also impossible in .pod; we discard it and any newline that
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
# Turn B<blah I<blah> blah> into B<blah> I<blah> B<blah> to
- # match Texinfo semantics of @emph inside @samp.
+ # match Texinfo semantics of @emph inside @samp. Also handle @r
+ # inside bold.
s/</</g;
s/>/>/g;
+ 1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B</g;
1 while (s/B<([^<>]*)I<([^>]+)>/B<$1>I<$2>B</g);
1 while (s/I<([^<>]*)B<([^>]+)>/I<$1>B<$2>I</g);
s/[BI]<>//g;
$sects{FOOTNOTES} .= $_[0];
$sects{FOOTNOTES} .= "\n\n";
}
-
+
+# stolen from Symbol.pm
+{
+ my $genseq = 0;
+ sub gensym
+ {
+ my $name = "GEN" . $genseq++;
+ my $ref = \*{$name};
+ delete $::{$name};
+ return $ref;
+ }
+}
+++ /dev/null
-The files in this directory are shared with other debuggers and
-debug interfaces that use Advanced Micro Devices' UDI (universal debug
-interface) protocol. The protocol provides a common interface among
-debuggers, logic analyzers, emulators, and embedded systems that use
-AMD 29000 family processors.
-
-Do not change these files without coordinating with Advanced Micro
-Devices, Embedded Processor Division, 5204 E. Ben White Blvd, Austin, TX 78741.
-Maybe postmaster@cayman.amd.com can direct you to the current maintainers.
+++ /dev/null
-/*
-
-Interface from UDI calls in 32-bit mode to go32 in 16-bit mode.
-Communication is done through a single interrupt vector, which passes
-data through two linear buffers.
-
-Call:
- AH = 0xfe
- AL = UDI function number
- ECX = IN length
- ESI = pointer to IN buffer
- EDI = pointer to OUT buffer
-
-Return:
- EAX = return value of UDI function
-
-Vector:
- 0x21
-
-*/
-#ifdef __GO32__
-
-#include <stdlib.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-char dfe_errmsg[500];
-
-static char in_buffer[4096];
-static char out_buffer[4096];
-static char *in_ptr;
-static char *out_ptr;
-
-#define IN_INIT() in_ptr = in_buffer
-#define IN_VAL(t,v) *((t *)in_ptr)++ = v
-#define IN_DATA(ptr, cnt) memcpy(in_ptr, ptr, cnt), in_ptr += cnt
-
-#define OUT_INIT() out_ptr = out_buffer
-#define OUT_VAL(t) (*((t *)out_ptr)++)
-#define OUT_DATA(ptr, cnt) memcpy(ptr, out_ptr, cnt), out_ptr += cnt
-
-static int DO_CALL(int function)
-{
- asm("pushl %esi");
- asm("pushl %edi");
- asm("movb %0, %%al" : : "g" (function));
- asm("movl _in_ptr, %ecx");
- asm("movl $_in_buffer, %esi");
- asm("subl %esi, %ecx");
- asm("movl $_out_buffer, %edi");
- asm("movb $0xfe, %ah");
- asm("int $0x21");
- asm("popl %edi");
- asm("popl %esi");
-}
-
-/*----------------------------------------------------------------------*/
-
-#ifdef TEST_UDI
-int main()
-{
- int r;
- long p2;
- short p1;
- IN_INIT();
- IN_VAL(long, 11111111);
- IN_VAL(short, 2222);
- IN_DATA("Hello, world\n", 17);
-
- r = DO_CALL(42);
-
- OUT_INIT();
- p1 = OUT_VAL(short);
- p2 = OUT_VAL(long);
- printf("main: p1=%d p2=%d rv=%d\n", p1, p2, r);
- return r;
-}
-#endif
-
-/*----------------------------------------------------------------------*/
-
-unsupported(char *s)
-{
- printf("unsupported UDI host call %s\n", s);
- abort();
-}
-
-UDIError UDIConnect (
- char *Configuration, /* In */
- UDISessionId *Session /* Out */
- )
-{
- int r;
- out_buffer[0] = 0; /* DJ - test */
- IN_INIT();
- IN_DATA(Configuration, strlen(Configuration)+1);
-
- r = DO_CALL(UDIConnect_c);
-
- OUT_INIT();
- *Session = OUT_VAL(UDISessionId);
- return r;
-}
-
-UDIError UDIDisconnect (
- UDISessionId Session, /* In */
- UDIBool Terminate /* In */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(UDISessionId, Session);
- IN_VAL(UDIBool, Terminate);
-
- return DO_CALL(UDIDisconnect_c);
-}
-
-UDIError UDISetCurrentConnection (
- UDISessionId Session /* In */
- )
-{
- IN_INIT();
- IN_VAL(UDISessionId, Session);
-
- return DO_CALL(UDISetCurrentConnection_c);
-}
-
-UDIError UDICapabilities (
- UDIUInt32 *TIPId, /* Out */
- UDIUInt32 *TargetId, /* Out */
- UDIUInt32 DFEId, /* In */
- UDIUInt32 DFE, /* In */
- UDIUInt32 *TIP, /* Out */
- UDIUInt32 *DFEIPCId, /* Out */
- UDIUInt32 *TIPIPCId, /* Out */
- char *TIPString /* Out */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(UDIUInt32, DFEId);
- IN_VAL(UDIUInt32, DFE);
- r = DO_CALL(UDICapabilities_c);
- OUT_INIT();
- *TIPId = OUT_VAL(UDIUInt32);
- *TargetId = OUT_VAL(UDIUInt32);
- *TIP = OUT_VAL(UDIUInt32);
- *DFEIPCId = OUT_VAL(UDIUInt32);
- *TIPIPCId = OUT_VAL(UDIUInt32);
- strcpy(TIPString, out_ptr);
- return r;
-}
-
-UDIError UDIEnumerateTIPs (
- UDIInt (*UDIETCallback) /* In */
- ( char *Configuration ) /* In to callback() */
- )
-{
- UDIETCallback("montip.exe");
-}
-
-UDIError UDIGetErrorMsg (
- UDIError ErrorCode, /* In */
- UDISizeT MsgSize, /* In */
- char *Msg, /* Out */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- if (MsgSize > 4000)
- MsgSize = 4000;
- IN_INIT();
- IN_VAL(UDIError, ErrorCode);
- IN_VAL(UDISizeT, MsgSize);
-
- r = DO_CALL(UDIGetErrorMsg_c);
-
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- OUT_DATA(Msg, *CountDone);
- return r;
-}
-
-UDIError UDIGetTargetConfig (
- UDIMemoryRange KnownMemory[], /* Out */
- UDIInt *NumberOfRanges, /* In/Out */
- UDIUInt32 ChipVersions[], /* Out */
- UDIInt *NumberOfChips /* In/Out */
- )
-{
- int r, i;
- int nr = *NumberOfRanges;
- int nc = *NumberOfChips;
- IN_INIT();
- IN_VAL(UDIInt, *NumberOfRanges);
- IN_VAL(UDIInt, *NumberOfChips);
- r = DO_CALL(UDIGetTargetConfig_c);
- if (r == UDIErrorIncomplete)
- return r;
- OUT_INIT();
- *NumberOfRanges = OUT_VAL(UDIInt);
- *NumberOfChips = OUT_VAL(UDIInt);
- for (i=0; i<nr; i++)
- {
- KnownMemory[i].Space = OUT_VAL(short);
- KnownMemory[i].Offset = OUT_VAL(CPUOffset);
- KnownMemory[i].Size = OUT_VAL(CPUSizeT);
- }
- for (i=0; i<nc; i++)
- {
- ChipVersions[i] = OUT_VAL(UDIUInt32);
- }
- return r;
-}
-
-UDIError UDICreateProcess (
- UDIPId *PId /* Out */
- )
-{
- int r = DO_CALL(UDICreateProcess_c);
-
- OUT_INIT();
- *PId = OUT_VAL(UDIPId);
-
- return r;
-}
-
-UDIError UDISetCurrentProcess (
- UDIPId PId /* In */
- )
-{
- IN_INIT();
- IN_VAL(UDIPId, PId);
-
- return DO_CALL(UDISetCurrentProcess_c);
-}
-
-UDIError UDIDestroyProcess (
- UDIPId PId /* In */
- )
-{
- IN_INIT();
- IN_VAL(UDIPId, PId);
-
- return DO_CALL(UDIDestroyProcess_c);
-}
-
-UDIError UDIInitializeProcess (
- UDIMemoryRange ProcessMemory[], /* In */
- UDIInt NumberOfRanges, /* In */
- UDIResource EntryPoint, /* In */
- CPUSizeT StackSizes[], /* In */
- UDIInt NumberOfStacks, /* In */
- char *ArgString /* In */
- )
-{
- int i, r;
- IN_INIT();
- IN_VAL(UDIInt, NumberOfRanges);
- for (i=0; i<NumberOfRanges; i++)
- {
- IN_VAL(short, ProcessMemory[i].Space);
- IN_VAL(CPUOffset, ProcessMemory[i].Offset);
- IN_VAL(CPUSizeT, ProcessMemory[i].Size);
- }
- IN_VAL(short, EntryPoint.Space);
- IN_VAL(CPUOffset, EntryPoint.Offset);
- IN_VAL(UDIInt, NumberOfStacks);
- for (i=0; i<NumberOfStacks; i++)
- IN_VAL(CPUSizeT, StackSizes[i]);
- IN_DATA(ArgString, strlen(ArgString)+1);
-
- return DO_CALL(UDIInitializeProcess_c);
-}
-
-UDIError UDIRead (
- UDIResource From, /* In */
- UDIHostMemPtr To, /* Out */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool HostEndian /* In */
- )
-{
- int cleft = Count, cthis, dthis;
- int cdone = 0, r, bsize=2048/Size;
-
- while (cleft)
- {
- cthis = (cleft<bsize) ? cleft : bsize;
- IN_INIT();
- IN_VAL(short, From.Space);
- IN_VAL(CPUOffset, From.Offset);
- IN_VAL(UDICount, cthis);
- IN_VAL(UDISizeT, Size);
- IN_VAL(UDIBool, HostEndian);
-
- r = DO_CALL(UDIRead_c);
-
- OUT_INIT();
- dthis = OUT_VAL(UDICount);
- OUT_DATA(To, dthis*Size);
- cdone += dthis;
- To += dthis*Size;
-
- if (r != UDINoError)
- {
- *CountDone = cdone;
- return r;
- }
- cleft -= cthis;
- }
- *CountDone = cdone;
- return UDINoError;
-}
-
-UDIError UDIWrite (
- UDIHostMemPtr From, /* In */
- UDIResource To, /* In */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool HostEndian /* In */
- )
-{
- int cleft = Count, cthis, dthis;
- int cdone = 0, r, bsize=2048/Size;
-
- while (cleft)
- {
- cthis = (cleft<bsize) ? cleft : bsize;
- IN_INIT();
- IN_VAL(short, To.Space);
- IN_VAL(CPUOffset, To.Offset);
- IN_VAL(UDICount, cthis);
- IN_VAL(UDISizeT, Size);
- IN_VAL(UDIBool, HostEndian);
- IN_DATA(From, cthis*Size);
- From += cthis*Size;
-
- r = DO_CALL(UDIWrite_c);
-
- OUT_INIT();
- cdone += OUT_VAL(UDICount);
-
- if (r != UDINoError)
- {
- *CountDone = cdone;
- return r;
- }
- cleft -= cthis;
- }
- *CountDone = cdone;
- return UDINoError;
-}
-
-UDIError UDICopy (
- UDIResource From, /* In */
- UDIResource To, /* In */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool Direction /* In */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(short, From.Space);
- IN_VAL(CPUOffset, From.Offset);
- IN_VAL(short, To.Space);
- IN_VAL(CPUOffset, To.Offset);
- IN_VAL(UDICount, Count);
- IN_VAL(UDISizeT, Size);
- IN_VAL(UDIBool, Direction);
-
- r = DO_CALL(UDICopy_c);
-
- OUT_INIT();
- *CountDone = OUT_VAL(UDICount);
-
- return r;
-}
-
-UDIError UDIExecute (
- void
- )
-{
- return DO_CALL(UDIExecute_c);
-}
-
-UDIError UDIStep (
- UDIUInt32 Steps, /* In */
- UDIStepType StepType, /* In */
- UDIRange Range /* In */
- )
-{
- IN_INIT();
- IN_VAL(UDIUInt32, Steps);
- IN_VAL(UDIStepType, StepType);
- IN_VAL(UDIRange, Range);
-
- return DO_CALL(UDIStep_c);
-}
-
-UDIVoid UDIStop (
- void
- )
-{
- DO_CALL(UDIStop_c);
-}
-
-UDIError UDIWait (
- UDIInt32 MaxTime, /* In */
- UDIPId *PId, /* Out */
- UDIUInt32 *StopReason /* Out */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(UDIInt32, MaxTime);
- r = DO_CALL(UDIWait_c);
- OUT_INIT();
- *PId = OUT_VAL(UDIPId);
- *StopReason = OUT_VAL(UDIUInt32);
- return r;
-}
-
-UDIError UDISetBreakpoint (
- UDIResource Addr, /* In */
- UDIInt32 PassCount, /* In */
- UDIBreakType Type, /* In */
- UDIBreakId *BreakId /* Out */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(short, Addr.Space);
- IN_VAL(CPUOffset, Addr.Offset);
- IN_VAL(UDIInt32, PassCount);
- IN_VAL(UDIBreakType, Type);
-
- r = DO_CALL(UDISetBreakpoint_c);
-
- OUT_INIT();
- *BreakId = OUT_VAL(UDIBreakId);
- return r;
-}
-
-UDIError UDIQueryBreakpoint (
- UDIBreakId BreakId, /* In */
- UDIResource *Addr, /* Out */
- UDIInt32 *PassCount, /* Out */
- UDIBreakType *Type, /* Out */
- UDIInt32 *CurrentCount /* Out */
- )
-{
- int r;
- IN_INIT();
- IN_VAL(UDIBreakId, BreakId);
-
- r = DO_CALL(UDIQueryBreakpoint_c);
-
- OUT_INIT();
- Addr->Space = OUT_VAL(short);
- Addr->Offset = OUT_VAL(CPUOffset);
- *PassCount = OUT_VAL(UDIInt32);
- *Type = OUT_VAL(UDIBreakType);
- *CurrentCount = OUT_VAL(UDIInt32);
-
- return r;
-}
-
-UDIError UDIClearBreakpoint (
- UDIBreakId BreakId /* In */
- )
-{
- IN_INIT();
- IN_VAL(UDIBreakId, BreakId);
-
- return DO_CALL(UDIClearBreakpoint_c);
-}
-
-UDIError UDIGetStdout (
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- IN_INIT();
- if (BufSize > 4000)
- BufSize = 4000;
- IN_VAL(UDISizeT,BufSize);
- r = DO_CALL(UDIGetStdout_c);
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- if (*CountDone <= BufSize)
- OUT_DATA(Buf, *CountDone);
- return r;
-}
-
-UDIError UDIGetStderr (
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- IN_INIT();
- if (BufSize > 4000)
- BufSize = 4000;
- IN_VAL(UDISizeT,BufSize);
- r = DO_CALL(UDIGetStderr_c);
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- OUT_DATA(Buf, *CountDone);
- return r;
-}
-
-UDIError UDIPutStdin (
- UDIHostMemPtr Buf, /* In */
- UDISizeT Count, /* In */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- IN_INIT();
- if (Count > 4000)
- Count = 4000;
- IN_VAL(UDISizeT,Count);
- IN_DATA(Buf, Count);
- r = DO_CALL(UDIPutStdin_c);
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- return r;
-}
-
-UDIError UDIStdinMode (
- UDIMode *Mode /* Out */
- )
-{
- int r;
- IN_INIT();
- r = DO_CALL(UDIStdinMode_c);
- OUT_INIT();
- *Mode = OUT_VAL(UDIMode);
- return r;
-}
-
-UDIError UDIPutTrans (
- UDIHostMemPtr Buf, /* In */
- UDISizeT Count, /* In */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- IN_INIT();
- if (Count > 4000)
- Count = 4000;
- IN_VAL(UDISizeT,Count);
- IN_DATA(Buf, Count);
- r = DO_CALL(UDIPutTrans_c);
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- return r;
-}
-
-UDIError UDIGetTrans (
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- )
-{
- int r;
- IN_INIT();
- if (BufSize > 4000)
- BufSize = 4000;
- IN_VAL(UDISizeT,BufSize);
- r = DO_CALL(UDIGetTrans_c);
- OUT_INIT();
- *CountDone = OUT_VAL(UDISizeT);
- OUT_DATA(Buf, *CountDone);
- return r;
-}
-
-UDIError UDITransMode (
- UDIMode *Mode /* Out */
- )
-{
- int r;
- IN_INIT();
- r = DO_CALL(UDITransMode_c);
- OUT_INIT();
- *Mode = OUT_VAL(UDIMode);
- return r;
-}
-
-#define DFEIPCIdCompany 0x0001 /* Company ID AMD */
-#define DFEIPCIdProduct 0x1 /* Product ID 0 */
-#define DFEIPCIdVersion 0x125 /* 1.2.5 */
-
-unsigned UDIGetDFEIPCId ()
-{
- return((((UDIUInt32)DFEIPCIdCompany) << 16) |(DFEIPCIdProduct << 12) | DFEIPCIdVersion);
-}
-
-#endif /* __GO32__ */
+++ /dev/null
-/* This file contains the DFE and TIP IDs to be used by AMD products for
- the UDICapabilities call.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
- /* Company Codes -- AMD assigns these */
-#define UDICompanyCode_AMD 1
-
- /* Build a UDIID given a CompanyProdCode and 3 version pieces */
-#define UDIID(CompanyProdCode, v1,v2,v3) ((((CompanyProdCode) & 0xfffff)<<12)+\
- (((v1)&0xf)<<8) + (((v2)&0xf)<<4) + ((v3)&0xf))
-
-
- /* Extract a CompanyProdCode or a Version from a UDIID */
-#define UDIID_CompanyProdCode(id) (((id)>>12) & 0xfffff)
-#define UDIID_Version(id) ((id)&0xfff)
-
-
-#define UDIAMDProduct(ProdCode) ((UDICompanyCode_AMD<<4) + (ProdCode&0xf))
-
- /* AMD DFE Product Codes */
-#define UDIProductCode_Mondfe UDIAMDProduct(0)
-#define UDIProductCode_XRAY UDIAMDProduct(1)
-#define UDIProductCode_TIPTester UDIAMDProduct(2)
-
- /* AMD TIP Product Codes (need not be distinct from DFE Product Codes) */
-#define UDIProductCode_Montip UDIAMDProduct(0)
-#define UDIProductCode_Isstip UDIAMDProduct(1)
-
-
-#define UDILatestVersion 0x120 /* UDI 1.2.0, can be used in DFE and TIP desired UDI params */
-
+++ /dev/null
-/* Copyright 1993, 1998 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-static char udip2soc_c[]="@(#)udip2soc.c 2.11 Daniel Mann";
-static char udip2soc_c_AMD[]="@(#)udip2soc.c 2.8, AMD";
-/*
-* This module converts UDI Procedural calls into
-* UDI socket messages for UNIX.
-* It is used by DFE client processes
-********************************************************************** HISTORY
-*/
-/* This is all unneeded on DOS machines. */
-#ifndef __GO32__
-
-#include <stdio.h>
-#include <string.h>
-
-/* Before sys/file.h for Unixware. */
-#include <sys/types.h>
-
-#include <sys/file.h>
-
-/* This used to say sys/fcntl.h, but the only systems I know of that
- require that are old (pre-4.3, at least) BSD systems, which we
- probably don't need to worry about. */
-#include <fcntl.h>
-
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <signal.h>
-#include <sys/errno.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-extern int errno;
-extern int sys_nerr;
-extern int udr_errno;
-extern char* getenv();
-
-/* local type decs. and macro defs. not in a .h file ************* MACRO/TYPE
-*/
-#define version_c 0x121 /* DFE-IPC version id */
-#define TRUE -1
-#define FALSE 0
-#define PORT_NUM 7000
-#define MAX_SESSIONS 5 /* maximum DFE-TIP connections */
-#define SOC_BUF_SIZE 4* 1024 /* size of socket comms buffer */
-#define SBUF_SIZE 500 /* size of string buffer */
-#define ERRMSG_SIZE 500 /* size of error message buffer */
-
-typedef struct connection_str /* record of connect session */
-{
- int in_use;
- char connect_id[20]; /* connection identifier */
- char domain_string[20]; /* dommaing for conection */
- char tip_string[30]; /* TIP host name for AF_INET */
- char tip_exe[80]; /* TIP exe name */
- int dfe_sd; /* associated DFE socket */
- int tip_pid; /* pid of TIP process */
- struct sockaddr_in dfe_sockaddr;
- struct sockaddr_in tip_sockaddr_in;
- struct sockaddr tip_sockaddr;
-} connection_t;
-
-typedef struct session_str
-{
- int in_use;
- connection_t* soc_con_p; /* associated connection */
- UDISessionId tip_id; /* associated TIP session ID */
-} session_t;
-
-/* global dec/defs. which are not in a .h file ************* EXPORT DEC/DEFS
-*/
-UDIError dfe_errno;
-char dfe_errmsg[ERRMSG_SIZE];/* error string */
-
-/* local dec/defs. which are not in a .h file *************** LOCAL DEC/DEFS
-*/
-LOCAL connection_t soc_con[MAX_SESSIONS];
-LOCAL session_t session[MAX_SESSIONS];
-LOCAL UDR udr;
-LOCAL UDR* udrs = &udr; /* UDR for current session */
-LOCAL int current; /* int-id for current session */
-LOCAL char sbuf[SBUF_SIZE]; /* String handler buffer */
-LOCAL char config_file[80]; /* path/name for config file */
-
-/***************************************************************** UDI_CONNECT
-* Establish a new FDE to TIP conection. The file "./udi_soc" or
-* "/etc/udi_soc" may be examined to obtain the conection information
-* if the "Config" parameter is not a completd "line entry".
-*
-* NOTE: the Session string must not start whith white-space characters.
-* Format of string is:
-* <session> <domain> <soc_name|host_name> <tip_exe|port> <pass to UDIconnect>
-* soc2cayman AF_INET cayman 7000 <not supported>
-* soc2tip AF_UNIX astring tip.exe ...
-*/
-UDIError
-UDIConnect(Config, Session)
- char *Config; /* in -- identification string */
- UDISessionId *Session; /* out -- session ID */
-{
- UDIInt32 service_id = UDIConnect_c;
- int domain;
- int cnt=0;
- int rcnt, pos, params_pos=0;
- char *tip_main_string;
- char *env_p;
- struct hostent *tip_info_p;
- FILE *fd;
-#if 0
- FILE *f_p;
-#endif
- UDIUInt32 TIPIPCId;
- UDIUInt32 DFEIPCId;
-
-#if 0 /* This is crap. It assumes that udi_soc is executable! */
- sprintf(sbuf, "which udi_soc");
- f_p = popen(sbuf, "r");
- if(f_p)
- { while( (sbuf[cnt++]=getc(f_p)) != EOF);
- sbuf[cnt-2]=0;
- }
- pclose(f_p);
-#endif
-
- for (rcnt=0;
- rcnt < MAX_SESSIONS && session[rcnt].in_use;
- rcnt++);
-
- if (rcnt >= MAX_SESSIONS)
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR: Too many sessions already open");
- return UDIErrorIPCLimitation;
- }
-
- /* One connection can be multiplexed between several sessions. */
-
- for (cnt=0;
- cnt < MAX_SESSIONS && soc_con[cnt].in_use;
- cnt++);
-
- if (cnt >= MAX_SESSIONS)
- {
- sprintf(dfe_errmsg,
- "DFE-ipc ERROR: Too many connections already open");
- return UDIErrorIPCLimitation;
- }
-
- *Session = rcnt;
- session[rcnt].soc_con_p = &soc_con[cnt];
-
- if (strchr(Config, ' ')) /* test if file entry given */
- {
- soc_con[cnt].in_use = TRUE;
- sscanf(Config, "%s %s %s %s %n",
- soc_con[cnt].connect_id,
- soc_con[cnt].domain_string,
- soc_con[cnt].tip_string,
- soc_con[cnt].tip_exe,
- ¶ms_pos);
- tip_main_string = Config + params_pos;
- }
- else /* here if need to read udi_soc file */
- {
- strcpy(config_file, "udi_soc");
- env_p = getenv("UDICONF");
- if (env_p)
- strcpy(config_file, env_p);
-
- fd = fopen(config_file, "r");
-
- if (!fd)
- {
- sprintf(dfe_errmsg, "UDIConnect, can't open udi_soc file:\n%s ",
- strerror(errno));
- dfe_errno = UDIErrorCantOpenConfigFile;
- goto tip_failure;
- }
-
- while (1)
- {
- if (fscanf(fd, "%s %s %s %s %[^\n]\n",
- soc_con[cnt].connect_id,
- soc_con[cnt].domain_string,
- soc_con[cnt].tip_string,
- soc_con[cnt].tip_exe,
- sbuf) == EOF)
- break;
-
- if (strcmp(Config, soc_con[cnt].connect_id) != 0)
- continue;
-
- soc_con[cnt].in_use = TRUE; /* here if entry found */
-
- tip_main_string = sbuf;
- break;
- }
-
- fclose(fd);
- if (!soc_con[cnt].in_use)
- {
- sprintf(dfe_errmsg,
- "UDIConnect, can't find `%s' entry in udi_soc file",
- Config);
- dfe_errno = UDIErrorNoSuchConfiguration;
- goto tip_failure;
- }
- }
-/*----------------------------------------------------------- SELECT DOMAIN */
- if (strcmp(soc_con[cnt].domain_string, "AF_UNIX") == 0)
- domain = AF_UNIX;
- else if (strcmp(soc_con[cnt].domain_string, "AF_INET") == 0)
- domain = AF_INET;
- else
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR: socket address family not known");
- dfe_errno = UDIErrorBadConfigFileEntry;
- goto tip_failure;
- }
-
-/*---------------------------------------------------- MULTIPLEXED SOCKET ? */
-/* If the requested session requires communication with
- a TIP which already has a socket connection established,
- then we do not create a new socket but multiplex the
- existing one. A TIP is said to use the same socket if
- socket-name/host-name and the domain are the same.
- */
- for (rcnt=0; rcnt < MAX_SESSIONS; rcnt++)
- {
- if (soc_con[rcnt].in_use
- && rcnt != cnt
- && strcmp(soc_con[cnt].domain_string,
- soc_con[rcnt].domain_string) == 0
- && strcmp(soc_con[cnt].tip_string,
- soc_con[rcnt].tip_string) == 0)
- {
- session[*Session].soc_con_p = &soc_con[rcnt];
- soc_con[cnt].in_use = FALSE; /* don't need new connect */
- goto tip_connect;
- }
- }
-/*------------------------------------------------------------------ SOCKET */
- soc_con[cnt].dfe_sd = socket(domain, SOCK_STREAM, 0);
- if (soc_con[cnt].dfe_sd == -1)
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR, socket() call failed %s ",
- strerror (errno));
- dfe_errno = UDIErrorUnknownError;
- goto tip_failure;
- }
-
-/*--------------------------------------------------------- AF_UNIX CONNECT */
- if (domain == AF_UNIX)
- {
- if (strcmp(soc_con[cnt].tip_string, "*") == 0)
- {
- for (pos = 0; pos < 20; pos++)
- {
- int f;
-
- sprintf(soc_con[cnt].tip_string,"/tmp/U%d", getpid() + pos);
- f = open(soc_con[cnt].tip_string, O_CREAT);
- if (f == -1)
- continue;
-
- close(f);
- unlink(soc_con[cnt].tip_string);
- break;
- }
-
- if (pos >= 20)
- {
- sprintf(dfe_errmsg,
- "DFE-ipc ERROR, can't create random socket name");
- dfe_errno = UDIErrorCantConnect;
- goto tip_failure;
- }
- }
-
- soc_con[cnt].tip_sockaddr.sa_family = domain;
- memcpy(soc_con[cnt].tip_sockaddr.sa_data,
- soc_con[cnt].tip_string,
- sizeof(soc_con[cnt].tip_sockaddr.sa_data));
- if (connect(soc_con[cnt].dfe_sd,
- &soc_con[cnt].tip_sockaddr,
- sizeof(soc_con[cnt].tip_sockaddr)))
- { /* if connect() fails assume TIP not yet started */
-/*------------------------------------------------------------ AF_UNIX EXEC */
- int pid;
- int statusp;
- char *arg0;
-
- arg0 = strrchr(soc_con[cnt].tip_exe,'/');
-
- if (arg0)
- arg0++;
- else
- arg0 = soc_con[cnt].tip_exe;
-
- pid = vfork();
-
- if (pid == 0) /* Child */
- {
- execlp(soc_con[cnt].tip_exe,
- arg0,
- soc_con[cnt].domain_string,
- soc_con[cnt].tip_string,
- NULL);
- _exit(1);
- }
-
- if (waitpid(pid, &statusp, WNOHANG))
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR: can't exec the TIP");
- dfe_errno = UDIErrorCantStartTIP;
- goto tip_failure;
- }
-
- pos = 3;
- for (pos = 3; pos > 0; pos--)
- {
- if (!connect(soc_con[cnt].dfe_sd,
- &soc_con[cnt].tip_sockaddr,
- sizeof(soc_con[cnt].tip_sockaddr)))
- break;
- sleep(1);
- }
-
- if (pos == 0)
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR, connect() call failed: %s",
- strerror (errno));
- dfe_errno = UDIErrorCantConnect;
- goto tip_failure;
- }
- }
- }
-/*--------------------------------------------------------- AF_INET CONNECT */
- else if (domain == AF_INET)
- {
- fprintf(stderr,
- "DFE-ipc WARNING, need to have first started remote TIP");
-
- soc_con[cnt].tip_sockaddr_in.sin_family = domain;
- soc_con[cnt].tip_sockaddr_in.sin_addr.s_addr =
- inet_addr(soc_con[cnt].tip_string);
- if (soc_con[cnt].tip_sockaddr_in.sin_addr.s_addr == -1)
- {
- tip_info_p = gethostbyname(soc_con[cnt].tip_string);
- if (tip_info_p == NULL)
- {
- sprintf(dfe_errmsg,"DFE-ipc ERROR, No such host %s",
- soc_con[cnt].tip_string);
- dfe_errno = UDIErrorNoSuchConnection;
- goto tip_failure;
- }
- memcpy((char *)&soc_con[cnt].tip_sockaddr_in.sin_addr,
- tip_info_p->h_addr,
- tip_info_p->h_length);
- }
- soc_con[cnt].tip_sockaddr_in.sin_port
- = htons(atoi(soc_con[cnt].tip_exe));
-
- if (connect(soc_con[cnt].dfe_sd,
- (struct sockaddr *) &soc_con[cnt].tip_sockaddr_in,
- sizeof(soc_con[cnt].tip_sockaddr_in)))
- {
- sprintf(dfe_errmsg, "DFE-ipc ERROR, connect() call failed %s ",
- strerror (errno));
- dfe_errno = UDIErrorCantConnect;
- goto tip_failure;
- }
- }
-/*------------------------------------------------------------- TIP CONNECT */
- if (cnt == 0) udr_create(udrs, soc_con[cnt].dfe_sd, SOC_BUF_SIZE);
-
-tip_connect:
- current = cnt;
- session[*Session].in_use = TRUE; /* session id is now in use */
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
-
- DFEIPCId = (company_c << 16) + (product_c << 12) + version_c;
- udr_UDIUInt32(udrs, &DFEIPCId);
-
- udr_string(udrs, tip_main_string);
-
- udr_sendnow(udrs);
-
- udrs->udr_op = UDR_DECODE; /* recv all "out" parameters */
- udr_UDIUInt32(udrs, &TIPIPCId);
- if ((TIPIPCId & 0xfff) < version_c)
- sprintf(dfe_errmsg, "DFE-ipc: Obsolete TIP Specified");
-
- udr_UDIInt32(udrs, &soc_con[cnt].tip_pid);
-
- udr_UDISessionId(udrs, &session[*Session].tip_id);
-
- udr_UDIError(udrs, &dfe_errno);
- if (dfe_errno > 0) UDIKill(*Session, 0);
-
- return dfe_errno;
-
-tip_failure:
-
- soc_con[cnt].in_use = FALSE;
- session[*Session].in_use = FALSE;
-/* XXX - Should also close dfe_sd, but not sure what to do if muxed */
- return dfe_errno;
-}
-
-/************************************************************** UDI_Disconnect
-* UDIDisconnect() should be called before exiting the
-* DFE to ensure proper shut down of the TIP.
-*/
-UDIError UDIDisconnect(Session, Terminate)
-UDISessionId Session;
-UDIBool Terminate;
-{
- int cnt;
- UDIInt32 service_id = UDIDisconnect_c;
- if(Session < 0 || Session > MAX_SESSIONS)
- {
- sprintf(dfe_errmsg," SessionId not valid (%d)", Session);
- return UDIErrorNoSuchConfiguration;
- }
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISessionId(udrs, &session[Session].tip_id);
- udr_UDIBool(udrs, &Terminate);
- udr_sendnow(udrs);
-
- session[Session].in_use = FALSE; /* session id is now free */
- for (cnt=0; cnt < MAX_SESSIONS; cnt++)
- if(session[cnt].in_use
- && session[cnt].soc_con_p == session[Session].soc_con_p
- ) break;
- if(cnt >= MAX_SESSIONS) /* test if socket not multiplexed */
- if(shutdown(session[Session].soc_con_p->dfe_sd, 2))
- {
- sprintf(dfe_errmsg, "DFE-ipc WARNING: socket shutdown failed");
- return UDIErrorIPCInternal;
- }
- else
- session[Session].soc_con_p->in_use = 0;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************************** UDI_KILL
-* UDIKill() is used to send a signal to the TIP.
-* This is a private IPC call.
-*/
-UDIError UDIKill(Session, Signal)
-UDISessionId Session;
-UDIInt32 Signal;
-{
- int cnt;
- UDIInt32 service_id = UDIKill_c;
- if(Session < 0 || Session > MAX_SESSIONS)
- {
- sprintf(dfe_errmsg," SessionId not valid (%d)", Session);
- return UDIErrorNoSuchConfiguration;
- }
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISessionId(udrs, &session[Session].tip_id);
- udr_UDIInt32(udrs, &Signal);
- udr_sendnow(udrs);
-
- session[Session].in_use = FALSE; /* session id is now free */
- for (cnt=0; cnt < MAX_SESSIONS; cnt++)
- if(session[cnt].in_use
- && session[cnt].soc_con_p == session[Session].soc_con_p
- ) break;
- if(cnt < MAX_SESSIONS) /* test if socket not multiplexed */
- if(shutdown(session[Session].soc_con_p->dfe_sd, 2))
- {
- sprintf(dfe_errmsg, "DFE-ipc WARNING: socket shutdown failed");
- return UDIErrorIPCInternal;
- }
- else
- session[Session].soc_con_p->in_use = 0;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************** UDI_Set_Current_Connection
-* If you are connected to multiple TIPs, you can change
-* TIPs using UDISetCurrentConnection().
-*/
-UDIError UDISetCurrentConnection(Session)
-UDISessionId Session;
-{
- UDIInt32 service_id = UDISetCurrentConnection_c;
-
- if(Session < 0 || Session > MAX_SESSIONS)
- return UDIErrorNoSuchConfiguration;
- if(!session[Session].in_use) /* test if not in use yet */
- return UDIErrorNoSuchConnection;
-
- current = Session;
- /* change socket or multiplex the same socket */
- udrs->sd = session[Session].soc_con_p->dfe_sd;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISessionId(udrs, &session[Session].tip_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************************ UDI_Capabilities
-* The DFE uses UDICapabilities() to both inform the TIP
-* of what services the DFE offers and to inquire of the
-* TIP what services the TIP offers.
-*/
-UDIError UDICapabilities(TIPId, TargetId, DFEId, DFE, TIP, DFEIPCId,
- TIPIPCId, TIPString)
-UDIUInt32 *TIPId; /* out */
-UDIUInt32 *TargetId; /* out */
-UDIUInt32 DFEId; /* in */
-UDIUInt32 DFE; /* in */
-UDIUInt32 *TIP; /* out */
-UDIUInt32 *DFEIPCId; /* out */
-UDIUInt32 *TIPIPCId; /* out */
-char *TIPString; /* out */
-{
- UDIInt32 service_id = UDICapabilities_c;
- int size;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIInt32(udrs, &DFEId);
- udr_UDIInt32(udrs, &DFE);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" paramters */
- udr_UDIInt32(udrs, TIPId);
- udr_UDIInt32(udrs, TargetId);
- udr_UDIInt32(udrs, TIP);
- udr_UDIInt32(udrs, DFEIPCId);
- *DFEIPCId = (company_c << 16) + (product_c << 12) + version_c;
- udr_UDIInt32(udrs, TIPIPCId);
- udr_string(udrs, sbuf);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- size = strlen(sbuf);
- if(size +1 > 80) return -1; /* test if sufficient space */
- strcpy(TIPString, sbuf);
- return dfe_errno;
-}
-
-/********************************************************** UDI_Enumerate_TIPs
-* Used by the DFE to enquire about available TIP
-* connections.
-*/
-UDIError UDIEnumerateTIPs(UDIETCallback)
- int (*UDIETCallback)(); /* In -- function to callback */
-{
- FILE *fp;
-
- fp = fopen(config_file, "r");
- if(fp == NULL)
- return UDIErrorCantOpenConfigFile;
- while(fgets( sbuf, SBUF_SIZE, fp))
- if(UDIETCallback( sbuf) == UDITerminateEnumeration)
- break;
- fclose( fp);
- return UDINoError; /* return success */
-}
-
-/*********************************************************** UDI_GET_ERROR_MSG
-* Some errors are target specific. They are indicated
-* by a negative error return value. The DFE uses
-* UDIGetErrorMsg() to get the descriptive text for
-* the error message which can then be displayed to
-* the user.
-*/
-UDIError UDIGetErrorMsg(error_code, msg_len, msg, CountDone)
-UDIError error_code; /* In */
-UDISizeT msg_len; /* In -- allowed message space */
-char* msg; /* Out -- length of message*/
-UDISizeT *CountDone; /* Out -- number of characters */
-{
- UDIInt32 service_id = UDIGetErrorMsg_c;
- int size;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIError(udrs, &error_code);
- udr_UDISizeT(udrs, &msg_len);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_string(udrs, sbuf);
- udr_UDISizeT(udrs, CountDone);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- size = strlen(sbuf);
- if(size +1 > msg_len) return -1; /* test if sufficient space */
- strcpy(msg, sbuf);
- return dfe_errno;
-}
-
-/******************************************************* UDI_GET_TARGET_CONFIG
-* UDIGetTargetConfig() gets information about the target.
-*/
-UDIError UDIGetTargetConfig(KnownMemory, NumberOfRanges, ChipVersions,
- NumberOfChips)
-UDIMemoryRange KnownMemory[]; /* Out */
-UDIInt *NumberOfRanges; /* In and Out */
-UDIUInt32 ChipVersions[]; /* Out */
-UDIInt *NumberOfChips; /* In and Out */
-{
- UDIInt32 service_id = UDIGetTargetConfig_c;
- int cnt;
- int MaxOfRanges = *NumberOfRanges;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIInt(udrs, NumberOfRanges);
- udr_UDIInt(udrs, NumberOfChips);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" paramters */
- for(cnt=1; cnt <= MaxOfRanges; cnt++)
- udr_UDIMemoryRange(udrs, &KnownMemory[cnt-1]);
- udr_UDIInt(udrs, NumberOfRanges);
- udr_UDIInt(udrs, NumberOfChips);
- for(cnt=1; cnt <= *NumberOfChips; cnt++)
- udr_UDIUInt32(udrs, &ChipVersions[cnt -1]);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/********************************************************** UDI_CREATE_PRCOESS
-* UDICreateProcess() tells the target OS that a
-* process is to be created and gets a PID back unless
-* there is some error.
-*/
-UDIError UDICreateProcess(pid)
-UDIPId *pid; /* out */
-{
- UDIInt32 service_id = UDICreateProcess_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIPId(udrs, pid);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/***************************************************** UDI_Set_Current_Process
-* UDISetCurrentProcess uses a pid supplied by
-* UDICreateProcess and sets it as the default for all
-* udi calls until a new one is set. A user of a
-*/
-UDIError UDISetCurrentProcess (pid)
-UDIPId pid; /* In */
-{
- UDIInt32 service_id = UDISetCurrentProcess_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIPId(udrs, &pid);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/****************************************************** UDI_INITIALISE_PROCESS
-* UDIInitializeProcess() prepare process for
-* execution. (Reset processor if process os processor).
-*/
-UDIError UDIInitializeProcess( ProcessMemory, NumberOfRanges, EntryPoint,
- StackSizes, NumberOfStacks, ArgString)
-UDIMemoryRange ProcessMemory[]; /* In */
-UDIInt NumberOfRanges; /* In */
-UDIResource EntryPoint; /* In */
-CPUSizeT *StackSizes; /* In */
-UDIInt NumberOfStacks; /* In */
-char *ArgString; /* In */
-{
- UDIInt32 service_id = UDIInitializeProcess_c;
- int cnt;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIInt(udrs, &NumberOfRanges);
- for(cnt = 0; cnt < NumberOfRanges; cnt++)
- udr_UDIMemoryRange(udrs, &ProcessMemory[cnt] );
- udr_UDIResource(udrs, &EntryPoint);
- udr_UDIInt(udrs, &NumberOfStacks);
- for(cnt = 0; cnt < NumberOfStacks; cnt++)
- udr_CPUSizeT(udrs, &StackSizes[cnt]);
- udr_string(udrs, ArgString);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/********************************************************* UDI_DESTROY_PROCESS
-* UDIDestroyProcess() frees a process resource
-* previously created by UDICreateProcess().
-*/
-UDIError UDIDestroyProcess(pid)
-UDIPId pid; /* in */
-{
- UDIInt32 service_id = UDIDestroyProcess_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIPId(udrs, &pid);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/****************************************************************** UDI_READ
-* UDIRead() reads a block of objects from a target
-* address space to host space.
-*/
-
-UDIError UDIRead (from, to, count, size, count_done, host_endian)
-UDIResource from; /* in - source address on target */
-UDIHostMemPtr to; /* out - destination address on host */
-UDICount count; /* in -- count of objects to be transferred */
-UDISizeT size; /* in -- size of each object */
-UDICount *count_done; /* out - count actually transferred */
-UDIBool host_endian; /* in -- flag for endian information */
-{
- UDIInt32 service_id = UDIRead_c;
- int byte_count;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIResource(udrs, &from);
- udr_UDICount(udrs, &count);
- udr_UDISizeT(udrs, &size);
- udr_UDIBool(udrs, &host_endian);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" paramters */
- udr_UDICount(udrs, count_done);
- byte_count = (*count_done) * size;
- if(*count_done > 0 && *count_done <= count)
- udr_bytes(udrs, to, byte_count);
- if(udr_errno) return udr_errno;
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/****************************************************************** UDI_WRITE
-* UDIWrite() writes a block of objects from host
-* space to a target address+space.
-*/
-UDIError UDIWrite( from, to, count, size, count_done, host_endian )
-UDIHostMemPtr from; /* in -- source address on host */
-UDIResource to; /* in -- destination address on target */
-UDICount count; /* in -- count of objects to be transferred */
-UDISizeT size; /* in -- size of each object */
-UDICount *count_done; /* out - count actually transferred */
-UDIBool host_endian; /* in -- flag for endian information */
-{
- UDIInt32 service_id = UDIWrite_c;
- int byte_count = count * size;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIResource(udrs, &to);
- udr_UDICount(udrs, &count);
- udr_UDISizeT(udrs, &size);
- udr_UDIBool(udrs, &host_endian);
- udr_bytes(udrs, from, byte_count);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" paramters */
- udr_UDICount(udrs, count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************************** UDI_COPY
-* UDICopy() copies a block of objects from one target
-* get address/space to another target address/space.
-*/
-UDIError UDICopy(from, to, count, size, count_done, direction )
-UDIResource from; /* in -- destination address on target */
-UDIResource to; /* in -- source address on target */
-UDICount count; /* in -- count of objects to be transferred */
-UDISizeT size; /* in -- size of each object */
-UDICount *count_done; /* out - count actually transferred */
-UDIBool direction; /* in -- high-to-low or reverse */
-{
- UDIInt32 service_id = UDICopy_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIResource(udrs, &from);
- udr_UDIResource(udrs, &to);
- udr_UDICount(udrs, &count);
- udr_UDISizeT(udrs, &size);
- udr_UDIBool(udrs, &direction);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDICount(udrs, count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/***************************************************************** UDI_EXECUTE
-* UDIExecute() continues execution of the default
-* process from the current PC.
-*/
-UDIError UDIExecute()
-{
- UDIInt32 service_id = UDIExecute_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************************** UDI_STEP
-* UDIStep() specifies a number of "instruction"
-* steps to make.
-*/
-UDIError UDIStep(steps, steptype, range)
-UDIUInt32 steps; /* in -- number of steps */
-UDIStepType steptype; /* in -- type of stepping to be done */
-UDIRange range; /* in -- range if StepInRange is TRUE */
-{
- UDIInt32 service_id = UDIStep_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIInt32(udrs, &steps);
- udr_UDIStepType(udrs, &steptype);
- udr_UDIRange(udrs, &range);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************************** UDI_STOP
-* UDIStop() stops the default process
-*/
-UDIVoid UDIStop()
-{
- if (strcmp(session[current].soc_con_p->domain_string, "AF_UNIX") == 0)
- kill(session[current].soc_con_p->tip_pid, SIGINT);
- else
- udr_signal(udrs);
-
-/* XXX - should clean up session[] and soc_con[] structs here as well... */
-
- return;
-}
-
-/******************************************************************** UDI_WAIT
-* UDIWait() returns the state of the target procesor.
-*/
-UDIError UDIWait(maxtime, pid, stop_reason)
-UDIInt32 maxtime; /* in -- maximum time to wait for completion */
-UDIPId *pid; /* out -- pid of process which stopped if any */
-UDIUInt32 *stop_reason; /* out -- PC where process stopped */
-{
- UDIInt32 service_id = UDIWait_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIInt32(udrs, &maxtime);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIPId(udrs, pid);
- udr_UDIUInt32(udrs, stop_reason);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/********************************************************** UDI_SET_BREAKPOINT
-* UDISetBreakpoint() sets a breakpoint at an adress
-* and uses the passcount to state how many
-* times that instruction should be hit before the
-* break occurs.
-*/
-UDIError UDISetBreakpoint (addr, passcount, type, break_id)
-UDIResource addr; /* in -- where breakpoint gets set */
-UDIInt32 passcount; /* in -- passcount for breakpoint */
-UDIBreakType type; /* in -- breakpoint type */
-UDIBreakId *break_id; /* out - assigned break id */
-{
- UDIInt32 service_id = UDISetBreakpoint_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIResource(udrs, &addr);
- udr_UDIInt32(udrs, &passcount);
- udr_UDIBreakType(udrs, &type);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIBreakId(udrs, break_id);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************** UDI_QUERY_BREAKPOINT
-*/
-UDIError UDIQueryBreakpoint (break_id, addr, passcount, type, current_count)
-UDIBreakId break_id; /* in -- assigned break id */
-UDIResource *addr; /* out - where breakpoint was set */
-UDIInt32 *passcount; /* out - trigger passcount for breakpoint */
-UDIBreakType *type; /* out - breakpoint type */
-UDIInt32 *current_count; /* out - current count for breakpoint */
-{
- UDIInt32 service_id = UDIQueryBreakpoint_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIBreakId(udrs, &break_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIResource(udrs, addr);
- udr_UDIInt32(udrs, passcount);
- udr_UDIBreakType(udrs, type);
- udr_UDIInt32(udrs, current_count);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/******************************************************** UDI_CLEAR_BREAKPOINT
-* UDIClearBreakpoint() is used to clear a breakpoint.
-*/
-UDIError UDIClearBreakpoint (break_id)
-UDIBreakId break_id; /* in -- assigned break id */
-{
- UDIInt32 service_id = UDIClearBreakpoint_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIBreakId(udrs, &break_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************************** UDI_GET_STDOUT
-* UDIGetStdout() is called when a call to
-* UDIWait() indicates there is STD output data ready.
-*/
-UDIError UDIGetStdout(buf, bufsize, count_done)
-UDIHostMemPtr buf; /* out -- buffer to be filled */
-UDISizeT bufsize; /* in -- buffer size in bytes */
-UDISizeT *count_done; /* out -- number of bytes written to buf */
-{
- UDIInt32 service_id = UDIGetStdout_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISizeT(udrs, &bufsize);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDISizeT(udrs, count_done);
- udr_bytes(udrs, buf, *count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************************** UDI_GET_STDERR
-* UDIGetStderr() is called when a call to
-* UDIWait() indicates there is STDERR output data ready
-*/
-UDIError UDIGetStderr(buf, bufsize, count_done)
-UDIHostMemPtr buf; /* out -- buffer to be filled */
-UDISizeT bufsize; /* in -- buffer size in bytes */
-UDISizeT *count_done; /* out -- number of bytes written to buf */
-{
- UDIInt32 service_id = UDIGetStderr_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISizeT(udrs, &bufsize);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDISizeT(udrs, count_done);
- udr_bytes(udrs, buf, *count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/*************************************************************** UDI_PUT_STDIN
-* UDIPutStdin() is called whenever the DFE wants to
-* deliver an input character to the TIP.
-*/
-UDIError UDIPutStdin (buf, count, count_done)
-UDIHostMemPtr buf; /* in -- buffer to be filled */
-UDISizeT count; /* in -- buffer size in bytes */
-UDISizeT *count_done; /* out - number of bytes written to buf */
-{
- UDIInt32 service_id = UDIPutStdin_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISizeT(udrs, &count);
- udr_bytes(udrs, buf, count);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDISizeT(udrs, count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************************** UDI_STDIN_MODE
-* UDIStdinMode() is used to change the mode that chazcters
-* are fetched from the user.
-*/
-UDIError UDIStdinMode(mode)
-UDIMode *mode; /* out - */
-{
- UDIInt32 service_id = UDIStdinMode_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIMode(udrs, mode);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/*************************************************************** UDI_PUT_TRANS
-* UDIPutTrans() is used to feed input to the passthru mode.
-*/
-UDIError UDIPutTrans (buf, count, count_done)
-UDIHostMemPtr buf; /* in -- buffer address containing input data */
-UDISizeT count; /* in -- number of bytes in buf */
-UDISizeT *count_done; /* out-- number of bytes transfered */
-{
- UDIInt32 service_id = UDIPutTrans_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISizeT(udrs, &count);
- udr_bytes(udrs, buf, count);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDISizeT(udrs, count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/*************************************************************** UDI_GET_TRANS
-* UDIGetTrans() is used to get output lines from the
-* passthru mode.
-*/
-UDIError UDIGetTrans (buf, bufsize, count_done)
-UDIHostMemPtr buf; /* out -- buffer to be filled */
-UDISizeT bufsize; /* in -- size of buf */
-UDISizeT *count_done; /* out -- number of bytes in buf */
-{
- UDIInt32 service_id = UDIGetTrans_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDISizeT(udrs, &bufsize);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDISizeT(udrs, count_done);
- udr_bytes(udrs, buf, *count_done);
- udr_UDIError(udrs, &dfe_errno); /* get any TIP error */
- return dfe_errno;
-}
-
-/************************************************************** UDI_Trans_Mode
-* UDITransMode() is used to change the mode that the
-* transparent routines operate in.
-*/
-UDIError UDITransMode(mode)
-UDIMode *mode; /* out -- selected mode */
-{
- UDIInt32 service_id = UDITransMode_c;
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
- udr_UDIMode(udrs, mode);
- udr_sendnow(udrs);
- if(udr_errno) return udr_errno;
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- udr_UDIError(udrs, &dfe_errno);
- return dfe_errno;
-}
-
-/******************************************************************** UDI_TEST
-*/
-UDIError UDITest( cnt, str_p, array)
-UDISizeT cnt;
-UDIHostMemPtr str_p;
-UDIInt32 array[];
-{
- UDIInt32 service_id = UDITest_c;
- UDIInt16 scnt = cnt;
- UDISizeT r_cnt;
- char buf[256];
-
- udr_errno = 0;
- udrs->udr_op = UDR_ENCODE; /* send all "in" parameters */
- udr_UDIInt32(udrs, &service_id);
-
- printf("send cnt=%d scnt=%d\n", cnt, scnt);
- udr_UDISizeT(udrs, &cnt);
- udr_UDIInt16(udrs, &scnt);
- printf(" array[0]=0x%x array[1]=0x%x array[2]=0x%x array[3]=0x%x\n",
- array[0], array[1], array[2], array[3]);
- udr_bytes(udrs, (char*)array, 4*sizeof(UDIInt32));
- printf(" string=%s\n", str_p);
- udr_string(udrs, str_p);
- udr_sendnow(udrs);
- if(udr_errno)
- { fprintf(stderr, " DFE-ipc Send ERROR\n");
- return udr_errno;
- }
-
- udrs->udr_op = UDR_DECODE; /* receive all "out" parameters */
- printf("recv ");
- udr_UDISizeT(udrs, &r_cnt);
- udr_UDIInt16(udrs, &scnt);
- printf(" rcnt=%d scnt=%d\n", r_cnt, scnt);
- udr_bytes(udrs, (char*)array, 4*sizeof(UDIInt32));
-
- printf(" array[0]=0x%x array[1]=0x%x array[2]=0x%x array[3]=0x%x\n",
- array[0], array[1], array[2], array[3]);
- udr_string(udrs, str_p);
- printf(" string=%s\n", str_p);
-
- udr_UDIError(udrs, &dfe_errno);
- return dfe_errno;
-}
-
-
-
-UDIUInt32 UDIGetDFEIPCId()
-{
- return ((company_c << 16) + (product_c << 12) + version_c);
-}
-#endif /* __GO32__ */
+++ /dev/null
-/* This file just picks the correct udiphxxx.h depending on the host.
- The two hosts that are now defined are UNIX and MSDOS.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-/*
- * For the moment, we will default to BSD_IPC; this might change if/when
- * another type of IPC (Mach? SysV?) is implemented.
- */
-
-#if 0
-
-/* We don't seem to have a copy of udiphdos.h. Furthermore, all the
- things in udiphunix.h are pretty much generic 32-bit machine defines
- which don't have anything to do with IPC. */
-
-#ifdef DOS_IPC
-#include "udiphdos.h"
-#else
-/*#ifdef BSD_IPC */
-#include "udiphunix.h"
-#endif
-
-#else
-
-#include "udiphunix.h"
-
-#endif
+++ /dev/null
-/* Originally called "udiphsun.h", however it was not very
- Sun-specific; now it is used for generic-unix-with-bsd-ipc.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-/* This file is to be used to reconfigure the UDI Procedural interface
- for a given host. This file should be placed so that it will be
- included from udiproc.h. Everything in here may need to be changed
- when you change either the host CPU or its compiler. Nothing in
- here should change to support different targets. There are multiple
- versions of this file, one for each of the different host/compiler
- combinations in use.
-*/
-
-#define UDIStruct struct /* _packed not needed on unix */
-/* First, we need some types */
-/* Types with at least the specified number of bits */
-typedef double UDIReal64; /* 64-bit real value */
-typedef float UDIReal32; /* 32-bit real value */
-
-typedef unsigned long UDIUInt32; /* unsigned integers */
-typedef unsigned short UDIUInt16;
-typedef unsigned char UDIUInt8;
-
-typedef long UDIInt32; /* 32-bit integer */
-typedef short UDIInt16; /* 16-bit integer */
-typedef char UDIInt8; /* unreliable signedness */
-
-/* To aid in supporting environments where the DFE and TIP use
-different compilers or hosts (like DOS 386 on one side, 286 on the
-other, or different Unix machines connected by sockets), we define
-two abstract types - UDIInt and UDISizeT.
-UDIInt should be defined to be int except for host/compiler combinations
-that are intended to talk to existing UDI components that have a different
-sized int. Similarly for UDISizeT.
-*/
-typedef int UDIInt;
-typedef unsigned int UDIUInt;
-
-typedef unsigned int UDISizeT;
-
-/* Now two void types. The first is for function return types,
-the other for pointers to no particular type. Since these types
-are used solely for documentational clarity, if your host/compiler
-doesn't support either one, replace them with int and char *
-respectively.
-*/
-typedef void UDIVoid; /* void type */
-typedef void * UDIVoidPtr; /* void pointer type */
-typedef void * UDIHostMemPtr; /* Arbitrary memory pointer */
-
-/* Now we want a type optimized for boolean values. Normally this
- would be int, but on some machines (Z80s, 8051s, etc) it might
- be better to map it onto a char
-*/
-typedef int UDIBool;
-
-/* Now indicate whether your compiler support full ANSI style
- prototypes. If so, use #if 1. If not use #if 0.
-*/
-#if 0
-#define UDIParams(x) x
-#else
-#define UDIParams(x) ()
-#endif
+++ /dev/null
-/* local type decs. and macro defs.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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 "udiphcfg.h" /* Get host specific configuration */
-#include "udiptcfg.h" /* Get target specific configuration */
-
-/* Here are all of the CPU Families for which UDI is currently defined */
-#define Am29K 1 /* AMD's Am290xx and Am292xx parts */
-
-typedef UDIInt UDIError;
-typedef UDIInt UDISessionId;
-typedef UDIInt UDIPId;
-typedef UDIInt UDIStepType;
-typedef UDIInt UDIBreakType;
-typedef UDIUInt UDIBreakId;
-typedef UDIUInt UDIMode;
-
-typedef UDIStruct
-{
- CPUSpace Space;
- CPUOffset Offset;
-} UDIResource;
-
-typedef UDIStruct
-{
- CPUOffset Low;
- CPUOffset High;
-} UDIRange;
-
-typedef UDIStruct
-{
- CPUSpace Space;
- CPUOffset Offset;
- CPUSizeT Size;
- } UDIMemoryRange;
-
-/* Values for UDIStepType parameters */
-#define UDIStepNatural 0x0000
-#define UDIStepOverTraps 0x0001
-#define UDIStepOverCalls 0x0002
-#define UDIStepInRange 0x0004
-#define UDIStepNatural 0x0000
-
-/* Values for UDIBreakType parameters */
-#define UDIBreakFlagExecute 0x0001
-#define UDIBreakFlagRead 0x0002
-#define UDIBreakFlagWrite 0x0004
-#define UDIBreakFlagFetch 0x0008
-
-/* Special values for UDIWait MaxTime parameter */
-#define UDIWaitForever (UDIInt32) -1 /* Infinite time delay */
-
-/* Special values for PId */
-#define UDIProcessProcessor -1 /* Raw Hardware, if possible */
-
-/* Values for UDIWait StopReason */
-#define UDIGrossState 0xff
-#define UDITrapped 0 /* Fine state - which trap */
-#define UDINotExecuting 1
-#define UDIRunning 2
-#define UDIStopped 3
-#define UDIWarned 4
-#define UDIStepped 5
-#define UDIWaiting 6
-#define UDIHalted 7
-#define UDIStdoutReady 8 /* fine state - size */
-#define UDIStderrReady 9 /* fine state - size */
-#define UDIStdinNeeded 10 /* fine state - size */
-#define UDIStdinModeX 11 /* fine state - mode */
-#define UDIBreak 12 /* Fine state - Breakpoint Id */
-#define UDIExited 13 /* Fine state - exit code */
-
-/* Enumerate the return values from the callback function
- for UDIEnumerateTIPs.
-*/
-#define UDITerminateEnumeration 0
-#define UDIContinueEnumeration 1
-
-/* Enumerate values for Terminate parameter to UDIDisconnect */
-#define UDITerminateSession 1
-#define UDIContinueSession 0
-
-/* Error codes */
-#define UDINoError 0 /* No error occured */
-#define UDIErrorNoSuchConfiguration 1
-#define UDIErrorCantHappen 2
-#define UDIErrorCantConnect 3
-#define UDIErrorNoSuchConnection 4
-#define UDIErrorNoConnection 5
-#define UDIErrorCantOpenConfigFile 6
-#define UDIErrorCantStartTIP 7
-#define UDIErrorConnectionUnavailable 8
-#define UDIErrorTryAnotherTIP 9
-#define UDIErrorExecutableNotTIP 10
-#define UDIErrorInvalidTIPOption 11
-#define UDIErrorCantDisconnect 12
-#define UDIErrorUnknownError 13
-#define UDIErrorCantCreateProcess 14
-#define UDIErrorNoSuchProcess 15
-#define UDIErrorUnknownResourceSpace 16
-#define UDIErrorInvalidResource 17
-#define UDIErrorUnsupportedStepType 18
-#define UDIErrorCantSetBreakpoint 19
-#define UDIErrorTooManyBreakpoints 20
-#define UDIErrorInvalidBreakId 21
-#define UDIErrorNoMoreBreakIds 22
-#define UDIErrorUnsupportedService 23
-#define UDIErrorTryAgain 24
-#define UDIErrorIPCLimitation 25
-#define UDIErrorIncomplete 26
-#define UDIErrorAborted 27
-#define UDIErrorTransDone 28
-#define UDIErrorCantAccept 29
-#define UDIErrorTransInputNeeded 30
-#define UDIErrorTransModeX 31
-#define UDIErrorInvalidSize 32
-#define UDIErrorBadConfigFileEntry 33
-#define UDIErrorIPCInternal 34
-/* TBD */
-
-/****************************************************************** PROCEDURES
-*/
-
-UDIError UDIConnect UDIParams((
- char *Configuration, /* In */
- UDISessionId *Session /* Out */
- ));
-
-UDIError UDIDisconnect UDIParams((
- UDISessionId Session, /* In */
- UDIBool Terminate /* In */
- ));
-
-UDIError UDISetCurrentConnection UDIParams((
- UDISessionId Session /* In */
- ));
-
-UDIError UDICapabilities UDIParams((
- UDIUInt32 *TIPId, /* Out */
- UDIUInt32 *TargetId, /* Out */
- UDIUInt32 DFEId, /* In */
- UDIUInt32 DFE, /* In */
- UDIUInt32 *TIP, /* Out */
- UDIUInt32 *DFEIPCId, /* Out */
- UDIUInt32 *TIPIPCId, /* Out */
- char *TIPString /* Out */
- ));
-
-UDIError UDIEnumerateTIPs UDIParams((
- UDIInt (*UDIETCallback) /* In */
- UDIParams(( char *Configuration )) /* In to callback() */
- ));
-
-UDIError UDIGetErrorMsg UDIParams((
- UDIError ErrorCode, /* In */
- UDISizeT MsgSize, /* In */
- char *Msg, /* Out */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDIGetTargetConfig UDIParams((
- UDIMemoryRange KnownMemory[], /* Out */
- UDIInt *NumberOfRanges, /* In/Out */
- UDIUInt32 ChipVersions[], /* Out */
- UDIInt *NumberOfChips /* In/Out */
- ));
-
-UDIError UDICreateProcess UDIParams((
- UDIPId *PId /* Out */
- ));
-
-UDIError UDISetCurrentProcess UDIParams((
- UDIPId PId /* In */
- ));
-
-UDIError UDIDestroyProcess UDIParams((
- UDIPId PId /* In */
- ));
-
-UDIError UDIInitializeProcess UDIParams((
- UDIMemoryRange ProcessMemory[], /* In */
- UDIInt NumberOfRanges, /* In */
- UDIResource EntryPoint, /* In */
- CPUSizeT StackSizes[], /* In */
- UDIInt NumberOfStacks, /* In */
- char *ArgString /* In */
- ));
-
-UDIError UDIRead UDIParams((
- UDIResource From, /* In */
- UDIHostMemPtr To, /* Out */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool HostEndian /* In */
- ));
-
-UDIError UDIWrite UDIParams((
- UDIHostMemPtr From, /* In */
- UDIResource To, /* In */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool HostEndian /* In */
- ));
-
-UDIError UDICopy UDIParams((
- UDIResource From, /* In */
- UDIResource To, /* In */
- UDICount Count, /* In */
- UDISizeT Size, /* In */
- UDICount *CountDone, /* Out */
- UDIBool Direction /* In */
- ));
-
-UDIError UDIExecute UDIParams((
- void
- ));
-
-UDIError UDIStep UDIParams((
- UDIUInt32 Steps, /* In */
- UDIStepType StepType, /* In */
- UDIRange Range /* In */
- ));
-
-UDIVoid UDIStop UDIParams((
- void
- ));
-
-UDIError UDIWait UDIParams((
- UDIInt32 MaxTime, /* In */
- UDIPId *PId, /* Out */
- UDIUInt32 *StopReason /* Out */
- ));
-
-UDIError UDISetBreakpoint UDIParams((
- UDIResource Addr, /* In */
- UDIInt32 PassCount, /* In */
- UDIBreakType Type, /* In */
- UDIBreakId *BreakId /* Out */
- ));
-
-UDIError UDIQueryBreakpoint UDIParams((
- UDIBreakId BreakId, /* In */
- UDIResource *Addr, /* Out */
- UDIInt32 *PassCount, /* Out */
- UDIBreakType *Type, /* Out */
- UDIInt32 *CurrentCount /* Out */
- ));
-
-UDIError UDIClearBreakpoint UDIParams((
- UDIBreakId BreakId /* In */
- ));
-
-UDIError UDIGetStdout UDIParams((
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDIGetStderr UDIParams((
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDIPutStdin UDIParams((
- UDIHostMemPtr Buf, /* In */
- UDISizeT Count, /* In */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDIStdinMode UDIParams((
- UDIMode *Mode /* Out */
- ));
-
-UDIError UDIPutTrans UDIParams((
- UDIHostMemPtr Buf, /* In */
- UDISizeT Count, /* In */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDIGetTrans UDIParams((
- UDIHostMemPtr Buf, /* Out */
- UDISizeT BufSize, /* In */
- UDISizeT *CountDone /* Out */
- ));
-
-UDIError UDITransMode UDIParams((
- UDIMode *Mode /* Out */
- ));
+++ /dev/null
-/* This file is to be used to reconfigure the UDI Procedural interface
- for a given target.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-/* This file should be placed so that it will be
- included from udiproc.h. Everything in here will probably need to
- be changed when you change the target processor. Nothing in here
- should need to change when you change hosts or compilers.
-*/
-
-/* Select a target CPU Family */
-#define TargetCPUFamily Am29K
-
-/* Enumerate the processor specific values for Space in a resource */
-#define UDI29KDRAMSpace 0
-#define UDI29KIOSpace 1
-#define UDI29KCPSpace0 2
-#define UDI29KCPSpace1 3
-#define UDI29KIROMSpace 4
-#define UDI29KIRAMSpace 5
-#define UDI29KLocalRegs 8
-#define UDI29KGlobalRegs 9
-#define UDI29KRealRegs 10
-#define UDI29KSpecialRegs 11
-#define UDI29KTLBRegs 12 /* Not Am29005 */
-#define UDI29KACCRegs 13 /* Am29050 only */
-#define UDI29KICacheSpace 14 /* Am2903x only */
-#define UDI29KAm29027Regs 15 /* When available */
-#define UDI29KPC 16
-#define UDI29KDCacheSpace 17 /* When available */
-
-/* Enumerate the Co-processor registers */
-#define UDI29KCP_F 0
-#define UDI29KCP_Flag 8
-#define UDI29KCP_I 12
-#define UDI29KCP_ITmp 16
-#define UDI29KCP_R 20
-#define UDI29KCP_S 28
-#define UDI29KCP_RTmp 36
-#define UDI29KCP_STmp 44
-#define UDI29KCP_Stat 52
-#define UDI29KCP_Prec 56
-#define UDI29KCP_Reg0 60
-#define UDI29KCP_Reg1 68
-#define UDI29KCP_Reg2 76
-#define UDI29KCP_Reg3 84
-#define UDI29KCP_Reg4 92
-#define UDI29KCP_Reg5 100
-#define UDI29KCP_Reg6 108
-#define UDI29KCP_Reg7 116
-#define UDI29KCP_Mode 124
-
-/* Enumerate the stacks in StackSizes array */
-#define UDI29KMemoryStack 0
-#define UDI29KRegisterStack 1
-
-/* Enumerate the chips for ChipVersions array */
-#define UDI29K29KVersion 0
-#define UDI29K29027Version 1
-
-/* Define special value for elements of ChipVersions array for
- * chips not present */
-#define UDI29KChipNotPresent -1
-
-typedef UDIInt32 UDICount;
-typedef UDIUInt32 UDISize;
-
-typedef UDIInt CPUSpace;
-typedef UDIUInt32 CPUOffset;
-typedef UDIUInt32 CPUSizeT;
+++ /dev/null
-/* Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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 "udipt29k.h"
+++ /dev/null
-/* This module defines constants used in the UDI IPC modules.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-static char udisoc_h[]="@(#)udisoc.h 2.6 Daniel Mann";
-static char udisoc_h_AMD[]="@(#)udisoc.h 2.4, AMD";
-
-#define LOCAL static
-#define company_c 1 /* AMD Company id */
-#define product_c 1 /* socket IPC id */
-
-/* Enumerate the UDI procedure services
-*/
-#define UDIConnect_c 0
-#define UDIDisconnect_c 1
-#define UDISetCurrentConnection_c 2
-#define UDICapabilities_c 3
-#define UDIEnumerateTIPs_c 4
-#define UDIGetErrorMsg_c 5
-#define UDIGetTargetConfig_c 6
-#define UDICreateProcess_c 7
-#define UDISetCurrentProcess_c 8
-#define UDIDestroyProcess_c 9
-#define UDIInitializeProcess_c 10
-#define UDIRead_c 11
-#define UDIWrite_c 12
-#define UDICopy_c 13
-#define UDIExecute_c 14
-#define UDIStep_c 15
-#define UDIStop_c 16
-#define UDIWait_c 17
-#define UDISetBreakpoint_c 18
-#define UDIQueryBreakpoint_c 19
-#define UDIClearBreakpoint_c 20
-#define UDIGetStdout_c 21
-#define UDIGetStderr_c 22
-#define UDIPutStdin_c 23
-#define UDIStdinMode_c 24
-#define UDIPutTrans_c 25
-#define UDIGetTrans_c 26
-#define UDITransMode_c 27
-#define UDITest_c 28
-#define UDIKill_c 29
-
-#define udr_UDIInt8(udrs, obj) udr_work(udrs, obj, 1)
-#define udr_UDIInt16(udrs, obj) udr_work(udrs, obj, 2)
-#define udr_UDIInt32(udrs, obj) udr_work(udrs, obj, 4)
-#define udr_UDIInt(udrs, obj) udr_work(udrs, obj, 4)
-
-#define udr_UDIUInt8(udrs, obj) udr_work(udrs, obj, 1)
-#define udr_UDIUInt16(udrs, obj) udr_work(udrs, obj, 2)
-#define udr_UDIUInt32(udrs, obj) udr_work(udrs, obj, 4)
-#define udr_UDIUInt(udrs, obj) udr_work(udrs, obj, 4)
-
-#define udr_UDIBool(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_UDICount(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_UDISize(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define udr_CPUSpace(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_CPUOffset(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define udr_CPUSizeT(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define udr_UDIBreakId(udrs,obj) udr_UDIUInt(udrs, obj)
-#define udr_UDISizeT(udrs, obj) udr_UDIUInt(udrs, obj)
-#define udr_UDIMode(udrs, obj) udr_UDIUInt(udrs, obj)
-
-#define udr_UDIHostMemPtr(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define udr_UDIVoidPtr(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define udr_UDIPId(udrs, obj) udr_UDIUInt(udrs, obj)
-#define udr_UDISessionId(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_UDIError(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_UDIStepType(udrs, obj) udr_UDIInt32(udrs, obj)
-#define udr_UDIBreakType(udrs, obj) udr_UDIInt32(udrs, obj)
-
-
-#define UDR_ENCODE 1
-#define UDR_DECODE 2
-
-typedef struct UDR_str
-{
- int udr_op; /* UDR operation */
- int previous_op;
- int sd;
- int bufsize;
- char* buff;
- char* getbytes;
- char* putbytes;
- char* putend;
- int domain;
- char* soc_name;
-} UDR;
-
-/******************************************* Declare UDR suport functions */
-int udr_create UDIParams((
- UDR* udrs,
- int sd,
- int size
- ));
-
-int udr_free UDIParams((
- UDR* udrs,
- ));
-
-int udr_signal UDIParams((
- UDR* udrs,
- ));
-
-int udr_sendnow UDIParams((
- UDR* udrs
- ));
-
-int udr_work UDIParams((
- UDR* udrs,
- void* object_p,
- int size
- ));
-
-int udr_UDIResource UDIParams((
- UDR* udrs,
- UDIResource* object_p
- ));
-
-int udr_UDIRange UDIParams((
- UDR* udrs,
- UDIRange* object_p
- ));
-
-int udr_UDIMemoryRange UDIParams((
- UDR* udrs,
- UDIMemoryRange* object_p
- ));
-
-int udr_UDIMemoryRange UDIParams((
- UDR* udrs,
- UDIMemoryRange* object_p
- ));
-
-int udr_int UDIParams((
- UDR* udrs,
- int* int_p
- ));
-
-int udr_bytes UDIParams((
- UDR* udrs,
- char* ptr,
- int len
- ));
-
-char* udr_inline UDIParams((
- UDR* udrs,
- int size
- ));
-
-char* udr_getpos UDIParams((
- UDR* udrs
- ));
-int udr_setpos UDIParams((
- UDR* udrs,
- char* pos
- ));
-
-int udr_readnow UDIParams((
- UDR* udrs,
- int size
- ));
-
-int udr_align UDIParams((
- UDR* udrs,
- int size,
- ));
+++ /dev/null
-/* This module supports sending and receiving data objects over a
- socket conection.
-
- Copyright 1993 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-static char udr_c[]="@(#)udr.c 2.8 Daniel Mann";
-static char udr_c_AMD[]="@(#)udr.c 2.3, AMD";
-/*
-* All data is serialised into a character stream,
-* and de-serialised back into the approproiate objects.
-********************************************************************** HISTORY
-*/
-/* This is all unneeded on DOS machines. */
-#ifndef __GO32__
-
-#include <stdio.h>
-#include <sys/types.h>
-
-/* This used to say sys/fcntl.h, but the only systems I know of that
- require that are old (pre-4.3, at least) BSD systems, which we
- probably don't need to worry about. */
-#include <fcntl.h>
-
-#include <sys/socket.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-extern int errno;
-extern char* malloc();
-
-/* local type decs. and macro defs. not in a .h file ************* MACRO/TYPE
-*/
-
-/* global dec/defs. which are not in a .h file ************* EXPORT DEC/DEFS
-*/
-int udr_errno; /* error occurs during UDR service */
-
-/* local dec/defs. which are not in a .h file *************** LOCAL DEC/DEFS
-*/
-
-/****************************************************************** UDR_CREATE
-* Build UDR structure for character stream processing.
-*/
-int udr_create(udrs, sd, size)
-UDR* udrs;
-int sd;
-int size;
-{
- udrs->sd = sd;
- if(!udrs->buff) udrs->buff = malloc(size);
- udrs->getbytes = udrs->buff; /* set the buffer to the start */
- udrs->putbytes = udrs->buff;
- udrs->putend = udrs->buff;
- udrs->udr_op = -1; /* don't know the direction */
- udrs->previous_op = -1; /* don't know the direction */
- udrs->bufsize = size;
- return 0;
-}
-
-/******************************************************************** UDR_FREE
-* Free USR structure and close socket.
-*/
-int udr_free(udrs)
-UDR* udrs;
-{
- close(udrs->sd);
- free(udrs->buff);
- return 0;
-}
-
-/****************************************************************** UDR_SIGNAL
-* Send a signal to the process at the other end of the socket,
-* indicating that it should expect to recieve a new message shortly.
-*/
-int udr_signal(udrs)
-UDR* udrs;
-{
- if(send(udrs->sd, "I", 1, MSG_OOB) == -1)
- { perror("ERROR, udr_signal(), send(...MSG_OOB)");
- udr_errno = UDIErrorIPCInternal;
- return -1; /* return error code */
- }
- return 0;
-}
-
-/***************************************************************** UDR_SENDNOW
-* used to flush the current character stream buffer to
-* the associated socket. */
-int udr_sendnow(udrs)
-UDR* udrs;
-{
- int size = (UDIUInt32)(udrs->putend) - (UDIUInt32)(udrs->buff);
- if(udrs->previous_op == 0)
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- udrs->putbytes = udrs->buff;
- udrs->putend = udrs->buff;
- if (write(udrs->sd, udrs->buff, size) == -1)
- { perror("ERROR, udr_sendnow(), write() call: ");
- udr_errno = UDIErrorIPCInternal;
- return -1; /* return error code */
- }
- return 0;
-}
-
-/******************************************************************** UDR_WORK
-* Function to send or recieve data from the buffers supporting
-* socket communication. The buffer contains serialised objects
-* sent/recieved over a socket connection.
-*/
-int udr_work(udrs, object_p, size)
-UDR* udrs;
-void* object_p;
-int size;
-{
- int cnt, remain;
-
- if(udrs->udr_op != udrs->previous_op)
- { if(udrs->previous_op == 0)
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- udrs->previous_op= udrs->udr_op;
- udrs->putbytes = udrs->buff;
- udrs->getbytes = udrs->buff;
- }
-
- if(udrs->udr_op == UDR_ENCODE)
- { /* write data into character stream buffer */
- if( (UDIUInt32)(udrs->putbytes) + size >
- (UDIUInt32)(udrs->buff) + (UDIUInt32)(udrs->bufsize) )
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- memcpy(udrs->putbytes, (char*)object_p, size);
- udrs->putbytes += size;
- if(udrs->putbytes > udrs->putend) udrs->putend = udrs->putbytes;
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
- { /* need more data in character stream buffer */
- remain = (UDIUInt32)(udrs->bufsize) -
- ( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->buff) );
- if( ((UDIUInt32)(udrs->bufsize) + (UDIUInt32)(udrs->buff)
- - (UDIUInt32)(udrs->getbytes)) < size)
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- cnt = read(udrs->sd, (char*)udrs->putbytes, remain);
- if(cnt == -1) perror("ERROR udr_work(), read() failure: ");
- udrs->putbytes += cnt;
- if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
- { udr_errno = UDIErrorIPCInternal;
- return -1; /* return error code */
- }
- } /* read data from character stream buffer */
- memcpy((char*)object_p, udrs->getbytes, size);
- udrs->getbytes += size;
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- return 0;
-}
-
-/************************************************************* UDR_UDIResource
-*/
-int udr_UDIResource(udrs, object_p)
-UDR* udrs;
-UDIResource* object_p;
-{
- int retval;
-
- retval = udr_CPUSpace(udrs, &object_p->Space);
- retval = retval | udr_CPUOffset(udrs, &object_p->Offset);
- return retval;
-}
-
-/**************************************************************** UDR_UDIRange
-*/
-int udr_UDIRange(udrs, object_p)
-UDR* udrs;
-UDIRange* object_p;
-{
- int retval;
-
- retval = udr_CPUOffset(udrs, &object_p->Low);
- retval = retval | udr_CPUOffset(udrs, &object_p->High);
- return retval;
-}
-
-/********************************************************** UDR_UDIMemoryRange
-*/
-int udr_UDIMemoryRange(udrs, object_p)
-UDR* udrs;
-UDIMemoryRange* object_p;
-{
- int retval;
-
- retval = udr_CPUSpace(udrs, &object_p->Space);
- retval = retval | udr_CPUOffset(udrs, &object_p->Offset);
- retval = retval | udr_CPUSizeT(udrs, &object_p->Size);
- return retval;
-}
-
-/****************************************************************** UDR_string
-*/
-int udr_string(udrs, sp)
-UDR* udrs;
-char* sp;
-{
- int len, retval;
-
- if(udrs->udr_op == UDR_ENCODE)
- {
- if(sp)
- { len = strlen(sp) + 1;
- retval = udr_UDIInt32(udrs, &len);
- retval = retval | udr_work(udrs, sp, len);
- }
- else /* deal with NULL pointer */
- { len = 0;
- retval = udr_UDIInt32(udrs, &len);
- }
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- retval = udr_UDIInt32(udrs, &len);
- if(len)
- retval = retval | udr_work(udrs, sp, len);
- else *sp = '\0'; /* terminate string */
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- return retval;
-}
-
-/******************************************************************* UDR_BYTES
-*/
-int udr_bytes(udrs, ptr, len)
-UDR* udrs;
-char* ptr;
-int len;
-{
- return udr_work(udrs, ptr, len);
-}
-
-/********************************************************************* UDR_INT
-*/
-int udr_int(udrs, int_p)
-UDR* udrs;
-int* int_p;
-{
- int ret_val;
- UDIInt32 udr_obj; /* object of know size */
-
- if(udrs->udr_op == UDR_ENCODE)
- {
- udr_obj = *int_p; /* copy into know object size */
- return udr_UDIInt32(udrs, &udr_obj);
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- ret_val = udr_UDIInt32(udrs, &udr_obj); /* get object of known size */
- *int_p = udr_obj;
- return ret_val;
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
-}
-
-/****************************************************************** UDR_INLINE
-*/
-char* udr_inline(udrs, size)
-UDR* udrs;
-int size;
-{
- if(udrs->udr_op != udrs->previous_op)
- { if(udrs->previous_op == 0)
- { udr_errno = UDIErrorIPCInternal;
- return 0;
- }
- udrs->previous_op= udrs->udr_op;
- udrs->putbytes = udrs->buff;
- udrs->getbytes = udrs->buff;
- }
- if(udrs->udr_op == UDR_ENCODE)
- {
- if(udrs->putbytes + size > udrs->bufsize + udrs->buff)
- return 0;
- udrs->putbytes += size;
- return udrs->putbytes - size;
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- if(udrs->getbytes + size > udrs->bufsize + udrs->buff)
- return 0;
- udrs->getbytes += size;
- return udrs->getbytes - size;
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return 0;
- }
-}
-
-/****************************************************************** UDR_GETPOS
-*/
-char* udr_getpos(udrs)
-UDR* udrs;
-{
- if(udrs->udr_op == UDR_ENCODE)
- {
- return udrs->putbytes;
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- return udrs->getbytes;
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return 0;
- }
-}
-
-/****************************************************************** UDR_SETPOS
-*/
-int udr_setpos(udrs, pos)
-UDR* udrs;
-char* pos;
-{
- if( ((UDIUInt32)pos > (UDIUInt32)(udrs->buff) + (UDIUInt32)(udrs->bufsize))
- || ((UDIUInt32)pos < (UDIUInt32)(udrs->buff) ) )
- { udr_errno = UDIErrorIPCInternal;
- return 0;
- }
- if(udrs->udr_op == UDR_ENCODE)
- {
- udrs->putbytes = pos;
- return 1;
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- udrs->getbytes = pos;
- return 1;
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return 0;
- }
-}
-
-/***************************************************************** UDR_READNOW
-* Try and ensure "size" bytes are available in the
-* receive buffer character stream.
-*/
-int udr_readnow(udrs, size)
-UDR* udrs;
-int size;
-{
- int cnt, remain;
-
- if(udrs->udr_op == UDR_ENCODE)
- {
- udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- else if(udrs->udr_op == UDR_DECODE)
- {
- if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
- { /* need more data in character stream buffer */
- remain = (UDIUInt32)(udrs->bufsize) -
- ( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->buff) );
- cnt = read(udrs->sd, (char*)udrs->putbytes, remain);
- if(cnt == -1) perror("ERROR udr_work(), read() failure: ");
- udrs->putbytes += cnt;
- if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
- { fprintf(stderr,"ERROR, udr_readnow() too few bytes in stream\n");
- return -1; /* return error code */
- }
- }
- }
- else
- { udr_errno = UDIErrorIPCInternal;
- return -1;
- }
- return 0;
-}
-
-/******************************************************************* UDR_ALIGN
-*/
-int udr_align(udrs, size)
-UDR* udrs;
-int size;
-{
- char* align;
- int offset;
-
- align = udr_getpos(udrs);
- offset = size - ((int)align & (size -1));
- offset = offset & (size -1);
- if(offset) udr_setpos(udrs, align + offset);
-}
-#endif /* __GO32__ */
+++ /dev/null
-# @(#)udi_soc 2.1 Daniel Mann
-# NOTE: the Session string must not start whith white-space characters.
-# Format of string is:
-# <session> <domain> <soc_name|host_name> <tip_exe> <pass to UDIconnect>
-soc2cayman AF_INET cayman /bin/udi_tip ...
-soc2tip AF_UNIX astring tip.exe ...
-cuba AF_UNIX soc_name ../bin.68020/udi_tip stuff to pass
-cayman AF_INET cayman this_entry_not_matter stuff to pass
-iss AF_UNIX * sun4/isstip -r osboot
(mi_execute_command): Don't print the prompt if the command return
is MI_CMD_QUIET.
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * ada-lang.c (fill_in_ada_prototype): Update comment.
+
+2002-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (enum mips_abi): Explicitly start at 0. Add
+ MIPS_ABI_LAST.
+ (mips_abi_string, mips_abi_strings): New.
+ (struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
+ (mips_gdbarch_init): Set tdep->found_abi. Don't set
+ tdep->mips_abi_string. Honor mips_abi_string. Default to
+ O32 if no ABI is found.
+ (mips_dump_tdep): Use mips_abi_strings.
+ (mips_abi_update): New function.
+ (_initialize_mips_tdep): Initialize mips_abi_string. Add
+ ``set mips abi'' and ``show mips abi''. Check the size of
+ mips_abi_strings.
+
+2002-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * i386-linux-tdep.c (i386_linux_register_name): Make return type
+ constant.
+
+2002-06-18 Joel Brobecker <brobecker@gnat.com>
+
+ * alpha-tdep.c (heuristic_proc_desc): Compute the size of the
+ current frame using only the first stack size adjustment. All
+ subsequent size adjustments are not considered to be part of
+ the "static" part of the current frame.
+ Compute the address of the saved registers relative to the
+ Frame Pointer ($fp) instead of the Stack Pointer if $fp is
+ in use in this frame.
+
+2002-06-18 Don Howard <dhoward@redhat.com>
+
+ * valops.c (value_ind): Use value_at_lazy() when dereferencing
+ type int expressions. Thanks to Jim Blandy <jimb@redhat.com> for
+ suggesting this solution.
+
+2002-06-18 Andrew Cagney <ac131313@redhat.com>
+
+ * config/romp/xm-rtbsd.h: Delete file.
+ * config/romp/rtbsd.mh: Delete file.
+
+2002-06-18 Keith Seitz <keiths@redhat.com>
+
+ * breakpoint.c (condition_command): Post breakpoint_modify
+ when a condition is added to an existing breakpoint.
+ (commands_command): Likewise for commands.
+ (set_ignore_count): Likewise for ignore counts.
+ If no tty, do not simply return, still need to send event
+ notification.
+ (ignore_command): Only print a newline if the command came
+ from a tty.
+ Don't call breakpoints_changed, since this is now properly
+ handled by set_ignore_count.
+
+2002-06-18 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Note that cris-elf target can be compiled with
+ -Werror.
+ * cris-tdep.c (cris_register_name): Make return type constant.
+ (cris_breakpoint_from_pc): Ditto.
+
+2002-06-18 Michal Ludvig <mludvig@suse.cz>
+
+ * frame.h (struct frame_info): Change type of context to
+ 'struct context'.
+
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (REGISTER_NAME): Change return type a constant string
+ pointer.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * config/mips/tm-mips.h (mips_register_name): Update.
+ * i386-tdep.h (i386_register_name): Update.
+ * mips-tdep.c (mips_register_name): Update
+ * alpha-tdep.c (alpha_register_name): Update.
+ * arch-utils.c (legacy_register_name): Update.
+ * arch-utils.h (legacy_register_name): Update.
+ * avr-tdep.c (avr_register_name): Update.
+ * ia64-tdep.c (ia64_register_name): Update.
+ * i386-tdep.c (i386_register_name): Update.
+ * sparc-tdep.c (sparc32_register_name): Update.
+ (sparc64_register_name): Update.
+ (sparclite_register_name): Update.
+ (sparclet_register_name): Update.
+ * sh-tdep.c (sh_generic_register_name): Update.
+ (sh_sh_register_name): Update.
+ (sh_sh3_register_name): Update.
+ (sh_sh3e_register_name): Update.
+ (sh_sh_dsp_register_name): Update.
+ (sh_sh3_dsp_register_name): Update.
+ (sh_sh4_register_name): Update.
+ (sh_sh64_register_name): Update.
+ * s390-tdep.c (s390_register_name): Update.
+ * rs6000-tdep.c (rs6000_register_name): Update.
+ * ns32k-tdep.c (ns32k_register_name_32082): Update.
+ (ns32k_register_name_32382): Update.
+ * d10v-tdep.c (d10v_ts2_register_name): Update.
+ (d10v_ts3_register_name): Update.
+ * xstormy16-tdep.c (xstormy16_register_name): Update.
+ * vax-tdep.c (vax_register_name): Update.
+ * v850-tdep.c (v850_register_name): Update.
+ * m68hc11-tdep.c (m68hc11_register_name): Update.
+ * mn10300-tdep.c (mn10300_generic_register_name): Update.
+ (am33_register_name): Update.
+
+2002-06-17 Grace Sainsbury <graces@redhat.com>
+
+ * m68k-tdep.c: Reindented.
+
+2002-06-17 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_indent.sh: Add prgregset_t, fpregset_t, and gregset_t to the
+ list of predefined types.
+
+2002-06-16 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE,
+ REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW): Remove defines.
+ (i386_register_virtual_type, i386_register_convertible,
+ i386_register_convert_to_virtual, i386_register_convert_to_raw):
+ Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+ * config/i386/tm-i386lynx.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386lynx_saved_pc_after_call): Remove prototype.
+ * i386ly-tdep.c: Include "i386-tdep.h".
+ (i386lynx_saved_pc_after_call): Make static. Use
+ read_memory_nobpt instead of read_memory. Use
+ read_memory_unsigned_integer instead of read_memory_integer.
+ (i386lynx_init_abi): New function.
+ (i386lynx_coff_osabi_sniffer): New function.
+ (_initialize_i386bsd_tdep): New function.
+
+ * config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
+ CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
+ CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
+ (i386_fix_call_dummy): Remove prototype.
+ * i386-tdep.c (i386_call_dummy_words): New variable.
+ (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * command.h (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace
+ add_set_auto_boolean_cmd.
+ * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration.
+ * mips-tdep.c (_initialize_mips_tdep): Update ``set mips
+ mask-address'' command.
+ (show_mask_address): Add cmd parameter.
+ * remote.c (add_packet_config_cmd): Update. Change type of
+ set_func and show_func to cmd_sfunc_ftype.
+ (_initialize_remote): Update `set remote Z-packet'
+ (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter.
+ (show_remote_protocol_e_packet_cmd): Ditto.
+ (show_remote_protocol_E_packet_cmd): Ditto.
+ (show_remote_protocol_P_packet_cmd): Ditto.
+ (show_remote_protocol_Z_software_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_write_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_read_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_access_wp_packet_cmd): Ditto.
+ (show_remote_protocol_Z_packet_cmd): Ditto.
+ (show_remote_protocol_binary_download_cmd): Ditto.
+ (show_remote_cmd): Pass NULL to all of above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
+ DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
+ POP_FRAME): Remove defines.
+ (i386_push_arguments, i386_store_struct_return,
+ i386_extract_return_value, i386_store_return_value,
+ i386_extract_struct_value_address, i386_push_dummy_frame,
+ i386_pop_frame): Renove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ (add_setshow_cmd): New function.
+ * command.h (add_setshow_boolean_cmd): Replace
+ add_set_boolean_cmd.
+ * remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat''
+ and ``set rdiromatzero''.
+ * maint.c (_initialize_maint_cmds): Update commented out code.
+ * cli/cli-decode.h (add_set_boolean_cmd): Delete declaration.
+ * target.c (initialize_targets): Update `set
+ trust-readonly-sections'.
+ * remote.c (_initialize_remote): Update `set remotebreak'.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (FUNCTION_START_OFFSET, INNER_THAN,
+ BREAKPOINT, DECR_PC_AFTER_BREAK): Removed.
+ * i386-tdep.c (i386_skip_prologue): Adjust function signature to
+ fit into multi-arch framework.
+ (i386_breakpoint_from_pc): New function.
+ (i386_gdbarch_init): Adjust for removal of the macros mentioned
+ above.
+
+ * config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION,
+ FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS,
+ FRAME_ARGS_SKIP, FRAME_INIT_SAVED_REGS): Remove defines.
+ (i386_frameless_function_invocation, i386_frame_num_args,
+ i386_frame_init_saved_regs): Remove prototypes.
+ * i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+ macros mentioned above.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * cli/cli-decode.c (set_cmd_cfunc): Update.
+ (set_cmd_sfunc): Update.
+ * command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare.
+ (set_cmd_sfunc, set_cmd_cfunc): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-sol2-tdep.c (i386_sol2_osabi_sniffer): New function.
+ (_initialize_i386_sol2_tdep): Register i386_sol2_osabi_sniffer.
+
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (auto_boolean): Declare enum.
+ * command.h (cmd_auto_boolean): Delete enum.
+ * mips-tdep.c (mask_address_var): Update.
+ (mips_mask_address_p): Update.
+ (show_mask_address): Update.
+ * remote.c (struct packet_config): Update.
+ (update_packet_config): Update.
+ (show_packet_config_cmd): Update.
+ (packet_ok): Update.
+ (add_packet_config_cmd): Update.
+ (_initialize_remote):
+ * command.h: Update.
+ * cli/cli-setshow.c (parse_auto_binary_operation): Update.
+ (do_setshow_command): Update.
+ * cli/cli-decode.c (add_set_auto_boolean_cmd): Update.
+ * cli/cli-decode.h: Update.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-cygwin.h, config/i386/tm-fbsd.h,
+ config/i386/tm-go32.h, config/i386/tm-i386gnu.h,
+ config/i386/tm-i386sol2.h, config/i386/tm-i386v4.h,
+ config/i386/tm-linux.h, config/i386/tm-nbsd.h,
+ config/i386/tm-obsd.h (HAVE_I387_REGS): Remove define.
+ * config/i386/tm-i386.h: Unconditionally define FLOAT_INFO.
+
+ * i386-tdep.c (i386_coff_osabi_sniffer): Add "coff-go32" to the
+ list of DJGPP COFF targets.
+
+ * config/i386/tm-i386.h (REGISTER_SIZE): Remove define.
+ (NUM_GREGS, NUM_FREGS, NUM_SSE_REGS): Remove defines.
+ (FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove defines.
+ (FP0_REGNUM): Remove define.
+ (MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+ MAX_REGISTER_VIRTUAL_SIZE): Remove define.
+ (i386_register_virtual_size): Remove protoype.
+ * i386-tdep.c (i386_register_virtual_size): Removed.
+ (i386_extract_return_value, i386_store_return_value): Use
+ FP0_REGNUM instead of NUM_FREGS to determine whether the
+ floating-point registers are available.
+ (i386_gdbarch_init): Tweak FIXME about FPU registers.
+ Adjust for removal of macros mentioned above.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386v4-nat.c: Include "i386-tdep.h". Reformat and tweak various
+ comments.
+ (fill_gregset, supply_gregset, supply_fpregset, fill_fpregset):
+ Remove prototypes.
+ (supply_gregset, fill_gregset): Remove use of register keyword and
+ remove declaration for regmap. Use I386_NUM_GREGS instead of
+ NUM_REGS and NUM_FREGS.
+ (FPREGSET_FSAVE_OFFSET): Remove.
+ (supply_fpregset, fill_fpregset): Use FPO_REGNUM instead of
+ NUM_FREGS to determine whether the floating-point registers are
+ available.
+
+ * i386gnu-nat.c (supply_gregset, gnu_fetch_registers,
+ gnu_store_registers): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386-linux-nat.c (OLD_CANNOT_FETCH_REGISTER,
+ OLD_CANNOT_STORE_REGISTER, supply_gregset, fill_gregset): Replace
+ usage of NUM_GREGS with I386_NUM_GREGS.
+
+ * i386-linux-nat.c (fill_gregset): Remove redundant parentheses.
+
+ * i386bsd-nat.c: Include "i386-tdep.h".
+ (supply_gregset, fill_gregset): Replace usage of NUM_GREGS with
+ I386_NUM_GREGS.
+
+ * i386v-nat.c: Remove copnditional inclusion of <asm/debugreg.h>,
+ and associated comment. They no longer make any sense, since we
+ don't use this file anymore on Linux.
+
+ * config/i386/tm-i386.h (MAX_NUM_REGS): Removed.
+ * i386-tdep.c (i386_register_offset, i386_register_size): Use
+ I386_SSE_NUM_REGS instead of MAX_NUM_REGS for the number of
+ elements in these arrays.
+ (_initialize_i386_tdep): Use I386_SSE_NUM_REGS instead of
+ MAX_NUM_REGS.
+
+2002-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_LYNXOS.
+ * osabi.c (gdb_osabi_names): Add entry for "LynxOS".
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
+ EXTRACT_RETURN_VALUE.
+ (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
+ EXTRACT_STRUCT_VALUE_ADDRESS.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+ * values.c (value_being_returned): Handle
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+ (EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
+
+ * arm-linux-tdep.c (arm_linux_init_abi): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * x86-64-tdep.c (x86_64_gdbarch_init): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+ * config/arc/tm-arc.h: Update.
+ * config/d30v/tm-d30v.h: Update.
+ * config/fr30/tm-fr30.h: Update.
+ * config/h8300/tm-h8300.h: Update.
+ * config/h8500/tm-h8500.h: Update.
+ * config/i386/tm-i386.h: Update.
+ * config/i386/tm-ptx.h: Update.
+ * config/i386/tm-symmetry.h: Update.
+ * config/i960/tm-i960.h: Update.
+ * config/m32r/tm-m32r.h: Update.
+ * config/m68k/tm-delta68.h: Update.
+ * config/m68k/tm-linux.h: Update.
+ * config/m68k/tm-m68k.h: Update.
+ * config/m88k/tm-m88k.h: Update.
+ * config/mcore/tm-mcore.h: Update.
+ * config/mips/tm-mips.h: Update.
+ * config/mn10200/tm-mn10200.h: Update.
+ * config/pa/tm-hppa.h: Update.
+ * config/pa/tm-hppa64.h: Update.
+ * config/sparc/tm-sp64.h: Update.
+ * config/sparc/tm-sparc.h: Update.
+ * config/sparc/tm-sparclet.h: Update.
+ * config/z8k/tm-z8k.h: Update.
+
+2002-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (i386_linux_tdep_h): Define.
+ (i386_tdep_h, i387_tdep_h): Define.
+ (i386-linux-nat.o): Add $(i386_linux_tdep_h),
+ $(i386_tdep_h) and $(i387_tdep_h).
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+
+2002-06-14 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386.h (START_INFERIOR_TRAPS_EXPECTED): Removed.
+ Already covered by the default.
+
+ * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT,
+ TARGET_LONG_DOUBLE_BIT): Remove. * i386-tdep.c
+ (i386_gdbarch_init): Initialize long_double_format and long_double
+ bit.
+
+ * config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
+ i386bsd-tdep.o. Remove solib.o, solib-svr4.o and solib-legacy.o.
+ Move these to ...
+ * config/i386/i386sol2.mh: ... here.
+ * config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define.
+ (sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef.
+ (SIGCONTEXT_PC_OFFSET): Remove define.
+ (IN_SIGTRAMP): Remove define.
+ * i386-sol2-tdep.c: New file.
+
+ * config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h.
+ * config/i386/tm-i386nw.h: Removed.
+
+ * config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM,
+ USE_STRUCT_CONVENTION): Remove defines.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC,
+ GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (IN_SIGTRAMP): Remove define.
+ (i386bsd_in_sigtramp): Remove prototype.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+ function. Update comment accordingly
+ (SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+ (FRAME_SAVED_PC): Remove define.
+ (i386bsd_frame_saved_pc): Remove prototype.
+ * config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention):
+ Remove prototype.
+ (USE_STRUCT_CONVENTION): Remove prototype.
+ * i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove
+ declaration.
+ (_initialize_i386bsd_nat): Revise logic to determine some
+ constants at compile time when compiling a native GDB. Warn if
+ things don't match up with what we expect.
+ * i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end):
+ Remove variables.
+ (i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp. Rewrite
+ to use date stored in `struct gdbarch_tdep'.
+ (i386bsd_sigcontext_offset): Remove varaible.
+ (i386bsd_sigtramp_saved_pc): Make public. Rewrite to use data
+ stored in `struct gdbarch_tdep'.
+ (i386bsd_frame_saved_pc): Make static.
+ (i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions.
+ (i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset,
+ i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+ i386fbsd4_sc_pc_offset): New variables.
+ (i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi,
+ i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New
+ functions.
+ (i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New
+ functions.
+ * i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment.
+ Modify the value of i386fbsd_sigtramp_start and
+ i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and
+ i386fbsd_sigtramp_end.
+ * i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove
+ function.
+
+ * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move
+ define to i386-linux-tdep.h.
+ (NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME,
+ REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove
+ defines.
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size): Remove prototypes.
+ (i386_linux_svr4_fetch_link_map_offsets): Remove prototype.
+ (SVR4_FETCH_LINK_MAP_OFFSETS): Remove define.
+ (IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL,
+ TARGET_WRITE_PC): Remove defines.
+ (i386_linux_in_sigtramp, i386_linux_frame_chain,
+ i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call,
+ i386_linux_write_pc): Remove prototypes.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-linux-tdep.h: New file.
+ * i386-linux-nat.c: Include "i386-linux-tdep.h".
+ * i386-linux-tdep.c: Include "i386-tdep.h" and
+ "i386-linux-tdep.h".
+ (i386_linux_register_name, i386_linux_register_byte,
+ i386_linux_register_raw_size, i386_linux_in_sigtramp,
+ i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets):
+ Make static.
+ (i386_linux_init_abi): New function.
+ (_initialize_i386_linux_tdep): New function.
+
+ * config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define.
+ (i386_saved_pc_after_call): Remove prototype.
+ (MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register".
+ (REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
+ DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines.
+ (i386_register_name, i386_stab_reg_to_regnum,
+ i386_dwarf_reg_to_regnum): Remove prototypes.
+ (SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS,
+ SIZEOF_SSE_REGS): Remove defines.
+ (REGISTER_BYTES): Remove define.
+ (REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines.
+ (i386_register_byte, i386_register_raw_size): Remove prototypes.
+ (FRAME_CHAIN, FRAME_SAVED_PC): Remove defines.
+ (i386_frame_chain, i386_frame_saved_pc): Remove prototypes.
+ * config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define.
+ (JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP,
+ JB_EDX, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ (I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines.
+ (sigtramp_saved_pc): Remove define.
+ (i386v4_sigtramp_saved_pc): Remove prototype.
+ * config/i386/tm-go32.h (FRAME_CHAIN,
+ FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines.
+ (i386go32_frame_saved_pc): Remove prototype.
+ (JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+ (get_longjmp_target): Remove prototype.
+ * i386-tdep.h: Include "osabi.h".
+ (enum i386_abi): Removed.
+ (enum struct_return): New enum.
+ (struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset,
+ struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and
+ sc_pc_offset members.
+ (i386_gdbarch_register_os_abi): Remove prototype.
+ (I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS,
+ I386_SSE_NUM_REGS): New defines.
+ (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS,
+ I386_SSE_SIZEOF_REGS): New defines.
+ (i386_register_name, i386_register_byte, i386_register_raw_size):
+ New prototypes.
+ (i386_elf_init_abi, i386_svr4_init_abi): New prototypes.
+ (i386bsd_sigtramp_saved_pc): New prototype.
+ * i386-tdep.c: Don't include "elf-bfd.h".
+ (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum,
+ i386_frame_chain, i386_saved_pc_after_call): Make static.
+ (i386_frame_saved_pc): Rewrite to call architecture dependent
+ function to deal with signal handlers. Make static.
+ (i386go32_frame_saved_pc): Removed.
+ [GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target):
+ Removed.
+ (i386_get_longjmp_target): New function.
+ (default_struct_convention, pcc_struct_convention,
+ reg_struct_convention, valid_conventions, struct_convention): New
+ variables.
+ (i386_use_struct_convention): New function.
+ (i386v4_sigtramp_saved_pc): Renamed to
+ i386_svr4_sigtramp_saved_pc. Made static. Moved.
+ (i386_pc_in_sigtramp): New function.
+ (i386_abi_names): Removed.
+ (ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD,
+ ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD):
+ Removed.
+ (process_note_sections, i386_elf_abi_from_note, i386_elf_abi,
+ i386_gdbarch_register_os_abi): Removed.
+ (struct i386_abi_handler): Removed.
+ (i386_abi_handler_list): Removed.
+ (i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New
+ functions.
+ (i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi,
+ i386_nw_init_abi): New functions.
+ (i386_gdbarch_init): Rewritten to use generic OS ABI framework.
+ Use set_gdbarch_xxx() calls instead of relying on macros for a
+ number of calls.
+ (i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions.
+ (_initialize_i386_tdep): Add new 'struct-convcention' command.
+ Register the various architecture variants defined in this file.
+
+2002-06-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
+ (struct main_type): Remove arg_types member. Update comments for
+ struct field.
+ (TYPE_ARG_TYPES): Remove.
+ (TYPE_FN_FIELD_ARGS): Update.
+ (smash_to_method_type): Update prototype.
+
+ * c-typeprint.c (cp_type_print_method_args): Take method type
+ instead of argument list. Use new argument layout. Simplify.
+ (c_type_print_args): Use new argument layout. Simplify.
+ (c_type_print_base): Update call to cp_type_print_method_args.
+ * dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
+ argument; use die->type instead. Update call to
+ smash_to_method_type.
+ (read_structure_scope): Update call to dwarf2_add_member_fn.
+ * gdbtypes.c (allocate_stub_method): Update comment.
+ (smash_to_method_type): Take new NARGS and VARARGS arguments.
+ Use new argument layout.
+ (check_stub_method): Use new argument layout. Don't count
+ void as an argument.
+ (print_arg_types): Update comments. Use new argument layout.
+ (recursive_dump_type): Don't print arg_types member.
+ * hpread.c (hpread_read_struct_type): Use new argument layout.
+ (fixup_class_method_type): Likewise.
+ (hpread_type_lookup): Likewise.
+ * stabsread.c (read_type): Update calls to read_args and
+ smash_to_method_type.
+ (read_args): Use new argument layout. Simplify.
+ * valops.c (typecmp): Use new argument layout. Update parameters
+ and comments. Simplify.
+ (hand_function_call): Use new argument layout.
+ (search_struct_method): Update call to typecmp.
+ (find_overload_match): Use new argument layout.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Mention multithreaded debug support for gdbserver.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * MAINTAINERS: Mention NEWS.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/regcache.c: Add comment.
+
+2002-06-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (PROC_SYMBOL): Add warning comment.
+ (struct mips_objfile_private, compare_pdr_entries): New.
+ (non_heuristic_proc_desc): Read the ".pdr" section if it
+ is present.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * arm-tdep.c (arm_push_arguments): Rewrite using a two-pass loop.
+ (arm_debug): New static variable.
+ (_initialize_arm_tdep): Add ``set debug arm'' command.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (sim_arm_h): Define.
+ (arm-tdep.o): Add $(sim_arm_h) and $(gdb_assert_h).
+ * arm-tdep.c: Include "gdb/sim-arm.h" and "gdb_assert.h".
+ (arm_register_sim_regno): New function, map an internal REGNUM
+ onto a simulator register number.
+ (arm_gdbarch_init): Set register_sim_regno.
+
+2002-06-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * MAINTAINERS: Add self.
+
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * source.c (source_info): Mention whether the symtab has
+ information about preprocessor macros.
+
+ Call the command `info macro', not `show macro'.
+ * macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
+ Fix error message.
+ (_initialize_macrocmd): Register `info_macro_command' in
+ `infolist', not `showlist'.
+
+2002-06-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
+ (MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_SAVED_REGSIZE, MIPS_REGS_HAVE_HOME_P)
+ (MIPS_DEFAULT_STACK_ARGSIZE, GDB_TARGET_IS_MIPS64)
+ (MIPS_DEFAULT_MASK_ADDRESS_P): Remove obsolete definitions. Define
+ unconditionally.
+ (set_mipsfpu_single_command, set_mipsfpu_double_command)
+ (set_mipsfpu_none_command): Remove if (GDB_MULTI_ARCH).
+ (_initialize_mips_tdep): Remove dead code.
+ * config/mips/tm-irix5.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-irix6.h (MIPS_LAST_ARG_REGNUM)
+ (MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+ * config/mips/tm-mips.h (MIPS_EABI, MIPS_LAST_ARG_REGNUM,
+ MIPS_LAST_FP_ARG_REGNUM): Remove.
+
+2002-06-11 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/thread-db.c: New file.
+ * gdbserver/proc-service.c: New file.
+ * gdbserver/acinclude.m4: New file.
+ * gdbserver/Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
+ proc-service.o, and thread-db.o.
+ (linux-low.o): Add USE_THREAD_DB.
+ * gdbserver/acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
+ HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
+ * gdbserver/aclocal.m4: Regenerated.
+ * gdbserver/config.in: Regenerated.
+ * gdbserver/configure: Regenerated.
+ * gdbserver/configure.in: Check for proc_service.h, sys/procfs.h,
+ thread_db.h, and linux/elf.h headrs.
+ Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
+ PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
+ Check for -lthread_db and thread support.
+ * gdbserver/configure.srv: Enable thread_db support for ARM, i386, MIPS,
+ PowerPC, and SuperH.
+ * gdbserver/i387-fp.c: Constify arguments.
+ * gdbserver/i387-fp.h: Likewise.
+ * gdbserver/inferiors.c: (struct thread_info): Renamed from
+ `struct inferior_info'. Remove PID member. Use generic inferior
+ list header. All uses updated.
+ (inferiors, signal_pid): Removed.
+ (all_threads): New variable.
+ (get_thread): Define.
+ (add_inferior_to_list): New function.
+ (for_each_inferior): New function.
+ (change_inferior_id): New function.
+ (add_inferior): Removed.
+ (remove_inferior): New function.
+ (add_thread): New function.
+ (free_one_thread): New function.
+ (remove_thread): New function.
+ (clear_inferiors): Use for_each_inferior and free_one_thread.
+ (find_inferior): New function.
+ (find_inferior_id): New function.
+ (inferior_target_data): Update argument type.
+ (set_inferior_target_data): Likewise.
+ (inferior_regcache_data): Likewise.
+ (set_inferior_regcache_data): Likewise.
+ * gdbserver/linux-low.c (linux_bp_reinsert): Remove.
+ (all_processes, stopping_threads, using_thrads)
+ (struct pending_signals, debug_threads, pid_of): New.
+ (inferior_pid): Replace with macro.
+ (struct inferior_linux_data): Remove.
+ (get_stop_pc, add_process): New functions.
+ (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
+ Use add_process and add_thread.
+ (linux_attach_lwp): New function, based on old linux_attach. Use
+ add_process and add_thread. Set stop_expected for new threads.
+ (linux_attach): New function.
+ (linux_kill_one_process): New function.
+ (linux_kill): Kill all LWPs.
+ (linux_thread_alive): Use find_inferior_id.
+ (check_removed_breakpoints, status_pending_p): New functions.
+ (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
+ Update. Use WNOHANG. Wait for cloned processes also. Update process
+ struct for the found process.
+ (linux_wait_for_event): New function.
+ (linux_wait): Use it. Support LWPs.
+ (send_sigstop, wait_for_sigstop, stop_all_processes)
+ (linux_resume_one_process, linux_continue_one_process): New functions.
+ (linux_resume): Support LWPs.
+ (REGISTER_RAW_SIZE): Remove.
+ (fetch_register): Use register_size instead. Call supply_register.
+ (usr_store_inferior_registers): Likewise. Call collect_register.
+ Fix recursive case.
+ (regsets_fetch_inferior_registers): Improve error message.
+ (regsets_store_inferior_registers): Add debugging.
+ (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
+ (unstopped_p, linux_signal_pid): New functions.
+ (linux_target_ops): Add linux_signal_pid.
+ (linux_init_signals): New function.
+ (initialize_low): Call it. Initialize using_threads.
+ * gdbserver/regcache.c (inferior_regcache_data): Add valid
+ flag.
+ (get_regcache): Fetch registers lazily. Add fetch argument
+ and update all callers.
+ (regcache_invalidate_one, regcache_invalidate): New
+ functions.
+ (new_register_cache): Renamed from create_register_cache.
+ Return the new regcache.
+ (free_register_cache): Change argument to a void *.
+ (registers_to_string, registers_from_string): Call get_regcache
+ with fetch flag set.
+ (register_data): Make static. Pass fetch flag to get_regcache.
+ (supply_register): Call get_regcache with fetch flag clear.
+ (collect_register): Call get_regcache with fetch flag set.
+ (collect_register_as_string): New function.
+ * gdbserver/regcache.h: Update.
+ * gdbserver/remote-utils.c (putpkt): Flush after debug output and use
+ stderr.
+ Handle input interrupts while waiting for an ACK.
+ (input_interrupt): Use signal_pid method.
+ (getpkt): Flush after debug output and use stderr.
+ (outreg): Use collect_register_as_string.
+ (new_thread_notify, dead_thread_notify): New functions.
+ (prepare_resume_reply): Check using_threads. Set thread_from_wait
+ and general_thread.
+ (look_up_one_symbol): Flush after debug output.
+ * gdbserver/server.c (step_thread, server_waiting): New variables.
+ (start_inferior): Don't use signal_pid. Update call to mywait.
+ (attach_inferior): Update call to mywait.
+ (handle_query): Handle qfThreadInfo and qsThreadInfo.
+ (main): Don't fetch/store registers explicitly. Use
+ set_desired_inferior. Support proposed ``Hs'' packet. Update
+ calls to mywait.
+ * gdbserver/server.h: Update.
+ (struct inferior_list, struct_inferior_list_entry): New.
+ * gdbserver/target.c (set_desired_inferior): New.
+ (write_inferior_memory): Constify.
+ (mywait): New function.
+ * gdbserver/target.h: Update.
+ (struct target_ops): New signal_pid method.
+ (mywait): Removed macro, added prototype.
+
+ * gdbserver/linux-low.h (regset_func): Removed.
+ (regset_fill_func, regset_store_func): New.
+ (enum regset_type): New.
+ (struct regset_info): Add type field. Use new operation types.
+ (struct linux_target_ops): stop_pc renamed to get_pc.
+ Add decr_pc_after_break and breakpoint_at.
+ (get_process, get_thread_proess, get_process_thread)
+ (strut process_info, all_processes, linux_attach_lwp)
+ (thread_db_init): New.
+
+ * gdbserver/linux-arm-low.c (arm_get_pc, arm_set_pc,
+ arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
+ (i386_store_fpxregset): Constify.
+ (target_regsets): Add new kind identifier.
+ (i386_get_pc): Renamed from i386_stop_pc. Simplify.
+ (i386_set_pc): Add debugging.
+ (i386_breakpoint_at): New function.
+ (the_low_target): Add new members.
+ * gdbserver/linux-mips-low.c (mips_get_pc, mips_set_pc)
+ (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
+ (mips_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
+ (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-sh-low.c (sh_get_pc, sh_set_pc)
+ (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
+ (the_low_target): Add new members.
+ * gdbserver/linux-x86-64-low.c (target_regsets): Add new kind
+ identifier.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (unwind_tmp_obstack_init): New.
+ (unwind_tmp_obstack_free, parse_frame_info)
+ (update_context, cfi_read_fp, cfi_write_fp)
+ (cfi_frame_chain, cfi_init_extra_frame_info)
+ (cfi_virtual_frame_pointer): Use the above function.
+ * dwarf2cfi.c: Reindented (using 'indent dwarf2cfi.c').
+
+2002-06-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * v850-tdep.c (v850_type_is_scalar): New function.
+ (v850_use_struct_convention): Match current gcc implementation
+ as close as possible.
+ (v850_push_arguments): Fix stack_offset handling. Don't write
+ struct_addr into register. This is done by v850_store_struct_return.
+ (v850_extract_return_value): Care for structs.
+ (v850_store_return_value): Ditto.
+ (v850_store_struct_return): Actually write address.
+
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions
+ without debug information too.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters.
+ Make multi-arch pure.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arm-tdep.c (arm_print_float_info): Update.
+ * arch-utils.h (default_print_float_info): Update.
+ * arch-utils.c (default_print_float_info): Update.
+ * infcmd.c (float_info): Update call.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (init.c): Move the call to _initialize_gdbtypes to
+ the front of the initialize list.
+
+2002-06-10 Andrew Cagney <ac131313@redhat.com>
+
+ * infrun.c (struct inferior_status): Replace fields
+ selected_frame_address and selected_level with field
+ selected_frame_id.
+ (save_inferior_status): Update. Use get_frame_id.
+ (struct restore_selected_frame_args): Delete.
+ (restore_selected_frame): Update. Use frame_find_by_id.
+ (restore_inferior_status): Update.
+
+ * breakpoint.h (struct breakpoint): Change type of
+ watchpoint_frame to frame_id.
+ * breakpoint.c (insert_breakpoints): Use frame_find_by_id. Remove
+ call to get_current_frame.
+ (do_enable_breakpoint): Use frame_find_by_id. Remove call to
+ get_current_frame.
+ (watchpoint_check): Use frame_find_by_id.
+
+ * frame.h (record_selected_frame): Delete declaration.
+ * stack.c (record_selected_frame): Delete function.
+
+ * frame.h (struct frame_id): Define.
+ (get_frame_id): Declare.
+ (frame_find_by_id): Declare.
+ * frame.c (frame_find_by_id): New function.
+ (get_frame_id): New function.
+
+2002-06-10 Andrey Volkov <avolkov@transas.com>
+
+ * ser-e7kpc.c: Fix duplicated define and call of
+ _initialize_ser_e7000pc
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * signals/signals.c (target_signal_from_host): Fix #ifdef
+ SIGRTMIN case.
+ (do_target_signal_to_host): Likewise.
+
+2002-06-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (mips_find_abi_section): New function.
+ (mips_gdbarch_init): Call it.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * solib-svr4.c (init_fetch_link_map_offsets): Simply return
+ legacy_fetch_link_map_offsets. Adjust comment to reflect reality
+ after Andrew's 2002-06-08 gdbarch change.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (suppy_gregset): Don't supply
+ I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
+ register cache.
+ (fill_gregset): Don't fetch it under the same circumstances.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (callback_h): Define.
+ (remote_sim_h): Update path to remote-sim.h.
+ (remote-rdp.o): Add $(callback_h).
+ (remote-sim.o): Use $(callback_h).
+ * remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * remote-rdp.c: Include "gdb/callback.h".
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * osabi.h (gdb_osabi): Add GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+ * osabi.c (gdb_osabi_names): Add "DJGPP" and "NetWare".
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * sparcl-tdep.c: Use __CYGWIN__ instead of __CYGWIN32__.
+ * rdi-share/serpardr.c: Ditto.
+ * rdi-share/unixcomm.c: Ditto.
+ * rdi-share/serdrv.c: Ditto.
+ * rdi-share/hostchan.h: Ditto.
+ * rdi-share/hostchan.c: Ditto.
+ * rdi-share/host.h: Ditto.
+ * rdi-share/devsw.c: Ditto.
+
+ * objfiles.h: Change type of obj_private to void pointer.
+ * pa64solib.c: Update copyright. Don't include "assert.h", use
+ strcmp instead of STREQ, use LONGEST, do not use PTR
+ * somsolib.c: Ditto.
+
+ * config/djgpp/fnchange.lst: Fix problems with bfd/elf32-i386.c,
+ bfd/elf32-i386qnx.c, bfd/elf32-sh.c, bfd/elf32-sh64-nbsd.c,
+ bfd/elf64-sh64-nbsd.c bfd/elf64-sh64.c.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (GET_SAVED_REGISTER): Delete macro definition.
+ (default_get_saved_register): Delete function.
+ * gdbarch.sh (GET_SAVED_REGISTER): Set default to
+ generic_unwind_get_saved_register.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (FRAME_CHAIN_VALID): Set default to
+ generic_func_frame_chain_valid.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * blockframe.c (generic_func_frame_chain_valid): Only check
+ PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
+ passing FP to PC_IN_CALL_DUMMY.
+ Fix PR gdb/360.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (struct gdbarch_data): Add field init_p.
+ (register_gdbarch_data): Initialize init_p.
+ (gdbarch_data): Initialize data pointer using the init function.
+ (init_gdbarch_data): Delete function.
+ (gdbarch_update_p): Update.
+ (initialize_non_multiarch): Update.
+ (struct gdbarch): Add field initialized_p.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-07 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-linux-nat.c (x86_64_fxsave_offset): New.
+ (supply_fpregset, fill_fpregset): Don't call i387_*_fxsave,
+ better do the things actually here.
+ * x86-64-tdep.c (x86_64_register_name2nr): New.
+ (x86_64_register_name): Renamed to x86_64_register_nr2name.
+ (x86_64_gdbarch_init): Respect the above change.
+ * x86-64-tdep.h (x86_64_register_name2nr)
+ (x86_64_register_nr2name): Add prototypes.
+ * config/i386/x86-64linux.mt (TDEPFILES): Remove i387-tdep.o.
+
+2002-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c (d10v_push_arguments): Handle struct_return.
+ Delete extra braces and re-indent.
+ (d10v_store_return_value): Char return values
+ must be shifted over by one byte in R0.
+ (d10v_extract_return_value): Delete extra braces, re-indent.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * d10v-tdep.c (d10v_read_sp, d10v_read_fp): Add prototype.
+ (d10v_register_virtual_type): Make $fp and $sp be pointer to data.
+ (d10v_integer_to_address): Rewrite.
+ (d10v_frame_init_saved_regs): When reading fp and sp registers use
+ the d10v specific functions which take care of converting to the
+ correct space.
+
+2002-06-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * config/djgpp/fnchange.lst: Add testsuite files altivec-abi.c,
+ altivec-abi.exp, altivec-regs.c, altivec-regs.exp.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ * config/alpha/nm-linux.h: Add "config/" prefix to tm, nm and xm
+ includes.
+ * config/tm-linux.h: Ditto.
+ * config/alpha/tm-alphalinux.h: Ditto.
+ * config/arm/nm-linux.h, config/arm/tm-linux.h: Ditto.
+ * config/arm/xm-nbsd.h, config/i386/nm-gnu.h: Ditto.
+ * config/i386/nm-i386lynx.h, config/i386/nm-i386sol2.h: Ditto.
+ * config/i386/nm-i386v4.h, config/i386/nm-i386v42mp.h: Ditto.
+ * config/i386/nm-linux.h, config/i386/nm-m3.h: Ditto.
+ * config/i386/nm-ptx4.h, config/i386/nm-x86-64.h: Ditto.
+ * config/i386/tm-i386gnu.h, config/i386/tm-i386lynx.h: Ditto.
+ * config/i386/tm-i386m3.h, config/i386/tm-i386sco5.h: Ditto.
+ * config/i386/tm-i386v4.h, config/i386/tm-linux.h: Ditto.
+ * config/i386/tm-ptx4.h, config/i386/tm-vxworks.h: Ditto.
+ * config/i386/xm-i386v4.h, config/i386/xm-nbsd.h: Ditto.
+ * config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
+ * config/i960/tm-vx960.h, config/ia64/nm-aix.h: Ditto.
+ * config/ia64/nm-linux.h, config/ia64/tm-aix.h: Ditto.
+ * config/ia64/tm-linux.h, config/ia64/xm-aix.h: Ditto.
+ * config/m68k/nm-linux.h, config/m68k/nm-m68klynx.h: Ditto.
+ * config/m68k/nm-sysv4.h, config/m68k/tm-linux.h: Ditto.
+ * config/m68k/tm-m68klynx.h, config/m68k/tm-m68kv4.h: Ditto.
+ * config/m68k/tm-sun2os4.h, config/m68k/tm-sun3os4.h: Ditto.
+ * config/m68k/tm-vx68.h, config/m68k/xm-m68kv4.h: Ditto.
+ * config/m68k/xm-nbsd.h, config/m88k/nm-delta88v4.h: Ditto.
+ * config/m88k/tm-delta88v4.h, config/m88k/xm-delta88v4.h: Ditto.
+ * config/mips/nm-irix5.h, config/mips/nm-linux.h: Ditto.
+ * config/mips/tm-linux.h, config/mips/tm-mips64.h: Ditto.
+ * config/mips/tm-mipsm3.h, config/mips/tm-mipsv4.h: Ditto.
+ * config/mips/tm-vxmips.h, config/mips/xm-irix5.h: Ditto.
+ * config/mips/xm-mipsv4.h, config/ns32k/xm-nbsd.h: Ditto.
+ * config/pa/nm-hppao.h, config/powerpc/nm-linux.h: Ditto.
+ * config/powerpc/tm-linux.h, config/powerpc/tm-vxworks.h: Ditto.
+ * config/powerpc/xm-aix.h, config/rs6000/nm-rs6000ly.h: Ditto.
+ * config/rs6000/tm-rs6000ly.h, config/rs6000/xm-aix4.h: Ditto.
+ * config/sh/tm-linux.h, config/sparc/nm-linux.h: Ditto.
+ * config/sparc/nm-sparclynx.h, config/sparc/nm-sun4sol2.h: Ditto.
+ * config/sparc/tm-linux.h, config/sparc/tm-sp64linux.h: Ditto.
+ * config/sparc/tm-sp64sim.h, config/sparc/tm-sparclynx.h: Ditto.
+ * config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h: Ditto.
+ * config/sparc/tm-vxsparc.h, config/sparc/xm-sun4sol2.h: Ditto.
+
+2002-05-04 Aidan Skinner <aidan@velvet.net>
+
+ * ada-exp.tab.c: New file
+ * ada-exp.y: New file
+ * ada-lang.c: New file
+ * ada-lang.h: New file
+ * ada-lex.c: New file
+ * ada-lex.l: New file
+ * ada-tasks.c: New file
+ * ada-typeprint.c: New file
+ * ada-valprint.c: New file
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set
+ use_struct_convention to ppc_sysv_abi_broken_use_struct_convention.
+
+2002-06-02 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/rs6000/aix4.mt (TDEPFILES): Use ppc-sysv-tdep.o
+ insetead of ppc-linux-tdep.o.
+ * config/rs6000/rs6000.mt (TDEPFILES): Likewise.
+ * config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
+
+2002-06-02 Andrew Cagney <ac131313@redhat.com>
+
+ 2002-05-07 Christian Groessler <chris@groessler.org>
+ * z8k-tdep.c (z8k_print_register_hook): Fix display of 32 and 64
+ bit register contents for little endian hosts.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Mention that any `HP/UX reader' can be changed by
+ any maintainer.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.h: Regenerate.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add everyone to write-after-approval list.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * stack.c (frame_info): Use frame_register_unwind instead of
+ saved_regs. Mention when the SP is on the stack or in a register.
+
+ * frame.h (frame_register_unwind_ftype): Define. Document.
+ (struct frame_info): Add field register_unwind and
+ register_unwind_cache.
+ (frame_register_unwind): Declare.
+ (generic_unwind_get_saved_register): Declare.
+
+ * frame.c (frame_register_unwind): New function.
+ (generic_unwind_get_saved_register): New function.
+
+ * blockframe.c (generic_call_dummy_register_unwind): New function.
+ (frame_saved_regs_register_unwind): New function.
+ (set_unwind_by_pc): New function.
+ (create_new_frame): New function.
+ (get_prev_frame): New function.
+
+2002-05-30 Andrew Cagney <ac131313@redhat.com>
+
+ * a29k-share/: Delete directory.
+ * remote-vx29k.c: Delete file.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/djgpp/fnchange.lst: Add ns32knbsd-nat.c, ns32knbsd-tdep.c,
+ ppcnbsd-nat.c, ppcnbsd-tdep.c, sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ALLDEPFILES): Add sparc64nbsd-nat.c,
+ sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+ (sparc64nbsd-nat.o)
+ (sparcnbsd-nat.o)
+ (sparcnbsd-tdep.o): New dependency lists.
+ * NEWS: Note new UltraSPARC NetBSD native configuration.
+ * configure.host (sparc64-*-netbsd*): New host.
+ * configure.tgt (sparc-*-netbsdelf*)
+ (sparc-*-netbsd*): Set gdb_target to nbsd.
+ (sparc64-*-netbsd*): New target.
+ * sparc64nbsd-nat.c: New file.
+ * sparcnbsd-nat.c: New file.
+ * sparcnbsd-tdep.c: New file.
+ * sparcnbsd-tdep.h: New file.
+ * config/sparc/nbsd.mt: New file.
+ * config/sparc/nbsd64.mh: New file.
+ * config/sparc/nbsd64.mt: New file.
+ * config/sparc/nbsdaout.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdaout.mt: Remove.
+ * config/sparc/nbsdelf.mh (NATDEPFILES): Remove corelow.o,
+ sparc-nat.o, and solib.o. Add sparcnbsd-nat.o.
+ (HOST_IPC): Remove.
+ * config/sparc/nbsdelf.mt: Remove.
+ * config/sparc/nm-nbsd.h: Update copyright years. Remove all
+ sparc-nat.c compatiblity defines.
+ * config/sparc/tm-nbsd.h: Update copyright years. Include solib.h.
+ (GDB_MULTI_ARCH): Set to GDB_MULTI_ARCH_PARTIAL.
+ * config/sparc/tm-nbsd64.h: New file.
+ * config/sparc/tm-nbsdaout.h: Remove.
+ * config/sparc/xm-nbsd.h: Remove.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (sparc-tdep.o): Add osabi.h to dependency list.
+ * sparc-tdep.c: Include osabi.h.
+ (gdbarch_tdep): Add osabi member.
+ (_initialize_sparc_tdep): Use gdbarch_register.
+ (sparc_gdbarch_init): Use generic OS ABI framework.
+ (sparc_dump_tdep): New function.
+
+2002-05-30 Kevin Buettner <kevinb@redhat.com>
+
+ * corefile.c (do_captured_read_memory_integer): Return non-zero
+ result.
+ (safe_read_memory_integer): Copy result of memory read when
+ status is non-zero. Also, add comments.
+
+2002-05-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.in (ppc_tdep_h): Define.
+ (ppc-linux-nat.o)
+ (ppc-linux-tdep.o)
+ (rs6000-tdep.o): Use $(ppc_tdep_h).
+ (ppc-sysv-tdep.o)
+ (ppcnbsd-nat.o)
+ (ppcnbsd-tdep.o): New dependency lists.
+ * ppc-tdep.h: Use generic OS ABI framework.
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep)
+ (ppc_linux_init_abi): New functions.
+ (ppc_sysv_abi_broken_use_struct_convention)
+ (ppc_sysv_abi_use_struct_convention)
+ (ppc_sysv_abi_push_arguments): Move to...
+ * ppc-sysv-tdep.c: ...here.
+ * ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
+ * rs6000-tdep.c (process_note_abi_tag_sections)
+ (get_elfosabi): Remove.
+ (rs6000_gdbarch_init): Use generic OS ABI framework.
+ (rs6000_dump_tdep): New function.
+ (_initialize_rs6000_tdep): Use gdbarch_register.
+ * config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
+ * config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
+ * config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
+ of ppc-linux-tdep.o.
+ * config/powerpc/nbsd.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
+ * config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
+ * config/powerpc/vxworks.mt (TDEPFILES): Likewise.
+
+2002-05-29 Jim Blandy <jimb@redhat.com>
+
+ * macroscope.c (default_macro_scope): Put `void' in empty argument
+ list.
+
+2002-05-29 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (arch-utils.o): Add $(sim_regno_h).
+ * arch-utils.c: Include "sim-regno.h".
+ * gdbarch.sh: Don't include "sim-regno.h".
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * sim-regno.h (legacy_register_sim_regno): Move declaration from
+ here.
+ * arch-utils.h (legacy_register_sim_regno): To here.
+ * remote-sim.c (legacy_register_sim_regno): Move function from
+ here.
+ * arch-utils.c (legacy_register_sim_regno): To here.
+
+2002-05-28 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-regno.h: New file.
+ * Makefile.in (sim_regno_h): Define.
+ (d10v-tdep.o, remote-sim.o): Add dependency on $(sim_regno_h).
+ * remote-sim.c: Include "sim-regno.h" and "gdb_assert.h".
+ (legacy_register_sim_regno): New function.
+ (one2one_register_sim_regno): New function.
+ (gdbsim_fetch_register): Rewrite.
+ (gdbsim_store_register): Only store a register when
+ REGISTER_SIM_REGNO is valid.
+ * d10v-tdep.c: Include "sim-regno.h".
+ (d10v_ts2_register_sim_regno): Add legacy_regiter_sim_regno check.
+ (d10v_ts3_register_sim_regno): Ditto.
+ * gdbarch.sh: Include "sim-regno.h".
+ (REGISTER_SIM_REGNO): Set default to legacy_register_sim_regno.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.h (default_register_sim_regno): Delete declaration.
+ * arch-utils.c (default_register_sim_regno): Delete function.
+
2002-05-28 Jason Thorpe <thorpej@wasabisystems.com>
* ppcnbsd-nat.c: Rewrite.
avr --target=avr ,-Werror
Theodore A. Roth troth@verinet.com
- cris --target=cris-elf -w
+ cris --target=cris-elf ,-Werror
Orjan Friberg orjanf@axis.com
d10v --target=d10v-elf ,-Werror
linespec Jim Blandy jimb@redhat.com
Elena Zannoni ezannoni@redhat.com
Fernando Nasser fnasser@redhat.com
+ HP/UX readers Any [past] maintainer can modify this.
+ Please send tricky ones to the symtabs maintainers.
tracing bytecode stuff Jim Blandy jimb@redhat.com
tracing Michael Snyder msnyder@redhat.com
mmalloc/ ALL Host maintainers
+NEWS ALL
+
sim/ See sim/MAINTAINERS
readline/ Master version: ftp://ftp.cwru.edu/pub/bash/
FSF assignment and have submitted one good patch.
David Anderson davea@sgi.com
+Scott Bambrough scottb@netwinder.org
+Jim Blandy jimb@redhat.com
Philip Blundell philb@gnu.org
+Per Bothner per@bothner.com
Joel Brobecker brobecker@act-europe.fr
+Kevin Buettner kevinb@redhat.com
+Andrew Cagney ac131313@redhat.com
+Stephane Carrez stcarrez@nerim.fr
+Michael Chastain mec@shout.net
+Eric Christopher echristo@redhat.com
Nick Clifton nickc@redhat.com
+Philippe De Muyter phdm@macqel.be
Chris G. Demetriou cgd@broadcom.com
Klee Dienes kdienes@apple.com
+DJ Delorie dj@redhat.com
Richard Earnshaw rearnsha@arm.com
+Frank Ch. Eigler fche@redhat.com
+Ben Elliston bje@redhat.com
+Anthony Green green@redhat.com
Matthew Green mrg@eterna.com.au
+Chris Faylor cgf@redhat.com
+Fred Fish fnf@ninemoons.com
Orjan Friberg orjanf@axis.com
Ben Harris bjh21@netbsd.org
Richard Henderson rth@redhat.com
+Aldy Hernandez aldyh@redhat.com
Paul Hilfinger hilfinger@gnat.com
Matt Hiller hiller@redhat.com
Kazu Hirata kazu@hxi.com
Daniel Jacobowitz dan@debian.org
Andreas Jaeger aj@suse.de
Geoff Keating geoffk@redhat.com
+Mark Kettenis kettenis@gnu.org
Jim Kingdon jkingdon@engr.sgi.com ++
+Jeff Law law@redhat.com
Jonathan Larmour jlarmour@redhat.co.uk
+Robert Lipe rjl@sco.com
H.J. Lu hjl@lucon.org
+Michal Ludvig mludvig@suse.cz
Glen McCready gkm@redhat.com
Greg McGary greg@mcgary.org
Jason Merrill jason@redhat.com
+David S. Miller davem@redhat.com
Jason Molenda jmolenda@apple.com
Pierre Muller muller@sources.redhat.com
+Fernando Nasser fnasser@redhat.com
+David O'Brien obrien@freebsd.org
Alexandre Oliva aoliva@redhat.com
Tom Rix trix@redhat.com
Theodore A. Roth troth@verinet.com
+Ian Roxborough irox@redhat.com
Mark Salter msalter@redhat.com
+Peter Schauer Peter.Schauer@regent
Andreas Schwab schwab@suse.de
Keith Seitz keiths@redhat.com
Jiri Smid smid@suse.cz
David Smith dsmith@redhat.com
Stephen P. Smith ischis2@home.com
Jackie Smith Cashion jsmith@redhat.com
+Stan Shebs shebs@apple.com
+Michael Snyder msnyder@redhat.com
Petr Sorfa petrs@caldera.com
Gary Thomas gthomas@redhat.com
Jason Thorpe thorpej@wasabisystems.com
Tom Tromey tromey@redhat.com
Corinna Vinschen vinschen@redhat.com
Keith Walker keith.walker@arm.com
-Michal Ludvig mludvig@suse.cz
-David S. Miller davem@redhat.com
-Eric Christopher echristo@redhat.com
+Elena Zannoni ezannoni@redhat.com
+Eli Zaretskii eliz@gnu.org
getopt_h = $(INCLUDE_DIR)/getopt.h
floatformat_h = $(INCLUDE_DIR)/floatformat.h
bfd_h = $(BFD_DIR)/bfd.h
+callback_h = $(INCLUDE_DIR)/gdb/callback.h
dis_asm_h = $(INCLUDE_DIR)/dis-asm.h
-remote_sim_h = $(INCLUDE_DIR)/remote-sim.h
+remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h
demangle_h = $(INCLUDE_DIR)/demangle.h
obstack_h = $(INCLUDE_DIR)/obstack.h
+sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
gdbcore_h = gdbcore.h $(bfd_h)
gdbthread_h = gdbthread.h $(breakpoint_h)
gdbtypes_h = gdbtypes.h
+i386_tdep_h = i386-tdep.h
+i386_linux_tdep_h = i386-linux-tdep.h
+i387_tdep_h = i387-tdep.h
inf_loop_h = inf-loop.h
inferior_h = inferior.h $(breakpoint_h)
interps_h = interps.h
monitor_h = monitor.h
objfiles_h = objfiles.h
parser_defs_h = parser-defs.h $(doublest_h)
+ppc_tdep_h = ppc-tdep.h osabi.h
regcache_h = regcache.h
remote_h = remote.h
remote_utils_h = remote-utils.h $(target_h)
ser_unix_h = ser-unix.h
serial_h = serial.h
sh_tdep_h = sh-tdep.h osabi.h
+sim_regno_h = sim-regno.h
solist_h = solist.h
source_h = source.h
stabsread_h = stabsread.h
# list includes a file twice (because of some mistake somewhere else)
# the _initialize_* function will be included twice in init.c. Second,
# init.c may force unnecessary files to be linked in.
-#
+
+# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
+# the first call is to _initialize_gdbtypes. This is a hack to ensure
+# that all the architecture dependant global builtin_type_* variables
+# are initialized before anything else (per-architecture code is
+# called in the same order that it is registered). The ``correct
+# fix'' is to have all the builtin types made part of the architecture
+# and initialize them on-demand (using gdbarch_data) just like
+# everything else. The catch is that other modules still take the
+# address of these builtin types forcing them to be variables, sigh!
INIT_FILES = $(OBS) $(TSOBS) $(CONFIG_OBS) $(CONFIG_INITS)
init.c: $(INIT_FILES)
-e 's,signals\.c,signals/signals\.c,' \
-e 's|\([^ ][^ ]*\)|$(srcdir)/\1|g' | \
while read f; do grep '^_initialize_[a-z_0-9A-Z]* *(' $$f 2>/dev/null; done | \
- sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' > init.l-tmp
+ sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' | \
+ ( echo _initialize_gdbtypes ; grep -v -e '^_initialize_gdbtypes$$' ) > init.l-tmp
@echo '/* Do not modify this file. */' >>init.c-tmp
@echo '/* It is created automatically by the Makefile. */'>>init.c-tmp
@echo '#include "defs.h"' >>init.c-tmp
nindy-share/ttyflush.c nindy-tdep.c \
ns32k-tdep.c solib-osf.c \
somread.c somsolib.c $(HPREAD_SOURCE) \
- ppc-linux-nat.c ppc-linux-tdep.c \
+ ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
+ ppcnbsd-nat.o ppcnbsd-tdep.o \
procfs.c \
remote-adapt.c remote-array.c remote-bug.c remote-e7000.c remote-eb.c \
remote-es.c remote-hms.c remote-mips.c \
sh-tdep.c shnbsd-tdep.c shnbsd-nat.c \
solib.c solib-svr4.c solib-sunos.c sparc-linux-nat.c \
sparc-nat.c \
+ sparc64nbsd-nat.c sparcnbsd-nat.c sparcnbsd-tdep.c \
sparc-tdep.c sparcl-tdep.c sun3-nat.c \
symm-tdep.c symm-nat.c \
vax-tdep.c \
$(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) $(doublest_h) \
$(value_h) $(arch_utils_h) $(solib_svr4_h) $(arm_tdep_h) \
$(BFD_SRC)/elf-bfd.h $(INCLUDE_DIR)/coff/internal.h \
- $(INCLUDE_DIR)/elf/arm.h
+ $(INCLUDE_DIR)/elf/arm.h $(sim_arm_h) $(gdb_assert_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
$(regcache_h) $(gdbcore_h)
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(obstack_h) $(symtab_h) \
$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
$(inferior_h) $(dis-asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
- $(arch_utils_h) $(regcache_h) $(floatformat_h) $(sim_d10v_h)
+ $(arch_utils_h) $(regcache_h) $(floatformat_h) $(sim_d10v_h) \
+ $(sim_regno_h)
dbxread.o: dbxread.c $(breakpoint_h) $(buildsym_h) $(command_h) \
$(complaints_h) $(defs_h) $(expression_h) $(gdb_stabs_h) $(gdbcore_h) \
$(arch_utils_h) $(gdb_assert_h) $(inferior_h) \
$(gdb_string_h) $(symtab.h) $(frame_h) $(breakpoint_h) $(gdb_wait_h) \
$(gdbcore_h) $(target_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
- $(version_h) $(floatformat_h)
+ $(version_h) $(floatformat_h) $(sim_regno_h)
gdbtypes.o: gdbtypes.c $(bfd_h) $(complaints_h) $(defs_h) $(expression_h) \
$(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
$(inferior_h) $(language_h) $(target_h)
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h)
+ $(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h) \
+ $(i386_linux_tdep_h) $(i386_tdep_h) $(i387_tdep_h)
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
$(value_h) $(regcache_h)
$(objfiles_h) $(gdb_stabs_h) $(serial_h) ocd.h $(regcache_h)
ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(inferior_h) $(target_h) $(regcache_h) ppc-tdep.h
+ $(inferior_h) $(target_h) $(regcache_h) $(ppc_tdep_h)
ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) ppc-tdep.h $(regcache_h) $(value_h)
+ $(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h)
+
+ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(value_h) $(regcache_h) $(ppc_tdep_h)
+
+ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
+ ppcnbsd-tdep.h
+
+ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_t) ppcnbsd-tdep.h \
+ nbsd-tdep.h
ppcbug-rom.o: ppcbug-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
$(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
fi
remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(gdb_string_h) $(arm_tdep_h)
+ $(inferior_h) $(gdb_string_h) $(arm_tdep_h) $(callback_h)
remote-bug.o: remote-bug.c $(defs_h) $(gdbcore_h) $(serial_h) \
$(inferior_h) $(target_h) $(terminal_h) $(remote_utils_h) \
$(gdb_string_h) $(regcache_h)
remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) $(gdb_string_h) \
- $(terminal_h) $(target_h) $(gdbcore_h) $(INCLUDE_DIR)/callback.h \
- $(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h)
+ $(terminal_h) $(target_h) $(gdbcore_h) $(callback_h) \
+ $(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h) \
+ $(sim_regno_h)
remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(serial_h) \
$(target_h) $(gdb_string_h) $(regcache_h)
$(gdb_stabs_h) $(regcache_h) $(arch_utils_h)
rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(target_h) ppc-tdep.h $(regcache_h) $(value_h) $(parser_defs_h)
+ $(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h) $(parser_defs_h)
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
sparc-tdep.o: sparc-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) $(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) \
- $(arch_utils_h) $(regcache_h)
+ $(arch_utils_h) $(regcache_h) osabi.h
sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(target_h) $(regcache_h)
+sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ sparcnbsd-tdep.h
+
+sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ sparcnbsd-tdep.h
+
+sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+ $(target_h) $(value_h) osabi.h sparcnbsd-tdep.h nbsd-tdep.h \
+ solib-svr4.h
+
xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h)
*** Changes since GDB 5.2:
+* ``gdbserver'' now supports multithreaded applications on some targets
+
+Support for multithreaded applications using LinuxThreads has been added
+for arm*-*-linux*, i[3456]86-*-linux*, mips*-*-linux*, powerpc*-*-linux*,
+and sh*-*-linux*.
+
* GDB now supports C/C++ preprocessor macros.
GDB now expands preprocessor macro invocations in C/C++ expressions,
Alpha NetBSD alpha*-*-netbsd*
SH NetBSD sh*-*-netbsdelf*
MIPS NetBSD mips*-*-netbsd*
+UltraSPARC NetBSD sparc64-*-netbsd*
* OBSOLETE configurations and files
alpha_register_convert_to_virtual;
static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw;
static gdbarch_store_struct_return_ftype alpha_store_struct_return;
-static gdbarch_extract_return_value_ftype alpha_extract_return_value;
+static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value;
static gdbarch_store_return_value_ftype alpha_store_return_value;
-static gdbarch_extract_struct_value_address_ftype
+static gdbarch_deprecated_extract_struct_value_address_ftype
alpha_extract_struct_value_address;
static gdbarch_use_struct_convention_ftype alpha_use_struct_convention;
}
\f
-static char *
+static const char *
alpha_register_name (int regno)
{
static char *register_names[] =
struct frame_info *next_frame)
{
CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
+ CORE_ADDR vfp = sp;
CORE_ADDR cur_pc;
int frame_size;
int has_frame_reg = 0;
unsigned long reg_mask = 0;
int pcreg = -1;
+ int regno;
if (start_pc == 0)
return NULL;
if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
{
if (word & 0x8000)
- frame_size += (-word) & 0xffff;
+ {
+ /* Consider only the first stack allocation instruction
+ to contain the static size of the frame. */
+ if (frame_size == 0)
+ frame_size += (-word) & 0xffff;
+ }
else
/* Exit loop if a positive stack adjustment is found, which
usually means that the stack cleanup code in the function
{
int reg = (word & 0x03e00000) >> 21;
reg_mask |= 1 << reg;
- temp_saved_regs[reg] = sp + (short) word;
+
+ /* Do not compute the address where the register was saved yet,
+ because we don't know yet if the offset will need to be
+ relative to $sp or $fp (we can not compute the address relative
+ to $sp if $sp is updated during the execution of the current
+ subroutine, for instance when doing some alloca). So just store
+ the offset for the moment, and compute the address later
+ when we know whether this frame has a frame pointer or not.
+ */
+ temp_saved_regs[reg] = (short) word;
/* Starting with OSF/1-3.2C, the system libraries are shipped
without local symbols, but they still contain procedure
}
else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
pcreg = (word >> 16) & 0x1f;
- else if (word == 0x47de040f) /* bis sp,sp fp */
- has_frame_reg = 1;
+ else if (word == 0x47de040f || word == 0x47fe040f) /* bis sp,sp fp */
+ {
+ /* ??? I am not sure what instruction is 0x47fe040f, and I
+ am suspecting that there was a typo and should have been
+ 0x47fe040f. I'm keeping it in the test above until further
+ investigation */
+ has_frame_reg = 1;
+ vfp = read_next_frame_reg (next_frame, ALPHA_GCC_FP_REGNUM);
+ }
}
if (pcreg == -1)
{
PROC_FRAME_REG (&temp_proc_desc) = ALPHA_GCC_FP_REGNUM;
else
PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
+
+ /* At this point, we know which of the Stack Pointer or the Frame Pointer
+ to use as the reference address to compute the saved registers address.
+ But in both cases, the processing above has set vfp to this reference
+ address, so just need to increment the offset of each saved register
+ by this address. */
+ for (regno = 0; regno < NUM_REGS; regno++)
+ {
+ if (reg_mask & 1 << regno)
+ temp_saved_regs[regno] += vfp;
+ }
+
PROC_FRAME_OFFSET (&temp_proc_desc) = frame_size;
PROC_REG_MASK (&temp_proc_desc) = reg_mask;
PROC_PC_REG (&temp_proc_desc) = (pcreg == -1) ? ALPHA_RA_REGNUM : pcreg;
set_gdbarch_get_saved_register (gdbarch, alpha_get_saved_register);
set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
- set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
set_gdbarch_store_struct_return (gdbarch, alpha_store_struct_return);
set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch,
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
alpha_extract_struct_value_address);
/* Settings for calling functions in the inferior. */
#endif
#include "regcache.h"
#include "gdb_assert.h"
+#include "sim-regno.h"
#include "version.h"
return NULL;
}
+int
+legacy_register_sim_regno (int regnum)
+{
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+ /* NOTE: cagney/2002-05-13: The old code did it this way and it is
+ suspected that some GDB/SIM combinations may rely on this
+ behavour. The default should be one2one_register_sim_regno
+ (below). */
+ if (REGISTER_NAME (regnum) != NULL
+ && REGISTER_NAME (regnum)[0] != '\0')
+ return regnum;
+ else
+ return LEGACY_SIM_REGNO_IGNORE;
+}
+
int
generic_frameless_function_invocation_not (struct frame_info *fi)
{
return 0;
}
-char *
+const char *
legacy_register_name (int i)
{
#ifdef REGISTER_NAMES
}
void
-default_print_float_info (void)
+default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame)
{
#ifdef FLOAT_INFO
#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
#endif
FLOAT_INFO;
#else
- printf_filtered ("No floating point info available for this processor.\n");
+ fprintf_filtered (file, "\
+No floating point info available for this processor.\n");
#endif
}
return 0;
}
-int
-default_register_sim_regno (int num)
-{
- return num;
-}
-
-
CORE_ADDR
core_addr_identity (CORE_ADDR addr)
{
extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
/* Map onto old REGISTER_NAMES. */
-extern char *legacy_register_name (int i);
+extern const char *legacy_register_name (int i);
/* Accessor for old global function pointer for disassembly. */
extern int legacy_print_insn (bfd_vma vma, disassemble_info *info);
extern int (*target_architecture_hook) (const struct bfd_arch_info *);
-
-/* Default raw->sim register re-numbering - does nothing. */
-
-extern int default_register_sim_regno (int reg_nr);
-
/* Identity function on a CORE_ADDR. Just returns its parameter. */
extern CORE_ADDR core_addr_identity (CORE_ADDR addr);
extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
-extern void default_print_float_info (void);
+extern void default_print_float_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame);
/* Assume that the world is sane, a registers raw and virtual size
both match its type. */
extern void legacy_register_to_value (int regnum, struct type *type, char *from, char *to);
extern void legacy_value_to_register (struct type *type, int regnum, char *from, char *to);
+/* For compatibility with older architectures, returns
+ (LEGACY_SIM_REGNO_IGNORE) when the register doesn't have a valid
+ name. */
+
+extern int legacy_register_sim_regno (int regnum);
+
/* Initialize a ``struct info''. Can't use memset(0) since some
default values are not zero. */
extern void gdbarch_info_init (struct gdbarch_info *info);
sizeof (arm_linux_call_dummy_words));
/* The following two overrides shouldn't be needed. */
- set_gdbarch_extract_return_value (gdbarch, arm_linux_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value);
set_gdbarch_push_arguments (gdbarch, arm_linux_push_arguments);
/* Shared library handling. */
#include "solib-svr4.h"
#include "arm-tdep.h"
+#include "gdb/sim-arm.h"
#include "elf-bfd.h"
#include "coff/internal.h"
#include "elf/arm.h"
+#include "gdb_assert.h"
+
+static int arm_debug;
+
/* Each OS has a different mechanism for accessing the various
registers stored in the sigcontext structure.
arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- char *fp;
- int argnum, argreg, nstack_size;
+ CORE_ADDR fp;
+ int argnum;
+ int argreg;
+ int nstack;
+ int simd_argreg;
+ int second_pass;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* Walk through the list of args and determine how large a temporary
stack is required. Need to take care here as structs may be
- passed on the stack, and we have to to push them. */
- nstack_size = -4 * REGISTER_SIZE; /* Some arguments go into A1-A4. */
- if (struct_return) /* The struct address goes in A1. */
- nstack_size += REGISTER_SIZE;
-
- /* Walk through the arguments and add their size to nstack_size. */
- for (argnum = 0; argnum < nargs; argnum++)
- {
- int len;
- struct type *arg_type;
-
- arg_type = check_typedef (VALUE_TYPE (args[argnum]));
- len = TYPE_LENGTH (arg_type);
-
- nstack_size += len;
- }
-
- /* Allocate room on the stack, and initialize our stack frame
- pointer. */
- fp = NULL;
- if (nstack_size > 0)
- {
- sp -= nstack_size;
- fp = (char *) sp;
- }
-
- /* Initialize the integer argument register pointer. */
- argreg = ARM_A1_REGNUM;
-
- /* The struct_return pointer occupies the first parameter passing
- register. */
- if (struct_return)
- write_register (argreg++, struct_addr);
-
- /* Process arguments from left to right. Store as many as allowed
- in the parameter passing registers (A1-A4), and save the rest on
- the temporary stack. */
- for (argnum = 0; argnum < nargs; argnum++)
+ passed on the stack, and we have to to push them. On the second
+ pass, do the store. */
+ nstack = 0;
+ fp = sp;
+ for (second_pass = 0; second_pass < 2; second_pass++)
{
- int len;
- char *val;
- CORE_ADDR regval;
- enum type_code typecode;
- struct type *arg_type, *target_type;
-
- arg_type = check_typedef (VALUE_TYPE (args[argnum]));
- target_type = TYPE_TARGET_TYPE (arg_type);
- len = TYPE_LENGTH (arg_type);
- typecode = TYPE_CODE (arg_type);
- val = (char *) VALUE_CONTENTS (args[argnum]);
-
-#if 1
- /* I don't know why this code was disable. The only logical use
- for a function pointer is to call that function, so setting
- the mode bit is perfectly fine. FN */
- /* If the argument is a pointer to a function, and it is a Thumb
- function, set the low bit of the pointer. */
- if (TYPE_CODE_PTR == typecode
- && NULL != target_type
- && TYPE_CODE_FUNC == TYPE_CODE (target_type))
+ /* Compute the FP using the information computed during the
+ first pass. */
+ if (second_pass)
+ fp = sp - nstack;
+
+ simd_argreg = 0;
+ argreg = ARM_A1_REGNUM;
+ nstack = 0;
+
+ /* The struct_return pointer occupies the first parameter
+ passing register. */
+ if (struct_return)
{
- CORE_ADDR regval = extract_address (val, len);
- if (arm_pc_is_thumb (regval))
- store_address (val, len, MAKE_THUMB_ADDR (regval));
+ if (second_pass)
+ {
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "struct return in %s = 0x%s\n",
+ REGISTER_NAME (argreg),
+ paddr (struct_addr));
+ write_register (argreg, struct_addr);
+ }
+ argreg++;
}
-#endif
- /* Copy the argument to general registers or the stack in
- register-sized pieces. Large arguments are split between
- registers and stack. */
- while (len > 0)
- {
- int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
- if (argreg <= ARM_LAST_ARG_REGNUM)
+ for (argnum = 0; argnum < nargs; argnum++)
+ {
+ int len;
+ struct type *arg_type;
+ struct type *target_type;
+ enum type_code typecode;
+ char *val;
+
+ arg_type = check_typedef (VALUE_TYPE (args[argnum]));
+ len = TYPE_LENGTH (arg_type);
+ target_type = TYPE_TARGET_TYPE (arg_type);
+ typecode = TYPE_CODE (arg_type);
+ val = VALUE_CONTENTS (args[argnum]);
+
+ /* If the argument is a pointer to a function, and it is a
+ Thumb function, create a LOCAL copy of the value and set
+ the THUMB bit in it. */
+ if (second_pass
+ && TYPE_CODE_PTR == typecode
+ && target_type != NULL
+ && TYPE_CODE_FUNC == TYPE_CODE (target_type))
{
- /* It's an argument being passed in a general register. */
- regval = extract_address (val, partial_len);
- write_register (argreg++, regval);
+ CORE_ADDR regval = extract_address (val, len);
+ if (arm_pc_is_thumb (regval))
+ {
+ val = alloca (len);
+ store_address (val, len, MAKE_THUMB_ADDR (regval));
+ }
}
- else
+
+ /* Copy the argument to general registers or the stack in
+ register-sized pieces. Large arguments are split between
+ registers and stack. */
+ while (len > 0)
{
- /* Push the arguments onto the stack. */
- write_memory ((CORE_ADDR) fp, val, REGISTER_SIZE);
- fp += REGISTER_SIZE;
+ int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
+
+ if (argreg <= ARM_LAST_ARG_REGNUM)
+ {
+ /* The argument is being passed in a general purpose
+ register. */
+ if (second_pass)
+ {
+ CORE_ADDR regval = extract_address (val,
+ partial_len);
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "arg %d in %s = 0x%s\n",
+ argnum,
+ REGISTER_NAME (argreg),
+ phex (regval, REGISTER_SIZE));
+ write_register (argreg, regval);
+ }
+ argreg++;
+ }
+ else
+ {
+ if (second_pass)
+ {
+ /* Push the arguments onto the stack. */
+ if (arm_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ "arg %d @ 0x%s + %d\n",
+ argnum, paddr (fp), nstack);
+ write_memory (fp + nstack, val, REGISTER_SIZE);
+ }
+ nstack += REGISTER_SIZE;
+ }
+
+ len -= partial_len;
+ val += partial_len;
}
- len -= partial_len;
- val += partial_len;
}
}
- /* Return adjusted stack pointer. */
- return sp;
+ /* Return the botom of the argument list (pointed to by fp). */
+ return fp;
}
/* Pop the current frame. So long as the frame info has been
/* Print interesting information about the floating point processor
(if present) or emulator. */
static void
-arm_print_float_info (void)
+arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame)
{
register unsigned long status = read_register (ARM_FPS_REGNUM);
int type;
return STATUS_REGISTER_SIZE;
}
+/* Map GDB internal REGNUM onto the Arm simulator register numbers. */
+static int
+arm_register_sim_regno (int regnum)
+{
+ int reg = regnum;
+ gdb_assert (reg >= 0 && reg < NUM_REGS);
+
+ if (reg < NUM_GREGS)
+ return SIM_ARM_R0_REGNUM + reg;
+ reg -= NUM_GREGS;
+
+ if (reg < NUM_FREGS)
+ return SIM_ARM_FP0_REGNUM + reg;
+ reg -= NUM_FREGS;
+
+ if (reg < NUM_SREGS)
+ return SIM_ARM_FPS_REGNUM + reg;
+ reg -= NUM_SREGS;
+
+ internal_error (__FILE__, __LINE__, "Bad REGNUM %d", regnum);
+}
/* NOTE: cagney/2001-08-20: Both convert_from_extended() and
convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
set_gdbarch_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, arm_register_type);
+ /* Internal <-> external register number maps. */
+ set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno);
+
/* Integer registers are 4 bytes. */
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_name (gdbarch, arm_register_name);
/* Returning results. */
- set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, arm_extract_return_value);
set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
- set_gdbarch_extract_struct_value_address (gdbarch,
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
arm_extract_struct_value_address);
/* Single stepping. */
prologue_cache.saved_regs = NULL;
prologue_cache.extra_info = (struct frame_extra_info *)
xcalloc (1, sizeof (struct frame_extra_info));
+
+ /* Debugging flag. */
+ add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger,
+ &arm_debug, "Set arm debugging.\n\
+When non-zero, arm specific debugging is enabled.", &setdebuglist),
+ &showdebuglist);
}
/* Lookup the name of a register given it's number. */
-static char *
+static const char *
avr_register_name (int regnum)
{
static char *register_names[] = {
set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
- set_gdbarch_extract_return_value (gdbarch, avr_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, avr_extract_return_value);
set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
/* set_gdbarch_push_return_address (gdbarch, avr_push_return_address); */
set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return);
- set_gdbarch_extract_struct_value_address (gdbarch,
- avr_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address
+ (gdbarch, avr_extract_struct_value_address);
set_gdbarch_frame_init_saved_regs (gdbarch, avr_scan_prologue);
set_gdbarch_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
#include "inferior.h" /* for read_pc */
#include "annotate.h"
#include "regcache.h"
+#include "gdb_assert.h"
/* Prototypes for exported functions. */
+static void generic_call_dummy_register_unwind (struct frame_info *frame,
+ void **cache,
+ int regnum,
+ int *optimized,
+ enum lval_type *lval,
+ CORE_ADDR *addrp,
+ int *realnum,
+ void *raw_buffer);
+static void frame_saved_regs_register_unwind (struct frame_info *frame,
+ void **cache,
+ int regnum,
+ int *optimized,
+ enum lval_type *lval,
+ CORE_ADDR *addrp,
+ int *realnum,
+ void *buffer);
+
+
void _initialize_blockframe (void);
/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
current_frame = frame;
}
+
+/* Using the PC, select a mechanism for unwinding a frame returning
+ the previous frame. The register unwind function should, on
+ demand, initialize the ->context object. */
+
+static void
+set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
+ frame_register_unwind_ftype **unwind)
+{
+ if (!USE_GENERIC_DUMMY_FRAMES)
+ /* Still need to set this to something. The ``info frame'' code
+ calls this function to find out where the saved registers are.
+ Hopefully this is robust enough to stop any core dumps and
+ return vaguely correct values.. */
+ *unwind = frame_saved_regs_register_unwind;
+ else if (PC_IN_CALL_DUMMY (pc, fp, fp))
+ *unwind = generic_call_dummy_register_unwind;
+ else
+ *unwind = frame_saved_regs_register_unwind;
+}
+
/* Create an arbitrary (i.e. address specified by user) or innermost frame.
Always returns a non-NULL value. */
if (INIT_EXTRA_FRAME_INFO_P ())
INIT_EXTRA_FRAME_INFO (0, fi);
+ /* Select/initialize an unwind function. */
+ set_unwind_by_pc (fi->pc, fi->frame, &fi->register_unwind);
+
return fi;
}
start go curfluy than have an abort called from main not show
main. */
address = FRAME_CHAIN (next_frame);
+
+ /* FIXME: cagney/2002-06-08: There should be two tests here.
+ The first would check for a valid frame chain based on a user
+ selectable policy. The default being ``stop at main'' (as
+ implemented by generic_func_frame_chain_valid()). Other
+ policies would be available - stop at NULL, .... The second
+ test, if provided by the target architecture, would check for
+ more exotic cases - most target architectures wouldn't bother
+ with this second case. */
if (!FRAME_CHAIN_VALID (address, next_frame))
return 0;
}
}
}
+ /* Initialize the code used to unwind the frame PREV based on the PC
+ (and probably other architectural information). The PC lets you
+ check things like the debug info at that point (dwarf2cfi?) and
+ use that to decide how the frame should be unwound. */
+ set_unwind_by_pc (prev->pc, prev->frame, &prev->register_unwind);
+
find_pc_partial_function (prev->pc, &name,
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
if (PC_IN_SIGTRAMP (prev->pc, name))
int
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
{
- if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
+ if (USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
return (fp != 0
return;
}
+/* Given a call-dummy dummy-frame, return the registers. Here the
+ register value is taken from the local copy of the register buffer. */
+
+static void
+generic_call_dummy_register_unwind (struct frame_info *frame, void **cache,
+ int regnum, int *optimized,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnum, void *bufferp)
+{
+ gdb_assert (frame != NULL);
+ gdb_assert (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
+
+ /* Describe the register's location. Generic dummy frames always
+ have the register value in an ``expression''. */
+ *optimized = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnum = -1;
+
+ /* If needed, find and return the value of the register. */
+ if (bufferp != NULL)
+ {
+ char *registers;
+#if 1
+ /* Get the address of the register buffer that contains all the
+ saved registers for this dummy frame. Cache that address. */
+ registers = (*cache);
+ if (registers == NULL)
+ {
+ registers = generic_find_dummy_frame (frame->pc, frame->frame);
+ (*cache) = registers;
+ }
+#else
+ /* Get the address of the register buffer that contains the
+ saved registers and then extract the value from that. */
+ registers = generic_find_dummy_frame (frame->pc, frame->frame);
+#endif
+ gdb_assert (registers != NULL);
+ /* Return the actual value. */
+ memcpy (bufferp, registers + REGISTER_BYTE (regnum),
+ REGISTER_RAW_SIZE (regnum));
+ }
+}
+
+/* Return the register saved in the simplistic ``saved_regs'' cache.
+ If the value isn't here AND a value is needed, try the next inner
+ most frame. */
+
+static void
+frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ /* There is always a frame at this point. And THIS is the frame
+ we're interested in. */
+ gdb_assert (frame != NULL);
+ gdb_assert (!PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
+
+ /* Load the saved_regs register cache. */
+ if (frame->saved_regs == NULL)
+ FRAME_INIT_SAVED_REGS (frame);
+
+ if (frame->saved_regs != NULL
+ && frame->saved_regs[regnum] != 0)
+ {
+ if (regnum == SP_REGNUM)
+ {
+ /* SP register treated specially. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_address (bufferp, REGISTER_RAW_SIZE (regnum),
+ frame->saved_regs[regnum]);
+ }
+ else
+ {
+ /* Any other register is saved in memory, fetch it but cache
+ a local copy of its value. */
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = frame->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+#if 1
+ /* Save each register value, as it is read in, in a
+ frame based cache. */
+ void **regs = (*cache);
+ if (regs == NULL)
+ {
+ int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
+ * sizeof (void *));
+ regs = frame_obstack_alloc (sizeof_cache);
+ memset (regs, 0, sizeof_cache);
+ (*cache) = regs;
+ }
+ if (regs[regnum] == NULL)
+ {
+ regs[regnum]
+ = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
+ read_memory (frame->saved_regs[regnum], regs[regnum],
+ REGISTER_RAW_SIZE (regnum));
+ }
+ memcpy (bufferp, regs[regnum], REGISTER_RAW_SIZE (regnum));
+#else
+ /* Read the value in from memory. */
+ read_memory (frame->saved_regs[regnum], bufferp,
+ REGISTER_RAW_SIZE (regnum));
+#endif
+ }
+ }
+ return;
+ }
+
+ /* No luck, assume this and the next frame have the same register
+ value. If a value is needed, pass the request on down the chain;
+ otherwise just return an indication that the value is in the same
+ register as the next frame. */
+ if (bufferp == NULL)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_register;
+ *addrp = 0;
+ *realnump = regnum;
+ }
+ else
+ {
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+ }
+}
+
/* Function: get_saved_register
Find register number REGNUM relative to FRAME and put its (raw,
target format) contents in *RAW_BUFFER.
error ("Junk at end of expression");
}
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
free_command_lines (&b->commands);
b->commands = l;
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
error ("No breakpoint number %d.", bnum);
else
{
struct frame_info *fi;
-
- /* There might be no current frame at this moment if we are
- resuming from a step over a breakpoint.
- Set up current frame before trying to find the watchpoint
- frame. */
- get_current_frame ();
- fi = find_frame_addr_in_frame_chain (b->watchpoint_frame);
+ fi = frame_find_by_id (b->watchpoint_frame);
within_current_scope = (fi != NULL);
if (within_current_scope)
select_frame (fi);
any chance of handling watchpoints on local variables, we'll need
the frame chain (so we can determine if we're in scope). */
reinit_frame_cache ();
- fr = find_frame_addr_in_frame_chain (b->watchpoint_frame);
+ fr = frame_find_by_id (b->watchpoint_frame);
within_current_scope = (fr != NULL);
/* in_function_epilogue_p() returns a non-zero value if we're still
in the function but the stack frame has already been invalidated.
if (frame)
{
prev_frame = get_prev_frame (frame);
- b->watchpoint_frame = frame->frame;
+ get_frame_id (frame, &b->watchpoint_frame);
}
else
- b->watchpoint_frame = (CORE_ADDR) 0;
+ {
+ memset (&b->watchpoint_frame, 0, sizeof (b->watchpoint_frame));
+ }
/* If the expression is "local", then set up a "watchpoint scope"
breakpoint at the point where we've left the scope of the watchpoint
if (b->number == bptnum)
{
b->ignore_count = count;
- if (!from_tty)
- return;
- else if (count == 0)
- printf_filtered ("Will stop next time breakpoint %d is reached.",
- bptnum);
- else if (count == 1)
- printf_filtered ("Will ignore next crossing of breakpoint %d.",
- bptnum);
- else
- printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
- count, bptnum);
+ if (from_tty)
+ {
+ if (count == 0)
+ printf_filtered ("Will stop next time breakpoint %d is reached.",
+ bptnum);
+ else if (count == 1)
+ printf_filtered ("Will ignore next crossing of breakpoint %d.",
+ bptnum);
+ else
+ printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
+ count, bptnum);
+ }
breakpoints_changed ();
+ breakpoint_modify_event (b->number);
return;
}
set_ignore_count (num,
longest_to_int (value_as_long (parse_and_eval (p))),
from_tty);
- printf_filtered ("\n");
- breakpoints_changed ();
+ if (from_tty)
+ printf_filtered ("\n");
}
\f
/* Call FUNCTION on each of the breakpoints
if (bpt->exp_valid_block != NULL)
{
struct frame_info *fr =
-
- /* Ensure that we have the current frame. Else, this
- next query may pessimistically be answered as, "No,
- not within current scope". */
- get_current_frame ();
- fr = find_frame_addr_in_frame_chain (bpt->watchpoint_frame);
+ fr = frame_find_by_id (bpt->watchpoint_frame);
if (fr == NULL)
{
printf_filtered ("\
it the watchpoint_scope breakpoint or something like that. FIXME). */
struct breakpoint *related_breakpoint;
- /* Holds the frame address which identifies the frame this watchpoint
- should be evaluated in, or NULL if the watchpoint should be evaluated
- on the outermost frame. */
- CORE_ADDR watchpoint_frame;
+ /* Holds the frame address which identifies the frame this
+ watchpoint should be evaluated in, or `null' if the watchpoint
+ should be evaluated on the outermost frame. */
+ struct frame_id watchpoint_frame;
/* Thread number for thread-specific breakpoint, or -1 if don't care */
int thread;
/* Flag indicating target was compiled by HP compiler */
extern int hp_som_som_object_present;
-static void cp_type_print_method_args (struct type ** args, char *prefix,
+static void cp_type_print_method_args (struct type *mtype, char *prefix,
char *varstring, int staticp,
struct ui_file *stream);
fputs_filtered (" ", stream);
}
}
+
/* Print the C++ method arguments ARGS to the file STREAM. */
static void
-cp_type_print_method_args (struct type **args, char *prefix, char *varstring,
+cp_type_print_method_args (struct type *mtype, char *prefix, char *varstring,
int staticp, struct ui_file *stream)
{
+ struct field *args = TYPE_FIELDS (mtype);
+ int nargs = TYPE_NFIELDS (mtype);
+ int varargs = TYPE_VARARGS (mtype);
int i;
fprintf_symbol_filtered (stream, prefix, language_cplus, DMGL_ANSI);
fprintf_symbol_filtered (stream, varstring, language_cplus, DMGL_ANSI);
fputs_filtered ("(", stream);
- if (args && args[!staticp] && TYPE_CODE (args[!staticp]) != TYPE_CODE_VOID)
+
+ /* Skip the class variable. */
+ i = staticp ? 0 : 1;
+ if (nargs > i)
{
- i = !staticp; /* skip the class variable */
- while (1)
+ while (i < nargs)
{
- type_print (args[i++], "", stream, 0);
- if (!args[i])
- {
- fprintf_filtered (stream, " ...");
- break;
- }
- else if (TYPE_CODE (args[i]) != TYPE_CODE_VOID)
- {
- fprintf_filtered (stream, ", ");
- }
- else
- break;
+ type_print (args[i++].type, "", stream, 0);
+
+ if (i == nargs && varargs)
+ fprintf_filtered (stream, ", ...");
+ else if (i < nargs)
+ fprintf_filtered (stream, ", ");
}
}
+ else if (varargs)
+ fprintf_filtered (stream, "...");
else if (current_language->la_language == language_cplus)
- {
- fprintf_filtered (stream, "void");
- }
+ fprintf_filtered (stream, "void");
fprintf_filtered (stream, ")");
}
c_type_print_args (struct type *type, struct ui_file *stream)
{
int i;
- struct type **args;
+ struct field *args;
fprintf_filtered (stream, "(");
- args = TYPE_ARG_TYPES (type);
+ args = TYPE_FIELDS (type);
if (args != NULL)
{
- if (args[1] == NULL)
- {
- fprintf_filtered (stream, "...");
- }
- else if ((TYPE_CODE (args[1]) == TYPE_CODE_VOID) &&
- (current_language->la_language == language_cplus))
- {
- fprintf_filtered (stream, "void");
- }
- else
+ int i;
+
+ /* FIXME drow/2002-05-31: Always skips the first argument,
+ should we be checking for static members? */
+
+ for (i = 1; i < TYPE_NFIELDS (type); i++)
{
- for (i = 1;
- args[i] != NULL && TYPE_CODE (args[i]) != TYPE_CODE_VOID;
- i++)
+ c_print_type (args[i].type, "", stream, -1, 0);
+ if (i != TYPE_NFIELDS (type))
{
- c_print_type (args[i], "", stream, -1, 0);
- if (args[i + 1] == NULL)
- {
- fprintf_filtered (stream, "...");
- }
- else if (TYPE_CODE (args[i + 1]) != TYPE_CODE_VOID)
- {
- fprintf_filtered (stream, ",");
- wrap_here (" ");
- }
+ fprintf_filtered (stream, ",");
+ wrap_here (" ");
}
}
+ if (TYPE_VARARGS (type))
+ fprintf_filtered (stream, "...");
+ else if (i == 1
+ && (current_language->la_language == language_cplus))
+ fprintf_filtered (stream, "void");
}
else if (current_language->la_language == language_cplus)
{
Let's try to reconstruct the function signature from
the symbol information */
if (!TYPE_FN_FIELD_STUB (f, j))
- cp_type_print_method_args (TYPE_FN_FIELD_ARGS (f, j), "",
- method_name,
- TYPE_FN_FIELD_STATIC_P (f, j),
- stream);
+ {
+ int staticp = TYPE_FN_FIELD_STATIC_P (f, j);
+ struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
+ cp_type_print_method_args (mtype,
+ "",
+ method_name,
+ staticp,
+ stream);
+ }
else
fprintf_filtered (stream, "<badly mangled name '%s'>",
mangled_name);
}
void
-set_cmd_cfunc (struct cmd_list_element *cmd,
- void (*cfunc) (char *args, int from_tty))
+set_cmd_cfunc (struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
{
if (cfunc == NULL)
cmd->func = NULL;
}
void
-set_cmd_sfunc (struct cmd_list_element *cmd,
- void (*sfunc) (char *args, int from_tty,
- struct cmd_list_element * c))
+set_cmd_sfunc (struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
{
if (sfunc == NULL)
cmd->func = NULL;
return c;
}
+/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
+ CLASS is as in add_cmd. VAR_TYPE is the kind of thing we are
+ setting. VAR is address of the variable being controlled by this
+ command. SET_FUNC and SHOW_FUNC are the callback functions (if
+ non-NULL). SET_DOC and SHOW_DOC are the documentation strings. */
+
+static struct cmd_list_element *
+add_setshow_cmd (char *name,
+ enum command_class class,
+ var_types var_type, void *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ struct cmd_list_element *set;
+ struct cmd_list_element *show;
+ set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
+ set_doc, set_list);
+ if (set_func != NULL)
+ set_cmd_sfunc (set, set_func);
+ show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+ show_doc, show_list);
+ if (show_func != NULL)
+ set_cmd_sfunc (show, show_func);
+ /* The caller often wants to modify set to include info like an
+ enumeration. */
+ return set;
+}
struct cmd_list_element *
add_set_cmd (char *name,
return c;
}
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- VAR is address of the variable which will contain the value.
- DOC is the documentation string. */
-struct cmd_list_element *
-add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list)
+/* Add an auto-boolean command named NAME to both the set and show
+ command list lists. CLASS is as in add_cmd. VAR is address of the
+ variable which will contain the value. DOC is the documentation
+ string. FUNC is the corresponding callback. */
+void
+add_setshow_auto_boolean_cmd (char *name,
+ enum command_class class,
+ enum auto_boolean *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
{
static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
struct cmd_list_element *c;
- c = add_set_cmd (name, class, var_auto_boolean, var, doc, list);
+ c = add_setshow_cmd (name, class, var_auto_boolean, var,
+ set_doc, show_doc, set_func, show_func,
+ set_list, show_list);
c->enums = auto_boolean_enums;
- return c;
}
-/* Add element named NAME to command list LIST (the list for set
- or some sublist thereof).
- CLASS is as in add_cmd.
- VAR is address of the variable which will contain the value.
- DOC is the documentation string. */
-struct cmd_list_element *
-add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list)
+/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). CLASS is as in
+ add_cmd. VAR is address of the variable which will contain the
+ value. SET_DOC and SHOW_DOR are the documentation strings. */
+void
+add_setshow_boolean_cmd (char *name,
+ enum command_class class,
+ int *var, char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
{
static const char *boolean_enums[] = { "on", "off", NULL };
struct cmd_list_element *c;
- c = add_set_cmd (name, class, var_boolean, var, doc, list);
+ c = add_setshow_cmd (name, class, var_boolean, var,
+ set_doc, show_doc,
+ set_func, show_func,
+ set_list, show_list);
c->enums = boolean_enums;
- return c;
}
/* Where SETCMD has already been added, add the corresponding show
to one of the below. */
union
{
- /* If type is not_set_cmd, call it like this: */
- void (*cfunc) (char *args, int from_tty);
-
- /* If type is set_cmd or show_cmd, first set the variables, and
- then call this. */
- void (*sfunc) (char *args, int from_tty, struct cmd_list_element * c);
+ /* If type is not_set_cmd, call it like this: */
+ cmd_cfunc_ftype *cfunc;
+ /* If type is set_cmd or show_cmd, first set the variables,
+ and then call this: */
+ cmd_sfunc_ftype *sfunc;
}
function;
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list);
-
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list);
-
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
struct cmd_list_element
**);
static int parse_binary_operation (char *);
-static enum cmd_auto_boolean parse_auto_binary_operation (const char *arg);
\f
-static enum cmd_auto_boolean
+static enum auto_boolean
parse_auto_binary_operation (const char *arg)
{
if (arg != NULL && *arg != '\0')
|| strncmp (arg, "1", length) == 0
|| strncmp (arg, "yes", length) == 0
|| strncmp (arg, "enable", length) == 0)
- return CMD_AUTO_BOOLEAN_TRUE;
+ return AUTO_BOOLEAN_TRUE;
else if (strncmp (arg, "off", length) == 0
|| strncmp (arg, "0", length) == 0
|| strncmp (arg, "no", length) == 0
|| strncmp (arg, "disable", length) == 0)
- return CMD_AUTO_BOOLEAN_FALSE;
+ return AUTO_BOOLEAN_FALSE;
else if (strncmp (arg, "auto", length) == 0
|| (strncmp (arg, "-1", length) == 0 && length > 1))
- return CMD_AUTO_BOOLEAN_AUTO;
+ return AUTO_BOOLEAN_AUTO;
}
error ("\"on\", \"off\" or \"auto\" expected.");
- return CMD_AUTO_BOOLEAN_AUTO; /* pacify GCC */
+ return AUTO_BOOLEAN_AUTO; /* pacify GCC */
}
static int
*(int *) c->var = parse_binary_operation (arg);
break;
case var_auto_boolean:
- *(enum cmd_auto_boolean *) c->var = parse_auto_binary_operation (arg);
+ *(enum auto_boolean *) c->var = parse_auto_binary_operation (arg);
break;
case var_uinteger:
if (arg == NULL)
fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
break;
case var_auto_boolean:
- switch (*(enum cmd_auto_boolean*) c->var)
+ switch (*(enum auto_boolean*) c->var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
fputs_filtered ("on", stb->stream);
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
fputs_filtered ("off", stb->stream);
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
fputs_filtered ("auto", stb->stream);
break;
default:
}
cmd_types;
-/* Reasonable values for an AUTO_BOOLEAN variable. */
-enum cmd_auto_boolean
-{
- CMD_AUTO_BOOLEAN_TRUE,
- CMD_AUTO_BOOLEAN_FALSE,
- CMD_AUTO_BOOLEAN_AUTO
-};
-
/* Types of "set" or "show" command. */
typedef enum var_types
{
var_boolean,
/* "on" / "true" / "enable" or "off" / "false" / "disable" or
- "auto. *VAR is an ``enum cmd_auto_boolean''. NOTE: In general
- a custom show command will need to be implemented - one that
- for "auto" prints both the "auto" and the current auto-selected
+ "auto. *VAR is an ``enum auto_boolean''. NOTE: In general a
+ custom show command will need to be implemented - one that for
+ "auto" prints both the "auto" and the current auto-selected
value. */
var_auto_boolean,
/* Set the commands corresponding callback. */
+typedef void cmd_cfunc_ftype (char *args, int from_tty);
extern void set_cmd_cfunc (struct cmd_list_element *cmd,
- void (*cfunc) (char *args, int from_tty));
+ cmd_cfunc_ftype *cfunc);
+typedef void cmd_sfunc_ftype (char *args, int from_tty,
+ struct cmd_list_element *c);
extern void set_cmd_sfunc (struct cmd_list_element *cmd,
- void (*sfunc) (char *args, int from_tty,
- struct cmd_list_element * c));
+ cmd_sfunc_ftype *sfunc);
extern void set_cmd_completer (struct cmd_list_element *cmd,
char **(*completer) (char *text, char *word));
char *doc,
struct cmd_list_element **list);
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
- enum command_class class,
- enum cmd_auto_boolean *var,
- char *doc,
- struct cmd_list_element **list);
-
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
- enum command_class class,
- int *var,
- char *doc,
- struct cmd_list_element **list);
+extern void add_setshow_auto_boolean_cmd (char *name,
+ enum command_class class,
+ enum auto_boolean *var,
+ char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
+extern void add_setshow_boolean_cmd (char *name,
+ enum command_class class,
+ int *var,
+ char *set_doc,
+ char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
struct cmd_list_element
#ifndef NM_LINUX_H
#define NM_LINUX_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* ptrace register ``addresses'' are absolute. */
#undef START_INFERIOR_TRAPS_EXPECTED
#define START_INFERIOR_TRAPS_EXPECTED 2
-#include "tm-linux.h"
+#include "config/tm-linux.h"
#endif /* TM_LINUXALPHA_H */
into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
type is 0.
*/
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
/* If USE_STRUCT_CONVENTION produces a 1,
extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(error("Don't know where large structure is returned on arc"), 0)
/* Write into appropriate registers a function return value
#ifndef NM_ARMLINUX_H
#define NM_ARMLINUX_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* ptrace register ``addresses'' are absolute. */
/* Include the common ARM target definitions. */
#include "arm/tm-arm.h"
-#include "tm-linux.h"
+#include "config/tm-linux.h"
/* Use target-specific function to define link map offsets. */
extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void);
Boston, MA 02111-1307, USA. */
/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2])
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2])
\f
/* Define other aspects of the stack frame.
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
d30v_extract_return_value(TYPE, REGBUF, VALBUF)
extern void d30v_extract_return_value (struct type *, char *, char *);
@V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
@V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
@V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
-@V@/bfd/elf32-i370.c @V@/bfd/elf32-i7.c
+@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
+@V@/bfd/elf32-i386.c @V@/bfd/e32i86.c
+@V@/bfd/elf32-i386qnx.c @V@/bfd/e32i86q.c
@V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
@V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
@V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
-@V@/bfd/elf32-sh-lin.c @V@/bfd/elf32shlin.c
-@V@/bfd/elf32-sh-nbsd.c @V@/bfd/elf32shnb.c
-@V@/bfd/elf32-sh64.c @V@/bfd/elf32sh64.c
+@V@/bfd/elf32-sh-lin.c @V@/bfd/e32shlin.c
+@V@/bfd/elf32-sh-nbsd.c @V@/bfd/e32shn.c
+@V@/bfd/elf32-sh64.c @V@/bfd/e32sh64.c
+@V@/bfd/elf32-sh64-nbsd.c @V@/bfd/e32sh64n.c
+@V@/bfd/elf64-sh64.c @V@/bfd/e64sh64.c
+@V@/bfd/elf64-sh64-nbsd.c @V@/bfd/e64sh64n.c
@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
@V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
@V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
@V@/gdb/mipsnbsd-nat.c @V@/gdb/mipsnbnat.c
@V@/gdb/mipsnbsd-tdep.c @V@/gdb/mipsnbtdep.c
@V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
+@V@/gdb/ns32knbsd-nat.c @V@/gdb/ns32nb-nat.c
+@V@/gdb/ns32knbsd-tdep.c @V@/gdb/ns32nb-tdep.c
@V@/gdb/osf-share/cma_stack_int.h @V@/gdb/osf-share/cma_stkint.h
@V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
@V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
+@V@/gdb/ppcnbsd-nat.c @V@/gdb/ppcnb-nat.c
+@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-tdep.c
@V@/gdb/regformats/reg-i386-linux.dat @V@/gdb/regformats/r-i386-lnx.dat
@V@/gdb/regformats/reg-s390x.dat @V@/gdb/regformats/r-s390x.dat
@V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
@V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
@V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
@V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
+@V@/gdb/sparcnbsd-nat.c @V@/gdb/spnb-nat.c
+@V@/gdb/sparcnbsd-tdep.c @V@/gdb/spnb-tdep.c
@V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
+@V@/gdb/testsuite/gdb.arch/altivec-abi.c @V@/gdb/testsuite/gdb.arch/av-abi.c
+@V@/gdb/testsuite/gdb.arch/altivec-abi.exp @V@/gdb/testsuite/gdb.arch/av-abi.exp
+@V@/gdb/testsuite/gdb.arch/altivec-regs.c @V@/gdb/testsuite/gdb.arch/av-regs.c
+@V@/gdb/testsuite/gdb.arch/altivec-regs.exp @V@/gdb/testsuite/gdb.arch/av-regs.exp
@V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
@V@/gdb/testsuite/gdb.c++ @V@/gdb/testsuite/gdb.cxx
@V@/gdb/testsuite/gdb.c++/Makefile.in @V@/gdb/testsuite/gdb.cxx/Makefile.in
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy (VALBUF, REGBUF + REGISTER_BYTE(RETVAL_REG) + \
(TYPE_LENGTH(TYPE) < 4 ? 4 - TYPE_LENGTH(TYPE) : 0), TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
extract_address (REGBUF + REGISTER_BYTE (RETVAL_REG), \
REGISTER_RAW_SIZE (RETVAL_REG))
/* FIXME: Won't work with both h8/300's. */
extern void h8300_extract_return_value (struct type *, char *, char *);
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
h8300_extract_return_value (TYPE, (char *)(REGBUF), (char *)(VALBUF))
/* Write into appropriate registers a function return value
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
extract_address (REGBUF + REGISTER_BYTE (0), \
REGISTER_RAW_SIZE (0))
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE))
/* Write into appropriate registers a function return value
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
\f
/* Define other aspects of the stack frame. */
# Target: Intel 386 running NetWare
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386nw.h
+TM_FILE= tm-i386.h
NAT_FILE= nm-i386sol2.h
NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o
+ procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o \
+ solib.o solib-svr4.o solib-legacy.o
-# Target: Intel 386 running SVR4
-TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o solib-legacy.o
+# Target: Intel 386 running Solaris 2 (SVR4)
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o i386bsd-tdep.o
TM_FILE= tm-i386sol2.h
/* Include the generic hurd definitions. */
-#include "nm-gnu.h"
+#include "config/nm-gnu.h"
#ifndef NM_I386LYNX_H
#define NM_I386LYNX_H
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
#endif /* NM_I386LYNX_H */
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
/* Poll causes GDB to hang, at least under Unixware 1.1.2. */
#define LOSING_POLL
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#define I386_USE_GENERIC_WATCHPOINTS
#include "i386/nm-i386.h"
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* Support for the user area. */
/* Include the generic Mach 3 definitions. */
-#include "nm-m3.h"
+#include "config/nm-m3.h"
#include "regcache.h"
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#undef USE_PROC_FS
-#include "nm-symmetry.h"
+#include "i386/nm-symmetry.h"
#define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0)
#define PTRACE_WRITE_REGS(pid,regaddr) \
#ifndef NM_X86_64_H
#define NM_X86_64_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
#define I386_USE_GENERIC_WATCHPOINTS
#include "i386/nm-i386.h"
#else
#undef HAVE_SSE_REGS
#endif /* CONTEXT_EXTENDED_REGISTERS */
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
#ifndef TM_FBSD_H
#define TM_FBSD_H
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
-/* FreeBSD/ELF uses stabs-in-ELF with the DWARF register numbering
- scheme by default, so we must redefine STAB_REG_TO_REGNUM. This
- messes up the floating-point registers for a.out, but there is not
- much we can do about that. */
-
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* FreeBSD uses the old gcc convention for struct returns. */
-
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
- generic_use_struct_convention (1, type)
-\f
-
-/* Support for longjmp. */
-
-/* Details about jmp_buf. It's supposed to be an array of integers. */
-
-#define JB_ELEMENT_SIZE 4 /* Size of elements in jmp_buf. */
-#define JB_PC 0 /* Array index of saved PC. */
-
-/* Figure out where the longjmp will land. Store the address that
- longjmp will jump to in *ADDR, and return non-zero if successful. */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
-\f
-
-/* Support for signal handlers. */
-
-#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
-extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
-
/* These defines allow the recognition of sigtramps as a function name
<sigtramp>.
- FIXME: kettenis/2001-07-13: These should be added to the target
- vector and turned into functions when we go "multi-arch". */
-
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
-extern CORE_ADDR i386bsd_sigtramp_start;
-extern CORE_ADDR i386bsd_sigtramp_end;
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
+ FIXME: kettenis/2002-05-12: Of course these defines will have to go
+ if we go truly "multi-arch", but I don't know yet how to get rid of
+ them. */
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
-extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
-\f
+#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
+#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
+extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
+extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
/* Shared library support. */
#define TM_GO32_H
#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
-/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
- chain-pointer.
- In the case of the i386, the frame's nominal address
- is the address of a 4-byte word containing the calling frame's address.
- DJGPP doesn't have any special frames for signal handlers, they are
- just normal C functions. */
-#undef FRAME_CHAIN
-#define FRAME_CHAIN(thisframe) \
- (!inside_entry_file ((thisframe)->pc) ? \
- read_memory_integer ((thisframe)->frame, 4) :\
- 0)
-
-/* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
-#undef FRAMELESS_FUNCTION_INVOCATION
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (frameless_look_for_prologue(FI))
-
-extern CORE_ADDR i386go32_frame_saved_pc (struct frame_info *frame);
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(FRAME) (i386go32_frame_saved_pc ((FRAME)))
-
-/* Support for longjmp. */
-
-/* Details about jmp_buf. It's supposed to be an array of integers. */
-
-#define JB_ELEMENT_SIZE 4 /* Size of elements in jmp_buf. */
-#define JB_PC 8 /* Array index of saved PC inside jmp_buf. */
-
-/* Figure out where the longjmp will land. Slurp the args out of the
- stack. We expect the first arg to be a pointer to the jmp_buf
- structure from which we extract the pc (JB_PC) that we will land
- at. The pc is copied into ADDR. This routine returns true on
- success. */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
-
#endif /* TM_GO32_H */
struct value;
struct type;
-/* The format used for `long double' on almost all i386 targets is the
- i387 extended floating-point format. In fact, of all targets in the
- GCC 2.95 tree, only OSF/1 does it different, and insists on having
- a `long double' that's not `long' at all. */
-
-#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i387_ext
-
-/* Although the i386 extended floating-point has only 80 significant
- bits, a `long double' actually takes up 96, probably to enforce
- alignment. */
-
-#define TARGET_LONG_DOUBLE_BIT 96
-
-/* Number of traps that happen between exec'ing the shell to run an
- inferior, and when we finally get to the inferior code. This is 2
- on most implementations. */
-
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions to reach some
- "real" code. */
-
-#define SKIP_PROLOGUE(frompc) (i386_skip_prologue (frompc))
-
-extern int i386_skip_prologue (int);
-
-/* Immediately after a function call, return the saved pc. */
-
-#define SAVED_PC_AFTER_CALL(frame) i386_saved_pc_after_call (frame)
-extern CORE_ADDR i386_saved_pc_after_call (struct frame_info *frame);
-
-/* Stack grows downward. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction. */
-
-#define BREAKPOINT {0xcc}
-
-/* Amount PC must be decremented by after a breakpoint. This is often the
- number of bytes in BREAKPOINT but not always. */
-
-#define DECR_PC_AFTER_BREAK 1
-
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-
-#define REGISTER_SIZE 4
-
-/* This register file is parameterized by two macros:
- HAVE_I387_REGS --- register file should include i387 registers
- HAVE_SSE_REGS --- register file should include SSE registers
- If HAVE_SSE_REGS is #defined, then HAVE_I387_REGS must also be #defined.
-
- However, GDB code should not test those macros with #ifdef, since
- that makes code which is annoying to multi-arch. Instead, GDB code
- should check the values of NUM_GREGS, NUM_FREGS, and NUM_SSE_REGS,
- which will eventually get mapped onto architecture vector entries.
-
- It's okay to use the macros in tm-*.h files, though, since those
- files will get completely replaced when we multi-arch anyway. */
-
-/* Number of general registers, present on every 32-bit x86 variant. */
-#define NUM_GREGS (16)
-
-/* Number of floating-point unit registers. */
-#ifdef HAVE_I387_REGS
-#define NUM_FREGS (16)
-#else
-#define NUM_FREGS (0)
-#endif
-
-/* Number of SSE registers. */
-#ifdef HAVE_SSE_REGS
-#define NUM_SSE_REGS (9)
-#else
-#define NUM_SSE_REGS (0)
-#endif
-
-/* Largest number of registers we could have in any configuration. */
-#define MAX_NUM_REGS (16 + 16 + 9)
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define FP_REGNUM 5 /* (ebp) Contains address of executing stack
- frame */
-#define SP_REGNUM 4 /* (usp) Contains address of top of stack */
-#define PC_REGNUM 8 /* (eip) Contains program counter */
-#define PS_REGNUM 9 /* (ps) Contains processor status */
-
-/* First FPU data register. */
-#ifdef HAVE_I387_REGS
-#define FP0_REGNUM 16
-#else
-#define FP0_REGNUM 0
-#endif
-
-/* Return the name of register REG. */
-
-#define REGISTER_NAME(reg) i386_register_name ((reg))
-extern char *i386_register_name (int reg);
-
-/* Use the "default" register numbering scheme for stabs and COFF. */
-
-#define STAB_REG_TO_REGNUM(reg) i386_stab_reg_to_regnum ((reg))
-#define SDB_REG_TO_REGNUM(reg) i386_stab_reg_to_regnum ((reg))
-extern int i386_stab_reg_to_regnum (int reg);
-
-/* Use the DWARF register numbering scheme for DWARF and DWARF 2. */
-
-#define DWARF_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-#define DWARF2_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-extern int i386_dwarf_reg_to_regnum (int reg);
-
-/* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to be
- in use on any of the supported i386 targets. */
-\f
-
-/* Sizes of individual register sets. These cover the entire register
- file, so summing up the sizes of those portions actually present
- yields REGISTER_BYTES. */
-#define SIZEOF_GREGS (NUM_GREGS * 4)
-#define SIZEOF_FPU_REGS (8 * 10)
-#define SIZEOF_FPU_CTRL_REGS (8 * 4)
-#define SIZEOF_SSE_REGS (8 * 16 + 4)
-
-
-/* Total amount of space needed to store our copies of the machine's register
- state, the array `registers'. */
-#ifdef HAVE_SSE_REGS
-#define REGISTER_BYTES \
- (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS)
-#else
-#ifdef HAVE_I387_REGS
-#define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS)
-#else
-#define REGISTER_BYTES (SIZEOF_GREGS)
-#endif
-#endif
-
-/* Return the offset into the register array of the start of register
- number REG. */
-#define REGISTER_BYTE(reg) i386_register_byte ((reg))
-extern int i386_register_byte (int reg);
-
-/* Return the number of bytes of storage in GDB's register array
- occupied by register REG. */
-#define REGISTER_RAW_SIZE(reg) i386_register_raw_size ((reg))
-extern int i386_register_raw_size (int reg);
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 16
-
-/* Return the size in bytes of the virtual type of register REG. */
-#define REGISTER_VIRTUAL_SIZE(reg) i386_register_virtual_size ((reg))
-extern int i386_register_virtual_size (int reg);
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define MAX_REGISTER_VIRTUAL_SIZE 16
-
-/* Return the GDB type object for the "standard" data type of data in
- register REGNUM. */
-
-#define REGISTER_VIRTUAL_TYPE(regnum) i386_register_virtual_type (regnum)
-extern struct type *i386_register_virtual_type (int regnum);
-
-/* Return true iff register REGNUM's virtual format is different from
- its raw format. */
-
-#define REGISTER_CONVERTIBLE(regnum) i386_register_convertible (regnum)
-extern int i386_register_convertible (int regnum);
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) \
- i386_register_convert_to_virtual ((regnum), (type), (from), (to))
-extern void i386_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to);
-
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. */
-
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) \
- i386_register_convert_to_raw ((type), (regnum), (from), (to))
-extern void i386_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to);
-
/* Print out the i387 floating point state. */
-#ifdef HAVE_I387_REGS
extern void i387_float_info (void);
#define FLOAT_INFO { i387_float_info (); }
-#endif
-\f
-
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
- i386_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR i386_push_arguments (int nargs, struct value **args,
- CORE_ADDR sp, int struct_return,
- CORE_ADDR struct_addr);
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(addr, sp) \
- i386_store_struct_return ((addr), (sp))
-extern void i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
-
-#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \
- i386_extract_return_value ((type), (regbuf), (valbuf))
-extern void i386_extract_return_value (struct type *type, char *regbuf,
- char *valbuf);
-
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
-
-#define STORE_RETURN_VALUE(type, valbuf) \
- i386_store_return_value ((type), (valbuf))
-extern void i386_store_return_value (struct type *type, char *valbuf);
-
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR. */
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \
- i386_extract_struct_value_address ((regbuf))
-extern CORE_ADDR i386_extract_struct_value_address (char *regbuf);
-
-/* The following redefines make backtracing through sigtramp work.
- They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
- from the sigcontext structure which is pushed by the kernel on the
- user stack, along with a pointer to it. */
-
-/* Return the chain-pointer for FRAME. In the case of the i386, the
- frame's nominal address is the address of a 4-byte word containing
- the calling frame's address. */
-
-#define FRAME_CHAIN(frame) i386_frame_chain ((frame))
-extern CORE_ADDR i386_frame_chain (struct frame_info *frame);
-
-/* Determine whether the function invocation represented by FRAME does
- not have a from on the stack associated with it. If it does not,
- return non-zero, otherwise return zero. */
-
-#define FRAMELESS_FUNCTION_INVOCATION(frame) \
- i386_frameless_function_invocation (frame)
-extern int i386_frameless_function_invocation (struct frame_info *frame);
-
-/* Return the saved program counter for FRAME. */
-
-#define FRAME_SAVED_PC(frame) i386_frame_saved_pc (frame)
-extern CORE_ADDR i386_frame_saved_pc (struct frame_info *frame);
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Return number of args passed to a frame. Can return -1, meaning no way
- to tell, which is typical now that the C compiler delays popping them. */
-
-#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
-
-extern int i386_frame_num_args (struct frame_info *);
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 8
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-extern void i386_frame_init_saved_regs (struct frame_info *);
-#define FRAME_INIT_SAVED_REGS(FI) i386_frame_init_saved_regs (FI)
-
-\f
-
-/* Things needed for making the inferior call functions. */
-
-/* "An argument's size is increased, if necessary, to make it a
- multiple of [32 bit] words. This may require tail padding,
- depending on the size of the argument" - from the x86 ABI. */
-#define PARM_BOUNDARY 32
-
-/* Push an empty stack frame, to record the current PC, etc. */
-
-#define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
-
-extern void i386_push_dummy_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-
-#define POP_FRAME { i386_pop_frame (); }
-
-extern void i386_pop_frame (void);
\f
-/* this is
- * call 11223344 (32 bit relative)
- * int3
- */
-
-#define CALL_DUMMY { 0x223344e8, 0xcc11 }
-
-#define CALL_DUMMY_LENGTH 8
-
-#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
-
-#define CALL_DUMMY_BREAKPOINT_OFFSET 5
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at DUMMYNAME. */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
- i386_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
-extern void i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
- int nargs, struct value **args,
- struct type *type, int gcc_p);
-
/* FIXME: kettenis/2000-06-12: These do not belong here. */
extern void print_387_control_word (unsigned int);
extern void print_387_status_word (unsigned int);
/* Include common definitions for GNU systems.
FIXME: This does not belong here since this is supposed to contain
only native-dependent information. */
-#include "nm-gnu.h"
+#include "config/nm-gnu.h"
/* Thread flavors used in re-setting the T bit.
FIXME: This is native-dependent. */
FIXME: This is probably native-dependent too. */
#define ATTACH_DETACH 1
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
/* We use stabs-in-ELF with the DWARF register numbering scheme. */
#define SIGCONTEXT_PC_OFFSET 68
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
#endif /* TM_I386GNU_H */
/* Macro definitions for Intel 386 running under LynxOS.
- Copyright 1993, 1995 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 2002 Free Software Foundation, Inc.
This file is part of GDB.
#ifndef TM_I386LYNX_H
#define TM_I386LYNX_H
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
/* Most definitions from sysv could be used. */
#include "i386/tm-i386.h"
-#undef SAVED_PC_AFTER_CALL
-
-#define SAVED_PC_AFTER_CALL i386lynx_saved_pc_after_call
-CORE_ADDR i386lynx_saved_pc_after_call ();
-
#endif /* TM_I386LYNX_H */
Boston, MA 02111-1307, USA. */
/* Include common definitions for Mach3 systems */
-#include "nm-m3.h"
+#include "config/nm-m3.h"
/* Define offsets to access CPROC stack when it does not have
* a kernel thread.
+++ /dev/null
-/* Macro definitions for i386 running NetWare.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-#ifndef TM_I386NW_H
-#define TM_I386NW_H 1
-
-#include "i386/tm-i386.h"
-
-/* Stop backtracing when we wander into main. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-
-/* Offsets (in target ints) into jmp_buf. Not defined in any system header
- file, so we have to step through setjmp/longjmp with a debugger and figure
- them out. */
-
-#define JB_ELEMENT_SIZE 4 /* jmp_buf[] is array of ints */
-
-#define JB_PC 6 /* Setjmp()'s return PC saved here */
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-#endif /* ifndef TM_I386NW_H */
/* Pick up more stuff from the generic SYSV and SVR4 host include files. */
#include "i386/tm-i386v.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
#define KERNEL_U_SIZE kernel_u_size()
#ifndef TM_I386SOL2_H
#define TM_I386SOL2_H 1
-#define HAVE_I387_REGS
#include "i386/tm-i386v4.h"
-/* We use stabs-in-ELF with the DWARF register numbering scheme. */
-
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
/* If the current gcc for for this target does not produce correct
debugging information for float parameters, both prototyped and
unprototyped, then define this macro. This forces gdb to always
#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
-/* Signal handler frames under Solaris 2 are recognized by a return address
- of 0xFFFFFFFF, the third parameter on the signal handler stack is
- a pointer to an ucontext. */
-#undef sigtramp_saved_pc
-#undef I386V4_SIGTRAMP_SAVED_PC
-#define SIGCONTEXT_PC_OFFSET (36 + 14 * 4)
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) (pc == 0xFFFFFFFF)
-
/* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
and for SunPRO 3.0, N_FUN symbols too. */
#define SOFUN_ADDRESS_MAYBE_MISSING
/* Pick up more stuff from the generic SVR4 host include file. */
-#include "tm-sysv4.h"
-
-/* Use the alternate method of determining valid frame chains. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-/* Offsets (in target ints) into jmp_buf. Not defined in any system header
- file, so we have to step through setjmp/longjmp with a debugger and figure
- them out. Note that <setjmp> defines _JBLEN as 10, which is the default
- if no specific machine is selected, even though we only use 6 slots. */
-
-#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
-
-#define JB_EBX 0
-#define JB_ESI 1
-#define JB_EDI 2
-#define JB_EBP 3
-#define JB_ESP 4
-#define JB_EDX 5
-
-#define JB_PC JB_EDX /* Setjmp()'s return PC saved in EDX */
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-/* The following redefines make backtracing through sigtramp work.
- They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
- from the ucontext structure which is pushed by the kernel on the
- user stack. Unfortunately there are three variants of sigtramp handlers. */
-
-#define I386V4_SIGTRAMP_SAVED_PC
-#define IN_SIGTRAMP(pc, name) ((name) \
- && (STREQ ("_sigreturn", name) \
- || STREQ ("_sigacthandler", name) \
- || STREQ ("sigvechandler", name)))
-
-/* Saved Pc. Get it from ucontext if within sigtramp. */
-
-#define sigtramp_saved_pc i386v4_sigtramp_saved_pc
-extern CORE_ADDR i386v4_sigtramp_saved_pc (struct frame_info *);
+#include "config/tm-sysv4.h"
#endif /* ifndef TM_I386V4_H */
#define TM_LINUX_H
#define I386_GNULINUX_TARGET
-#define HAVE_I387_REGS
#ifdef HAVE_PTRACE_GETFPXREGS
#define FILL_FPXREGSET
#define HAVE_SSE_REGS
#endif
#include "i386/tm-i386.h"
-#include "tm-linux.h"
-
-/* Register number for the "orig_eax" pseudo-register. If this
- pseudo-register contains a value >= 0 it is interpreted as the
- system call number that the kernel is supposed to restart. */
-#define I386_LINUX_ORIG_EAX_REGNUM (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS)
-
-/* Adjust a few macros to deal with this extra register. */
-
-#undef NUM_REGS
-#define NUM_REGS (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS + 1)
-
-#undef MAX_NUM_REGS
-#define MAX_NUM_REGS (16 + 16 + 9 + 1)
-
-#undef REGISTER_BYTES
-#define REGISTER_BYTES \
- (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS + 4)
-
-#undef REGISTER_NAME
-#define REGISTER_NAME(reg) i386_linux_register_name ((reg))
-extern char *i386_linux_register_name (int reg);
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(reg) i386_linux_register_byte ((reg))
-extern int i386_linux_register_byte (int reg);
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(reg) i386_linux_register_raw_size ((reg))
-extern int i386_linux_register_raw_size (int reg);
-
-/* GNU/Linux ELF uses stabs-in-ELF with the DWARF register numbering
- scheme by default, so we must redefine STAB_REG_TO_REGNUM. This
- messes up the floating-point registers for a.out, but there is not
- much we can do about that. */
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* Use target_specific function to define link map offsets. */
-extern struct link_map_offsets *i386_linux_svr4_fetch_link_map_offsets (void);
-#define SVR4_FETCH_LINK_MAP_OFFSETS() i386_linux_svr4_fetch_link_map_offsets ()
+#include "config/tm-linux.h"
/* The following works around a problem with /usr/include/sys/procfs.h */
#define sys_quotactl 1
-/* When the i386 Linux kernel calls a signal handler, the return
- address points to a bit of code on the stack. These definitions
- are used to identify this bit of code as a signal trampoline in
- order to support backtracing through calls to signal handlers. */
-
-#define IN_SIGTRAMP(pc, name) i386_linux_in_sigtramp (pc, name)
-extern int i386_linux_in_sigtramp (CORE_ADDR, char *);
-
-#undef FRAME_CHAIN
-#define FRAME_CHAIN(frame) i386_linux_frame_chain (frame)
-extern CORE_ADDR i386_linux_frame_chain (struct frame_info *frame);
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386_linux_frame_saved_pc (frame)
-extern CORE_ADDR i386_linux_frame_saved_pc (struct frame_info *frame);
-
-#undef SAVED_PC_AFTER_CALL
-#define SAVED_PC_AFTER_CALL(frame) i386_linux_saved_pc_after_call (frame)
-extern CORE_ADDR i386_linux_saved_pc_after_call (struct frame_info *);
-
-#define TARGET_WRITE_PC(pc, ptid) i386_linux_write_pc (pc, ptid)
-extern void i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid);
-
/* When we call a function in a shared library, and the PLT sends us
into the dynamic linker to find the function's real address, we
need to skip over the dynamic linker call. This function decides
/* N_FUN symbols in shared libaries have 0 for their values and need
to be relocated. */
#define SOFUN_ADDRESS_MAYBE_MISSING
-\f
-
-/* Support for longjmp. */
-
-/* Details about jmp_buf. It's supposed to be an array of integers. */
-
-#define JB_ELEMENT_SIZE 4 /* Size of elements in jmp_buf. */
-#define JB_PC 5 /* Array index of saved PC. */
-
-/* Figure out where the longjmp will land. Slurp the args out of the
- stack. We expect the first arg to be a pointer to the jmp_buf
- structure from which we extract the pc (JB_PC) that we will land
- at. The pc is copied into ADDR. This routine returns true on
- success. */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
#endif /* #ifndef TM_LINUX_H */
#ifndef TM_NBSD_H
#define TM_NBSD_H
-#define HAVE_I387_REGS
#define HAVE_SSE_REGS
#include "i386/tm-i386.h"
-#define JB_ELEMENT_SIZE sizeof(int) /* jmp_buf[_JBLEN] is array of ints */
-#define JB_PC 0 /* Setjmp()'s return PC saved here */
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-\f
-/* Support for signal handlers. */
-
-#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
-extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
-
/* These defines allow the recognition of sigtramps as a function name
<sigtramp>.
- FIXME: kettenis/2001-07-13: These should be added to the target
- vector and turned into functions when we go "multi-arch". */
-
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
-extern CORE_ADDR i386bsd_sigtramp_start;
-extern CORE_ADDR i386bsd_sigtramp_end;
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers. */
+ FIXME: kettenis/2002-05-12: Of course these defines will have to go
+ if we go truly "multi-arch", but I don't know yet how to get rid of
+ them. */
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
-extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
+#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
+#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
+extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
+extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
#endif /* TM_NBSD_H */
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
(name && !strcmp(name, "_DYNAMIC"))
-extern use_struct_convention_fn i386nbsd_aout_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
- i386nbsd_aout_use_struct_convention(gcc_p, type)
-
#endif /* TM_NBSDAOUT_H */
#ifndef TM_OBSD_H
#define TM_OBSD_H
-#define HAVE_I387_REGS
#include "i386/tm-i386.h"
/* OpenBSD uses the old gcc convention for struct returns. */
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
/*
#define SEQUENT_PTX4
-#include "tm-ptx.h"
+#include "i386/tm-ptx.h"
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
/* The following redefines make backtracing through sigtramp work.
#define TM_VXWORKS_H
#include "i386/tm-i386v.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
#endif /* ifndef TM_VXWORKS_H */
# Target: AMD x86-64 running GNU/Linux
-TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o i387-tdep.o dwarf2cfi.o \
+TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o dwarf2cfi.o \
solib.o solib-svr4.o solib-legacy.o
/* Pick up more stuff from the generic SVR4 host include file. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
Boston, MA 02111-1307, USA. */
/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
#ifdef _SEQUENT_PTX4_
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
#endif /* _SEQUENT_PTX4_ */
/* This machine doesn't have the siginterrupt call. */
/* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
-#include "xm-ptx.h"
+#include "i386/xm-ptx.h"
On the i960 we just take as many bytes as we need from G0 through G3. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
/* If USE_STRUCT_CONVENTION produces a 1,
(..., 0) below is to make it appear to return a value, though
actually all it does is call error(). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(error("Don't know where large structure is returned on i960"), 0)
/* Write into appropriate registers a function return value
Boston, MA 02111-1307, USA. */
#include "i960/tm-i960.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
/* Under VxWorks the IP isn't filled in. Skip it, go with RIP, which has
the real value. */
#ifndef NM_AIX_H
#define NM_AIX_H
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#ifndef AIX5
#define AIX5 1
#ifndef NM_LINUX_H
#define NM_LINUX_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* Note: It seems likely that we'll have to eventually define
FETCH_INFERIOR_REGISTERS. But until that time, we'll make do
#define TM_AIX_H
#include "ia64/tm-ia64.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
#define TARGET_ELF64
#define IA64_GNULINUX_TARGET
#include "ia64/tm-ia64.h"
-#include "tm-linux.h"
+#include "config/tm-linux.h"
#define TARGET_ELF64
/* Pick up more stuff from the generic SVR4 host include file. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
#endif /* #ifndef XM_AIX_H */
/* mvs_check FRAME_SAVED_PC */
#define FRAME_SAVED_PC(fi) m32r_frame_saved_pc (fi)
-/* mvs_check EXTRACT_RETURN_VALUE */
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+/* mvs_check DEPRECATED_EXTRACT_RETURN_VALUE */
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
memcpy ((VALBUF), \
(char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \
((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \
extern use_struct_convention_fn m32r_use_struct_convention;
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
REGISTER_RAW_SIZE (V0_REGNUM))
#ifndef NM_LINUX_H
#define NM_LINUX_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* Return sizeof user struct to callers in less machine dependent routines */
#ifndef NM_M68KLYNX_H
#define NM_M68KLYNX_H
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
#endif /* NM_M68KLYNX_H */
/* Include the generic SVR4 definitions. */
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
/* When it returns a float/double value, use fp0 in sysV68. */
/* When it returns a pointer value, use a0 in sysV68. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
®BUF[REGISTER_BYTE (FP0_REGNUM)], \
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#undef EXTRACT_STRUCT_VALUE_ADDRESS
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
+#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
(*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
function return value of type TYPE, and copy that, in virtual
format, into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
} \
}
-#include "tm-linux.h"
+#include "config/tm-linux.h"
#include "m68k/tm-m68k.h"
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#undef EXTRACT_STRUCT_VALUE_ADDRESS
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(*(CORE_ADDR *)((char *) (REGBUF) + REGISTER_BYTE (A0_REGNUM)))
/* Offsets (in target ints) into jmp_buf. */
into VALBUF. This is assuming that floating point values are returned
as doubles in d0/d1. */
-#if !defined (EXTRACT_RETURN_VALUE)
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy ((VALBUF), \
(char *)(REGBUF) + \
(TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
\f
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
#ifndef TM_M68KLYNX_H
#define TM_M68KLYNX_H
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
/* If PC-2 contains this instruction, then we know what we are in a system
call stub, and the return PC is is at SP+4, instead of SP. */
#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
#include "m68k/tm-m68k.h"
/* Offsets (in target ints) into jmp_buf. Not defined in any system header
Boston, MA 02111-1307, USA. */
#include "m68k/tm-sun2.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
Boston, MA 02111-1307, USA. */
#include "m68k/tm-sun3.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
#define DECR_PC_AFTER_BREAK 0
#include "m68k/tm-m68k.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
/* Takes the current frame-struct pointer and returns the chain-pointer
to get to the calling frame.
/* Pick up more stuff from the generic SVR4 host include file. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
Boston, MA 02111-1307, USA. */
/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
Boston, MA 02111-1307, USA. */
#include "m88k/nm-m88k.h"
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#define DELTA88
#include "m88k/tm-m88k.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
/* If we don't define this, backtraces go on forever. */
#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
/* The 88k call/return conventions call for "small" values to be returned
into consecutive registers starting from r2. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
#define STORE_RETURN_VALUE(TYPE, VALBUF) mcore_store_return_value ((TYPE), (VALBUF))
extern void mcore_extract_return_value (struct type *type, char *regbut, char *valbuf);
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
mcore_extract_return_value ((TYPE), (REGBUF), (VALBUF));
#define STORE_STRUCT_RETURN(ADDR, SP) /* handled by mcore_push_arguments */
extern CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
mcore_extract_struct_value_address (REGBUF)
extern CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
#undef IN_SOLIB_DYNSYM_RESOLVE_CODE
#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define MIPS_GNULINUX_TARGET
-#include "nm-linux.h"
+#include "config/nm-linux.h"
/* Return sizeof user struct to callers in less machine dependent
routines. Hard coded for cross-compilation friendliness. */
: ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
: builtin_type_int)
-#undef MIPS_LAST_ARG_REGNUM
-#define MIPS_LAST_ARG_REGNUM 11 /* N32 uses R4 through R11 for args */
-
-/* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
- up on the stack? For the n32 ABI, eight bytes are reserved for each
- register. Like MIPS_SAVED_REGSIZE but different. */
-#define MIPS_DEFAULT_STACK_ARGSIZE 8
-
-/* N32 does not reserve home space for registers used to carry
- parameters. */
-#define MIPS_REGS_HAVE_HOME_P 0
-
/* Force N32 ABI as the default. */
#define MIPS_DEFAULT_ABI MIPS_ABI_N32
: ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
: builtin_type_int)
-#undef MIPS_LAST_ARG_REGNUM
-#define MIPS_LAST_ARG_REGNUM 11 /* N32 uses R4 through R11 for args */
-
-/* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
- up on the stack? For the n32 ABI, eight bytes are reserved for each
- register. Like MIPS_SAVED_REGSIZE but different. */
-#define MIPS_DEFAULT_STACK_ARGSIZE 8
-
-/* N32 does not reserve home space for registers used to carry
- parameters. */
-#define MIPS_REGS_HAVE_HOME_P 0
-
/* Force N32 ABI as the default. */
#define MIPS_DEFAULT_ABI MIPS_ABI_N32
#define REALTIME_LO 32
#define REALTIME_HI 128
-#include "tm-linux.h"
+#include "config/tm-linux.h"
/* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
fact, using it may violate the o32 ABI. */
#include "coff/sym.h" /* Needed for PDR below. */
#include "coff/symconst.h"
-#if !defined (MIPS_EABI)
-#define MIPS_EABI 0
-#endif
-
/* PC should be masked to remove possible MIPS16 flag */
#if !defined (GDB_TARGET_MASK_DISAS_PC)
#define GDB_TARGET_MASK_DISAS_PC(addr) UNMAKE_MIPS16_ADDR(addr)
/* Given the register index, return the name of the corresponding
register. */
-extern char *mips_register_name (int regnr);
+extern const char *mips_register_name (int regnr);
#define REGISTER_NAME(i) mips_register_name (i)
/* Initializer for an array of names of registers.
#define ZERO_REGNUM 0 /* read-only register, always 0 */
#define V0_REGNUM 2 /* Function integer return value */
#define A0_REGNUM 4 /* Loc of first arg during a subr call */
-#if MIPS_EABI
-#define MIPS_LAST_ARG_REGNUM 11 /* EABI uses R4 through R11 for args */
-#else
-#define MIPS_LAST_ARG_REGNUM 7 /* old ABI uses R4 through R7 for args */
-#endif
#define T9_REGNUM 25 /* Contains address of callee in PIC */
#define SP_REGNUM 29 /* Contains address of top of stack */
#define RA_REGNUM 31 /* Contains return address value */
#define PC_REGNUM 37 /* Contains program counter */
#define FP0_REGNUM 38 /* Floating point register 0 (single float) */
#define FPA0_REGNUM (FP0_REGNUM+12) /* First float argument register */
-#if MIPS_EABI /* EABI uses F12 through F19 for args */
-#define MIPS_LAST_FP_ARG_REGNUM (FP0_REGNUM+19)
-#else /* old ABI uses F12 through F15 for args */
-#define MIPS_LAST_FP_ARG_REGNUM (FP0_REGNUM+15)
-#endif
#define FCRCS_REGNUM 70 /* FP control/status */
#define FCRIR_REGNUM 71 /* FP implementation/revision */
#define FP_REGNUM 72 /* Pseudo register that contains true address of executing stack frame */
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. XXX floats */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
mips_extract_return_value(TYPE, REGBUF, VALBUF)
extern void mips_extract_return_value (struct type *, char[], char *);
convention is specified by the System V ABI, so I think we can rely
on it. */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
REGISTER_RAW_SIZE (V0_REGNUM)))
#define OP_LDGPR 067 /* ld */
/* Get the basic MIPS definitions. */
-#include "tm-mips.h"
+#include "mips/tm-mips.h"
*/
/* Include common definitions for Mach3 systems */
-#include "nm-m3.h"
+#include "config/nm-m3.h"
/* Define offsets to access CPROC stack when it does not have
* a kernel thread.
Boston, MA 02111-1307, USA. */
#include "mips/tm-bigmips.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
/* The signal handler trampoline is called _sigtramp. */
#undef IN_SIGTRAMP
Boston, MA 02111-1307, USA. */
#include "mips/tm-mips.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
/* FIXME: These are almost certainly wrong. */
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
/* Override register locations in upage for SGI machines */
#undef REGISTER_U_ADDR
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
{ \
if (TYPE_LENGTH (TYPE) > 8) \
internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
} \
}
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
extract_address (REGBUF + REGISTER_BYTE (4), \
REGISTER_RAW_SIZE (4))
Boston, MA 02111-1307, USA. */
/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "nm-m3.h"
+#include "config/nm-m3.h"
#define U_REGS_OFFSET 0
#define KERNEL_U_ADDR 0
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
hppa_extract_return_value (TYPE, REGBUF, VALBUF);
/* elz: decide whether the function returning a value of type type
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(*(int *)((REGBUF) + REGISTER_BYTE (28)))
/* elz: Return a large value, which is stored on the stack at addr.
- This is defined only for the hppa, at this moment.
- The above macro EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
- because it assumes that on exit from a called function which returns
- a large structure on the stack, the address of the ret structure is
- still in register 28. Unfortunately this register is usually overwritten
- by the called function itself, on hppa. This is specified in the calling
- convention doc. As far as I know, the only way to get the return value
- is to have the caller tell us where it told the callee to put it, rather
- than have the callee tell us.
- */
+ This is defined only for the hppa, at this moment. The above macro
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
+ because it assumes that on exit from a called function which
+ returns a large structure on the stack, the address of the ret
+ structure is still in register 28. Unfortunately this register is
+ usually overwritten by the called function itself, on hppa. This is
+ specified in the calling convention doc. As far as I know, the only
+ way to get the return value is to have the caller tell us where it
+ told the callee to put it, rather than have the callee tell us. */
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
#undef REG_STRUCT_HAS_ADDR
-#undef EXTRACT_RETURN_VALUE
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
/* RM: floats are returned in FR4R, doubles in FR4
* integral values are in r28, padded on the left
* aggregates less that 65 bits are in r28, right padded
* aggregates upto 128 bits are in r28 and r29, right padded
*/
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \
memcpy ((VALBUF), \
# Target: PowerPC running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-aix.h
# Target: Motorola PPC on Linux
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o solib.o \
+ solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
# Host: PowerPC, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o ppcnbsd-nat.o solib-legacy.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o ppcnbsd-nat.o
NAT_FILE= nm-nbsd.h
# Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o ppcnbsd-tdep.o nbsd-tdep.o ppc-linux-tdep.o corelow.o \
+TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o ppcnbsd-tdep.o nbsd-tdep.o corelow.o \
solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
#ifndef NM_LINUX_H
-#include "nm-linux.h"
+#include "config/nm-linux.h"
#define NM_LINUX_H
# Target: PowerPC running eabi
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
# Target: PowerPC running eabi and including the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppc-eabi.h
SIM_OBS = remote-sim.o
# Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
# Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-ppcle-eabi.h
SIM_OBS = remote-sim.o
#include "powerpc/tm-ppc-eabi.h"
/* Avoid warning from redefinition in tm-sysv4.h (included from tm-linux.h) */
#undef SKIP_TRAMPOLINE_CODE
-#include "tm-linux.h"
+#include "config/tm-linux.h"
/* We can single step on linux */
#undef SOFTWARE_SINGLE_STEP
#define TM_VXWORKS_H
#include "powerpc/tm-ppc-eabi.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
#endif /* ifndef TM_VXWORKS_H */
# Target: Powerpc running VxWorks
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-vxworks.h
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "xm-aix4.h"
+#include "config/xm-aix4.h"
/* This doesn't seem to be declared in any header file I can find. */
char *termdef (int, int);
+++ /dev/null
-# IBM RT/PC running BSD unix.
-# This file contributed at NYU, where we are using the RT to remote
-# debug an a29k running unix. No attempt, as of 7/16/91, has been made
-# to support debugging of RT executables.
-NATDEPFILES corelow.o core-aout.o infptrace.o inftarg.o fork-child.o
-MH_CFLAGS=-DHOSTING_ONLY # No debugging of RT executables
-XM_FILE= xm-rtbsd.h
-CC=gcc -traditional # hc/pcc just can't cut it.
+++ /dev/null
-/* Definitions to host GDB on an IBM RT/PC running BSD Unix.
- Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
- Contributed by David Wood @ New York University (wood@lab.ultra.nyu.edu).
-
- This file is part of GDB.
-
- 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. */
-
-/* This OS has the wait structure */
-#define HAVE_WAIT_STRUCT
-
-#ifdef HOSTING_ONLY
-/*
- * This next two defines are to get GDB up and running as a host to
- * do remote debugging. I know there is a gdb for the RT, but there wasn't
- * an xconfig/rt* file.
- */
-#define KERNEL_U_ADDR_BSD /* This may be correct, but hasn't been tested */
-#define REGISTER_U_ADDR(a,b,c) \
- (printf("GDB can not debug IBM RT/PC BSD executables (yet)\n"),\
- quit(),0)
-#else
-#include "GDB for the RT is not included in the distribution"
-#endif
# Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000-aix4.h
#ifndef NM_RS6000LYNX_H
#define NM_RS6000LYNX_H
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
#endif /* NM_RS6000LYNX_H */
# Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000.h
# Target: IBM RS6000 running LynxOS
-TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= coff-solib.o rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
TM_FILE= tm-rs6000ly.h
#ifndef TM_RS6000LYNX_H
#define TM_RS6000LYNX_H
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "xm-aix4.h"
+#include "config/xm-aix4.h"
/* AIX 4.x uses nonstandard "int *" as type of third argument to ptrace() */
Boston, MA 02111-1307, USA. */
/* Pull in GNU/Linux generic defs. */
-#include "tm-linux.h"
+#include "config/tm-linux.h"
/* Pull in sh-target defs */
#include "sh/tm-sh.h"
# Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
- solib.o solib-sunos.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o solib-sunos.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsdaout.h
-HOST_IPC=-DBSD_IPC
+++ /dev/null
-# Target: Sun 4 or Sparcstation, running NetBSD
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-nbsdaout.h
# Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
- solib.o solib-svr4.o solib-legacy.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
-HOST_IPC=-DBSD_IPC
+++ /dev/null
-# Target: Sun 4 or Sparcstation, running NetBSD
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-nbsd.h
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <nm-sysv4.h>
-#include "nm-linux.h"
+#include "config/nm-sysv4.h"
+#include "config/nm-linux.h"
#include "solib.h"
#define FETCH_INFERIOR_REGISTERS
/* Native-dependent definitions for Sparc running NetBSD, for GDB.
- Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000
+ Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002
Free Software Foundation, Inc.
This file is part of GDB.
#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
-/* Make things match up with what is expected in sparc-nat.c. */
-
-#define regs trapframe
-#define fp_status fpstate
-
-#define r_g1 tf_global[1]
-#define r_ps tf_psr
-#define r_pc tf_pc
-#define r_npc tf_npc
-#define r_y tf_y
-
-#define fpu fpstate
-#define fpu_regs fs_regs
-#define fpu_fsr fs_fsr
-#define fpu_fr fs_regs
-#define Fpu_fsr fs_fsr
-#define FPU_FSR_TYPE int
-
-#define PTRACE_GETREGS PT_GETREGS
-#define PTRACE_GETFPREGS PT_GETFPREGS
-#define PTRACE_SETREGS PT_SETREGS
-#define PTRACE_SETFPREGS PT_SETFPREGS
-
-#define GDB_GREGSET_T struct reg
-#define GDB_FPREGSET_T struct fpreg
-
#endif /* NM_NBSD_H */
#ifndef NM_SPARCLYNX_H
#define NM_SPARCLYNX_H
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
#endif /* NM_SPARCLYNX_H */
/* Include the generic SVR4 definitions. */
-#include <nm-sysv4.h>
+#include "config/nm-sysv4.h"
/* Before storing, we need to read all the registers. */
#define SIGCONTEXT_PC_OFFSET 12
-#include "tm-linux.h"
+#include "config/tm-linux.h"
#endif /* TM_SPARCLINUX_H */
/* Macro definitions for Sparc running under NetBSD.
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 2002 Free Software Foundation, Inc.
This file is part of GDB.
#ifndef TM_NBSD_H
#define TM_NBSD_H
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+
#include "sparc/tm-sparc.h"
+#include "solib.h"
#endif /* TM_NBSD_H */
+++ /dev/null
-/* Macro definitions for Sparc running under NetBSD.
- Copyright 1994, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-#ifndef TM_NBSDAOUT_H
-#define TM_NBSDAOUT_H
-
-#include "sparc/tm-nbsd.h"
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
- (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* TM_NBSDAOUT_H */
#define TARGET_READ_FP() (sparc64_read_fp ())
#define TARGET_WRITE_SP(X) (sparc64_write_sp (X))
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
sp64_extract_return_value(TYPE, REGBUF, VALBUF, 0)
extern void sp64_extract_return_value (struct type *, char[], char *, int);
#define GDB_PTRACE_REGS64
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
#endif TM_SPARC_LIN64_H
but it's a good start. */
#include "sparc/tm-sp64.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
comment in <machine/setjmp.h>! */
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
sparc_extract_struct_value_address (REGBUF)
extern CORE_ADDR sparc_extract_struct_value_address (char *);
function return value of type TYPE, and copy that, in virtual
format, into VALBUF. */
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
sparc32_extract_return_value (TYPE, REGBUF, VALBUF)
extern void sparc32_extract_return_value (struct type *, char[], char *);
/* sparclet register numbers */
#define CCSR_REGNUM 72
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
{ \
memcpy ((VALBUF), \
(char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \
#ifndef TM_SPARCLYNX_H
#define TM_SPARCLYNX_H
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
/* Use generic Sparc definitions. */
#include "sparc/tm-sparc.h"
Boston, MA 02111-1307, USA. */
#include "sparc/tm-sparc.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
/* Redefine SKIP_TRAMPOLINE_CODE to handle PIC compiled modules
in main executables. */
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
#include "sparc/tm-sparc.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
/* With Sol2 it is no longer necessary to enable software single-step,
since the /proc interface can take care of it for us in hardware. */
Boston, MA 02111-1307, USA. */
#include "sparc/tm-spc-em.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
/* FIXME: These are almost certainly wrong. */
+++ /dev/null
-/* Parameters for execution on a Sparc running NetBSD, for GDB.
- Copyright 1994 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- 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. */
-
-/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
/* Pick up more stuff from the generic SVR4 host include file. */
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
/* These are not currently used in SVR4 (but should be, FIXME!). */
#undef DO_DEFERRED_STORES
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
link.h is available on all linux platforms. For I386 and SH3/4,
as doubles in d0/d1. */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE));
/* Write into appropriate registers a function return value
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
\f
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
gdb_host=fbsd ;;
sparc64-*-linux*) gdb_host=linux ;;
+sparc64-*-netbsd*) gdb_host=nbsd64 ;;
sparcv9-*-* | sparc64-*-*) gdb_host=sun4sol2 ;;
strongarm-*-*) gdb_host=arm ;;
sparc-*-elf*) gdb_target=sparc-em ;;
sparc-*-linux*) gdb_target=linux ;;
sparc-*-lynxos*) gdb_target=sparclynx ;;
-sparc-*-netbsdelf*) gdb_target=nbsdelf ;;
-sparc-*-netbsd*) gdb_target=nbsdaout ;;
+sparc-*-netbsd*) gdb_target=nbsd ;;
sparc-*-solaris2*) gdb_target=sun4sol2 ;;
sparc-*-sunos4*) gdb_target=sun4os4 ;;
sparc-*-sunos5*) gdb_target=sun4sol2 ;;
sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
gdb_target=fbsd ;;
sparc64-*-linux*) gdb_target=sp64linux ;;
+sparc64-*-netbsd*) gdb_target=nbsd64 ;;
sparcv9-*-* | sparc64-*-*) gdb_target=sp64 ;;
xstormy16-*-*) gdb_target=xstormy16 ;;
print_address (addr, info->stream);
}
-/* Read an integer from debugged memory, given address and number of bytes. */
+/* Argument / return result struct for use with
+ do_captured_read_memory_integer(). MEMADDR and LEN are filled in
+ by gdb_read_memory_integer(). RESULT is the contents that were
+ successfully read from MEMADDR of length LEN. */
struct captured_read_memory_integer_arguments
{
LONGEST result;
};
+/* Helper function for gdb_read_memory_integer(). DATA must be a
+ pointer to a captured_read_memory_integer_arguments struct.
+ Return 1 if successful. Note that the catch_errors() interface
+ will return 0 if an error occurred while reading memory. This
+ choice of return code is so that we can distinguish between
+ success and failure. */
+
static int
do_captured_read_memory_integer (void *data)
{
args->result = read_memory_integer (memaddr, len);
- return 0;
+ return 1;
}
+/* Read memory at MEMADDR of length LEN and put the contents in
+ RETURN_VALUE. Return 0 if MEMADDR couldn't be read and non-zero
+ if successful. */
+
int
safe_read_memory_integer (CORE_ADDR memaddr, int len, LONGEST *return_value)
{
status = catch_errors (do_captured_read_memory_integer, &args,
"", RETURN_MASK_ALL);
- if (!status)
+ if (status)
*return_value = args.result;
return status;
adjusts pcptr (if necessary) to point to the actual memory location where
the breakpoint should be inserted. */
-unsigned char *
+const unsigned char *
cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x38, 0xe9};
/* Return the name of register regno as a string. Return NULL for an invalid or
unimplemented register. */
-char *
+const char *
cris_register_name (int regno)
{
static char *cris_genreg_names[] =
set_gdbarch_push_arguments (gdbarch, cris_abi_original_push_arguments);
set_gdbarch_store_return_value (gdbarch,
cris_abi_original_store_return_value);
- set_gdbarch_extract_return_value
+ set_gdbarch_deprecated_extract_return_value
(gdbarch, cris_abi_original_extract_return_value);
set_gdbarch_reg_struct_has_addr
(gdbarch, cris_abi_original_reg_struct_has_addr);
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_push_arguments (gdbarch, cris_abi_v2_push_arguments);
set_gdbarch_store_return_value (gdbarch, cris_abi_v2_store_return_value);
- set_gdbarch_extract_return_value (gdbarch,
- cris_abi_v2_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value
+ (gdbarch, cris_abi_v2_extract_return_value);
set_gdbarch_reg_struct_has_addr (gdbarch,
cris_abi_v2_reg_struct_has_addr);
}
set_gdbarch_pop_frame (gdbarch, cris_pop_frame);
set_gdbarch_store_struct_return (gdbarch, cris_store_struct_return);
- set_gdbarch_extract_struct_value_address (gdbarch,
- cris_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address
+ (gdbarch, cris_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
set_gdbarch_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
#include "floatformat.h"
#include "gdb/sim-d10v.h"
+#include "sim-regno.h"
struct frame_extra_info
{
extern void _initialize_d10v_tdep (void);
+static CORE_ADDR d10v_read_sp (void);
+
+static CORE_ADDR d10v_read_fp (void);
+
static void d10v_eva_prepare_to_trace (void);
static void d10v_eva_get_trace_data (void);
TS2_A0_REGNUM = 35
};
-static char *
+static const char *
d10v_ts2_register_name (int reg_nr)
{
static char *register_names[] =
TS3_A0_REGNUM = 32
};
-static char *
+static const char *
d10v_ts3_register_name (int reg_nr)
{
static char *register_names[] =
static int
d10v_ts2_register_sim_regno (int nr)
{
+ if (legacy_register_sim_regno (nr) < 0)
+ return legacy_register_sim_regno (nr);
if (nr >= TS2_IMAP0_REGNUM
&& nr < TS2_IMAP0_REGNUM + NR_IMAP_REGS)
return nr - TS2_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
static int
d10v_ts3_register_sim_regno (int nr)
{
+ if (legacy_register_sim_regno (nr) < 0)
+ return legacy_register_sim_regno (nr);
if (nr >= TS3_IMAP0_REGNUM
&& nr < TS3_IMAP0_REGNUM + NR_IMAP_REGS)
return nr - TS3_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
{
if (reg_nr == PC_REGNUM)
return builtin_type_void_func_ptr;
+ if (reg_nr == _SP_REGNUM || reg_nr == _FP_REGNUM)
+ return builtin_type_void_data_ptr;
else if (reg_nr >= A0_REGNUM
&& reg_nr < (A0_REGNUM + NR_A_REGS))
return builtin_type_int64;
return d10v_make_daddr (addr);
}
+/* Don't do anything if we have an integer, this way users can type 'x
+ <addr>' w/o having gdb outsmart them. The internal gdb conversions
+ to the correct space are taken care of in the pointer_to_address
+ function. If we don't do this, 'x $fp' wouldn't work. */
static CORE_ADDR
d10v_integer_to_address (struct type *type, void *buf)
{
LONGEST val;
val = unpack_long (type, buf);
- if (TYPE_CODE (type) == TYPE_CODE_INT
- && TYPE_LENGTH (type) <= TYPE_LENGTH (builtin_type_void_data_ptr))
- /* Convert small integers that would would be directly copied into
- a pointer variable into an address pointing into data space. */
- return d10v_make_daddr (val & 0xffff);
- else
- /* The value is too large to fit in a pointer. Assume this was
- intentional and that the user in fact specified a raw address. */
- return val;
+ return val;
}
/* Store the address of the place in which to copy the structure the
static void
d10v_store_return_value (struct type *type, char *valbuf)
{
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- valbuf,
- TYPE_LENGTH (type));
+ char tmp = 0;
+ /* Only char return values need to be shifted right within R0. */
+ if (TYPE_LENGTH (type) == 1
+ && TYPE_CODE (type) == TYPE_CODE_INT)
+ {
+ write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+ &tmp, 1); /* zero the high byte */
+ write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
+ valbuf, 1); /* copy the low byte */
+ }
+ else
+ write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+ valbuf,
+ TYPE_LENGTH (type));
}
/* Extract from an array REGBUF containing the (raw) register state
fi->extra_info->size = -next_addr;
if (!(fp & 0xffff))
- fp = d10v_make_daddr (read_register (SP_REGNUM));
+ fp = d10v_read_sp ();
for (i = 0; i < NUM_REGS - 1; i++)
if (fi->saved_regs[i])
/* otherwise, it isn't being used, so we use the SP instead */
if (uses_frame)
fi->saved_regs[SP_REGNUM]
- = read_register (FP_REGNUM) + fi->extra_info->size;
+ = d10v_read_fp () + fi->extra_info->size;
else
{
fi->saved_regs[SP_REGNUM] = fp + fi->extra_info->size;
int i;
int regnum = ARG1_REGNUM;
struct stack_item *si = NULL;
+ long val;
+
+ /* If struct_return is true, then the struct return address will
+ consume one argument-passing register. No need to actually
+ write the value to the register -- that's done by
+ d10v_store_struct_return(). */
+
+ if (struct_return)
+ regnum++;
/* Fill in registers and arg lists */
for (i = 0; i < nargs; i++)
struct type *type = check_typedef (VALUE_TYPE (arg));
char *contents = VALUE_CONTENTS (arg);
int len = TYPE_LENGTH (type);
+ int aligned_regnum = (regnum + 1) & ~1;
+
/* printf ("push: type=%d len=%d\n", TYPE_CODE (type), len); */
+ if (len <= 2 && regnum <= ARGN_REGNUM)
+ /* fits in a single register, do not align */
+ {
+ val = extract_unsigned_integer (contents, len);
+ write_register (regnum++, val);
+ }
+ else if (len <= (ARGN_REGNUM - aligned_regnum + 1) * 2)
+ /* value fits in remaining registers, store keeping left
+ aligned */
{
- int aligned_regnum = (regnum + 1) & ~1;
- if (len <= 2 && regnum <= ARGN_REGNUM)
- /* fits in a single register, do not align */
+ int b;
+ regnum = aligned_regnum;
+ for (b = 0; b < (len & ~1); b += 2)
{
- long val = extract_unsigned_integer (contents, len);
+ val = extract_unsigned_integer (&contents[b], 2);
write_register (regnum++, val);
}
- else if (len <= (ARGN_REGNUM - aligned_regnum + 1) * 2)
- /* value fits in remaining registers, store keeping left
- aligned */
- {
- int b;
- regnum = aligned_regnum;
- for (b = 0; b < (len & ~1); b += 2)
- {
- long val = extract_unsigned_integer (&contents[b], 2);
- write_register (regnum++, val);
- }
- if (b < len)
- {
- long val = extract_unsigned_integer (&contents[b], 1);
- write_register (regnum++, (val << 8));
- }
- }
- else
+ if (b < len)
{
- /* arg will go onto stack */
- regnum = ARGN_REGNUM + 1;
- si = push_stack_item (si, contents, len);
+ val = extract_unsigned_integer (&contents[b], 1);
+ write_register (regnum++, (val << 8));
}
}
+ else
+ {
+ /* arg will go onto stack */
+ regnum = ARGN_REGNUM + 1;
+ si = push_stack_item (si, contents, len);
+ }
}
while (si)
char *valbuf)
{
int len;
- /* printf("RET: TYPE=%d len=%d r%d=0x%x\n", TYPE_CODE (type), TYPE_LENGTH (type), RET1_REGNUM - R0_REGNUM, (int) extract_unsigned_integer (regbuf + REGISTER_BYTE(RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM))); */
+#if 0
+ printf("RET: TYPE=%d len=%d r%d=0x%x\n", TYPE_CODE (type),
+ TYPE_LENGTH (type), RET1_REGNUM - R0_REGNUM,
+ (int) extract_unsigned_integer (regbuf + REGISTER_BYTE(RET1_REGNUM),
+ REGISTER_RAW_SIZE (RET1_REGNUM)));
+#endif
+ len = TYPE_LENGTH (type);
+ if (len == 1)
{
- len = TYPE_LENGTH (type);
- if (len == 1)
- {
- unsigned short c = extract_unsigned_integer (regbuf + REGISTER_BYTE (RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM));
- store_unsigned_integer (valbuf, 1, c);
- }
- else if ((len & 1) == 0)
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM), len);
- else
- {
- /* For return values of odd size, the first byte is in the
- least significant part of the first register. The
- remaining bytes in remaining registers. Interestingly,
- when such values are passed in, the last byte is in the
- most significant byte of that same register - wierd. */
- memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM) + 1, len);
- }
+ unsigned short c;
+
+ c = extract_unsigned_integer (regbuf + REGISTER_BYTE (RET1_REGNUM),
+ REGISTER_RAW_SIZE (RET1_REGNUM));
+ store_unsigned_integer (valbuf, 1, c);
+ }
+ else if ((len & 1) == 0)
+ memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM), len);
+ else
+ {
+ /* For return values of odd size, the first byte is in the
+ least significant part of the first register. The
+ remaining bytes in remaining registers. Interestingly,
+ when such values are passed in, the last byte is in the
+ most significant byte of that same register - wierd. */
+ memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM) + 1, len);
}
}
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, d10v_extract_return_value);
set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return);
set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention);
set_gdbarch_frame_init_saved_regs (gdbarch, d10v_frame_init_saved_regs);
unspecified_precision
};
+/* A generic, not quite boolean, enumeration. */
+enum auto_boolean
+{
+ AUTO_BOOLEAN_TRUE,
+ AUTO_BOOLEAN_FALSE,
+ AUTO_BOOLEAN_AUTO
+};
+
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
Each link in the chain records a function to call and an
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Symbols): Update documentation for `info source'
+ command.
+
+ * gdb.texinfo (Macros): Call the command `info macro', not
+ `show macro'.
+
+2002-06-09 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Coding): Add section ``Per-architecture module
+ data''.
+
+2002-06-09 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Releasing GDB): Fix typos in @itemize @bullet
+ lists.
+
+2002-06-08 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Releasing GDB): Revise the section ``Cut the
+ Branch''.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Add section
+ ``Converting an existing Target Architecture to Multi-arch''.
+
+2002-05-30 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Releasing GDB): Rename ``Obsoleting any code''
+ to ``Obsoleting code''. Revise.
+
2002-05-17 Jim Blandy <jimb@redhat.com>
* gdb.texinfo (C Preprocessor Macros): New chapter.
parse the result, @var{expression} need not be a valid expression; it
can be any string of tokens.
-@kindex show macro
+@kindex info macro
@cindex macro definition, showing
@cindex definition, showing a macro's
-@item show macro @var{macro}
+@item info macro @var{macro}
Show the definition of the macro named @var{macro}, and describe the
source location where that definition was established.
10 printf ("Hello, world!\n");
11 #undef N
12 printf ("We're so creative.\n");
-(gdb) show macro ADD
+(gdb) info macro ADD
Defined at /home/jimb/gdb/macros/play/sample.c:5
#define ADD(x) (M + x)
-(gdb) show macro Q
+(gdb) info macro Q
Defined at /home/jimb/gdb/macros/play/sample.h:1
included at /home/jimb/gdb/macros/play/sample.c:2
#define Q <
At line 10, the definition of the macro @code{N} at line 9 is in force:
@smallexample
-(gdb) show macro N
+(gdb) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:9
#define N 28
(gdb) macro expand N Q M
(gdb) next
Hello, world!
12 printf ("We're so creative.\n");
-(gdb) show macro N
+(gdb) info macro N
The symbol `N' has no definition as a C/C++ preprocessor macro
at /home/jimb/gdb/macros/play/sample.c:12
(gdb) next
We're so creative.
14 printf ("Goodbye, world!\n");
-(gdb) show macro N
+(gdb) info macro N
Defined at /home/jimb/gdb/macros/play/sample.c:13
#define N 1729
(gdb) macro expand N Q M
@kindex info source
@item info source
-Show the name of the current source file---that is, the source file for
-the function containing the current point of execution---and the language
-it was written in.
+Show information about the current source file---that is, the source file for
+the function containing the current point of execution:
+@itemize @bullet
+@item
+the name of the source file, and the directory containing it,
+@item
+the directory it was compiled in,
+@item
+its length, in lines,
+@item
+which programming language it is written in,
+@item
+whether the executable includes debugging information for that file, and
+if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and
+@item
+whether the debugging information includes information about
+preprocessor macros.
+@end itemize
+
@kindex info sources
@item info sources
@item GDB_OSABI_WINCE
Windows CE
+@findex GDB_OSABI_GO32
+@item GDB_OSABI_GO32
+DJGPP
+
+@findex GDB_OSABI_NETWARE
+@item GDB_OSABI_NETWARE
+Novell NetWare
+
@findex GDB_OSABI_ARM_EABI_V1
@item GDB_OSABI_ARM_EABI_V1
ARM Embedded ABI version 1
@file{config/tm-@var{os}.h}.
+@section Converting an existing Target Architecture to Multi-arch
+@cindex converting targets to multi-arch
+
+This section describes the current accepted best practice for converting
+an existing target architecture to the multi-arch framework.
+
+The process consists of generating, testing, posting and committing a
+sequence of patches. Each patch must contain a single change, for
+instance:
+
+@itemize @bullet
+
+@item
+Directly convert a group of functions into macros (the conversion does
+not change the behavior of any of the functions).
+
+@item
+Replace a non-multi-arch with a multi-arch mechanism (e.g.,
+@code{FRAME_INFO}).
+
+@item
+Enable multi-arch level one.
+
+@item
+Delete one or more files.
+
+@end itemize
+
+@noindent
+There isn't a size limit on a patch, however, a developer is strongly
+encouraged to keep the patch size down.
+
+Since each patch is well defined, and since each change has been tested
+and shows no regressions, the patches are considered @emph{fairly}
+obvious. Such patches, when submitted by developers listed in the
+@file{MAINTAINERS} file, do not need approval. Occasional steps in the
+process may be more complicated and less clear. The developer is
+expected to use their judgment and is encouraged to seek advice as
+needed.
+
+@subsection Preparation
+
+The first step is to establish control. Build (with @option{-Werror}
+enabled) and test the target so that there is a baseline against which
+the debugger can be compared.
+
+At no stage can the test results regress or @value{GDBN} stop compiling
+with @option{-Werror}.
+
+@subsection Add the multi-arch initialization code
+
+The objective of this step is to establish the basic multi-arch
+framework. It involves
+
+@itemize @bullet
+
+@item
+The addition of a @code{@var{arch}_gdbarch_init} function@footnote{The
+above is from the original example and uses K&R C. @value{GDBN}
+has since converted to ISO C but lets ignore that.} that creates
+the architecture:
+@smallexample
+static struct gdbarch *
+d10v_gdbarch_init (info, arches)
+ struct gdbarch_info info;
+ struct gdbarch_list *arches;
+@{
+ struct gdbarch *gdbarch;
+ /* there is only one d10v architecture */
+ if (arches != NULL)
+ return arches->gdbarch;
+ gdbarch = gdbarch_alloc (&info, NULL);
+ return gdbarch;
+@}
+@end smallexample
+@noindent
+@emph{}
+
+@item
+A per-architecture dump function to print any architecture specific
+information:
+@smallexample
+static void
+mips_dump_tdep (struct gdbarch *current_gdbarch,
+ struct ui_file *file)
+@{
+ @dots{} code to print architecture specific info @dots{}
+@}
+@end smallexample
+
+@item
+A change to @code{_initialize_@var{arch}_tdep} to register this new
+architecture:
+@smallexample
+void
+_initialize_mips_tdep (void)
+@{
+ gdbarch_register (bfd_arch_mips, mips_gdbarch_init,
+ mips_dump_tdep);
+@end smallexample
+
+@item
+Add the macro @code{GDB_MULTI_ARCH}, defined as 0 (zero), to the file@*
+@file{config/@var{arch}/tm-@var{arch}.h}.
+
+@end itemize
+
+@subsection Update multi-arch incompatible mechanisms
+
+Some mechanisms do not work with multi-arch. They include:
+
+@table @code
+@item EXTRA_FRAME_INFO
+Delete.
+@item FRAME_FIND_SAVED_REGS
+Replaced with @code{FRAME_INIT_SAVED_REGS}
+@end table
+
+@noindent
+At this stage you could also consider converting the macros into
+functions.
+
+@subsection Prepare for multi-arch level to one
+
+Temporally set @code{GDB_MULTI_ARCH} to @code{GDB_MULTI_ARCH_PARTIAL}
+and then build and start @value{GDBN} (the change should not be
+committed). @value{GDBN} may not build, and once built, it may die with
+an internal error listing the architecture methods that must be
+provided.
+
+Fix any build problems (patch(es)).
+
+Convert all the architecture methods listed, which are only macros, into
+functions (patch(es)).
+
+Update @code{@var{arch}_gdbarch_init} to set all the missing
+architecture methods and wrap the corresponding macros in @code{#if
+!GDB_MULTI_ARCH} (patch(es)).
+
+@subsection Set multi-arch level one
+
+Change the value of @code{GDB_MULTI_ARCH} to GDB_MULTI_ARCH_PARTIAL (a
+single patch).
+
+Any problems with throwing ``the switch'' should have been fixed
+already.
+
+@subsection Convert remaining macros
+
+Suggest converting macros into functions (and setting the corresponding
+architecture method) in small batches.
+
+@subsection Set multi-arch level to two
+
+This should go smoothly.
+
+@subsection Delete the TM file
+
+The @file{tm-@var{arch}.h} can be deleted. @file{@var{arch}.mt} and
+@file{configure.in} updated.
+
+
@node Target Vector Definition
@chapter Target Vector Definition
functions, since they might never return to your code (they
@samp{longjmp} instead).
+@section Per-architecture module data
+@cindex per-architecture module data
+@cindex multi-arch data
+@cindex data-pointer, per-architecture/per-module
+
+The multi-arch framework includes a mechanism for adding module specific
+per-architecture data-pointers to the @code{struct gdbarch} architecture
+object.
+
+A module registers one or more per-architecture data-pointers using the
+function @code{register_gdbarch_data}:
+
+@deftypefun struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *@var{init}, gdbarch_data_free_ftype *@var{free})
+
+The @var{init} function is used to obtain an initial value for a
+per-architecture data-pointer. The function is called, after the
+architecture has been created, when the data-pointer is still
+uninitialized (@code{NULL}) and its value has been requested via a call
+to @code{gdbarch_data}. A data-pointer can also be initialize
+explicitly using @code{set_gdbarch_data}.
+
+The @var{free} function is called when a data-pointer needs to be
+destroyed. This occurs when either the corresponding @code{struct
+gdbarch} object is being destroyed or when @code{set_gdbarch_data} is
+overriding a non-@code{NULL} data-pointer value.
+
+The function @code{register_gdbarch_data} returns a @code{struct
+gdbarch_data} that is used to identify the data-pointer that was added
+to the module.
+
+@end deftypefun
+
+A typical module has @code{init} and @code{free} functions of the form:
+
+@smallexample
+static struct gdbarch_data *nozel_handle;
+static void *
+nozel_init (struct gdbarch *gdbarch)
+@{
+ struct nozel *data = XMALLOC (struct nozel);
+ @dots{}
+ return data;
+@}
+@dots{}
+static void
+nozel_free (struct gdbarch *gdbarch, void *data)
+@{
+ xfree (data);
+@}
+@end smallexample
+
+Since uninitialized (@code{NULL}) data-pointers are initialized
+on-demand, an @code{init} function is free to call other modules that
+use data-pointers. Those modules data-pointers will be initialized as
+needed. Care should be taken to ensure that the @code{init} call graph
+does not contain cycles.
+
+The data-pointer is registered with the call:
+
+@smallexample
+void
+_initialize_nozel (void)
+@{
+ nozel_handle = register_gdbarch_data (nozel_init, nozel_free);
+@dots{}
+@end smallexample
+
+The per-architecture data-pointer is accessed using the function:
+
+@deftypefun void *gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{data_handle})
+Given the architecture @var{arch} and module data handle
+@var{data_handle} (returned by @code{register_gdbarch_data}, this
+function returns the current value of the per-architecture data-pointer.
+@end deftypefun
+
+The non-@code{NULL} data-pointer returned by @code{gdbarch_data} should
+be saved in a local variable and then used directly:
+
+@smallexample
+int
+nozel_total (struct gdbarch *gdbarch)
+@{
+ int total;
+ struct nozel *data = gdbarch_data (gdbarch, nozel_handle);
+ @dots{}
+ return total;
+@}
+@end smallexample
+
+It is also possible to directly initialize the data-pointer using:
+
+@deftypefun void set_gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *handle, void *@var{pointer})
+Update the data-pointer corresponding to @var{handle} with the value of
+@var{pointer}. If the previous data-pointer value is non-NULL, then it
+is freed using data-pointers @var{free} function.
+@end deftypefun
+
+This function is used by modules that require a mechanism for explicitly
+setting the per-architecture data-pointer during architecture creation:
+
+@smallexample
+/* Called during architecture creation. */
+extern void
+set_gdbarch_nozel (struct gdbarch *gdbarch,
+ int total)
+@{
+ struct nozel *data = XMALLOC (struct nozel);
+ @dots{}
+ set_gdbarch_data (gdbarch, nozel_handle, nozel);
+@}
+@end smallexample
+
+@smallexample
+/* Default, called when nozel not set by set_gdbarch_nozel(). */
+static void *
+nozel_init (struct gdbarch *gdbarch)
+@{
+ struct nozel *default_nozel = XMALLOC (struc nozel);
+ @dots{}
+ return default_nozel;
+@}
+@end smallexample
+
+@smallexample
+void
+_initialize_nozel (void)
+@{
+ nozel_handle = register_gdbarch_data (nozel_init, NULL);
+ @dots{}
+@end smallexample
+
+@noindent
+Note that an @code{init} function still needs to be registered. It is
+used to initialize the data-pointer when the architecture creation phase
+fail to set an initial value.
+
+
@section Wrapping Output Lines
@cindex line wrap in output
reason) support for a new host are considered acceptable.}
-@section Obsolete any code
+@section Obsoleting code
Before anything else, poke the other developers (and around the source
code) to see if there is anything that can be removed from @value{GDBN}
(an old target, an unused file).
Obsolete code is identified by adding an @code{OBSOLETE} prefix to every
-line. Doing this means that it is easy to identify obsolete code when
-grepping through the sources.
+line. Doing this means that it is easy to identify something that has
+been obsoleted when greping through the sources.
-The process has a number of steps and is intentionally slow --- this is
-to mainly ensure that people have had a reasonable chance to respond.
-Remember, everything on the internet takes a week.
+The process is done in stages --- this is mainly to ensure that the
+wider @value{GDBN} community has a reasonable opportunity to respond.
+Remember, everything on the Internet takes a week.
-@itemize @bullet
+@enumerate
@item
-announce the change on @email{gdb@@sources.redhat.com, GDB mailing list}
+Post the proposal on @email{gdb@@sources.redhat.com, the GDB mailing
+list} Creating a bug report to track the task's state, is also highly
+recommended.
@item
-wait a week or so
+Wait a week or so.
@item
-announce the change on @email{gdb-announce@@sources.redhat.com, GDB
-Announcement mailing list}
+Post the proposal on @email{gdb-announce@@sources.redhat.com, the GDB
+Announcement mailing list}.
@item
-wait a week or so
+Wait a week or so.
@item
-go through and edit all relevant files and lines (e.g., in
-@file{configure.tgt}) so that they are prefixed with the word
-@code{OBSOLETE}.
-@end itemize
+Go through and edit all relevant files and lines so that they are
+prefixed with the word @code{OBSOLETE}.
+@item
+Wait until the next GDB version, containing this obsolete code, has been
+released.
+@item
+Remove the obsolete code.
+@end enumerate
+
+@noindent
+@emph{Maintainer note: While removing old code is regrettable it is
+hopefully better for @value{GDBN}'s long term development. Firstly it
+helps the developers by removing code that is either no longer relevant
+or simply wrong. Secondly since it removes any history associated with
+the file (effectively clearing the slate) the developer has a much freer
+hand when it comes to fixing broken files.}
-@emph{Maintainer note: Removing old code, while regrettable, is a good
-thing. Firstly it helps the developers by removing code that is either
-no longer relevant or simply wrong. Secondly since it removes any
-history associated with the file (effectively clearing the slate) the
-developer has a much freer hand when it comes to fixing broken files.}
@section Before the Branch
The targets are listed in @file{gdb/MAINTAINERS}.
-@section Cut the branch
-
-@subheading The dirty work
+@section Cut the Branch
-I think something like the below was used:
+@subheading Create the branch
@smallexample
-$ d=`date -u +%Y-%m-%d`
-$ echo $d
-2002-01-24
-$ cvs -f -d /cvs/src rtag -D $d-gmt \
-gdb_5_1-$d-branchpoint insight+dejagnu
-$ cvs -f -d /cvs/src rtag -b -r gdb_V_V-$d-branchpoint \
-gdb_5_1-$d-branch insight+dejagnu
+$ u=5.1
+$ v=5.2
+$ V=`echo $v | sed 's/\./_/g'`
+$ D=`date -u +%Y-%m-%d`
+$ echo $u $V $D
+5.1 5_2 2002-03-03
+$ echo cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-D $D-gmt gdb_$V-$D-branchpoint insight+dejagnu
+cvs -f -d :ext:sources.redhat.com:/cvs/src rtag
+-D 2002-03-03-gmt gdb_5_2-2002-03-03-branchpoint insight+dejagnu
+$ ^echo ^^
+...
+$ echo cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-b -r gdb_$V-$D-branchpoint gdb_$V-branch insight+dejagnu
+cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-b -r gdb_5_2-2002-03-03-branchpoint gdb_5_2-branch insight+dejagnu
+$ ^echo ^^
+...
$
@end smallexample
@itemize @bullet
@item
-the @kbd{-D YYYY-MM-DD-gmt} forces the branch to an exact date/time.
+by using @kbd{-D YYYY-MM-DD-gmt} the branch is forced to an exact
+date/time.
+@item
+the trunk is first taged so that the branch point can easily be found
@item
-the trunk is first tagged so that the branch point can easily be found
+Insight (which includes GDB) and dejagnu are all tagged at the same time
@item
-Insight (which includes GDB) and dejagnu are tagged at the same time
+@file{version.in} gets bumped to avoid version number conflicts
+@item
+the reading of @file{.cvsrc} is disabled using @file{-f}
+@end itemize
+
+@subheading Update @file{version.in}
+
+@smallexample
+$ u=5.1
+$ v=5.2
+$ V=`echo $v | sed 's/\./_/g'`
+$ echo $u $v$V
+5.1 5_2
+$ cd /tmp
+$ echo cvs -f -d :ext:sources.redhat.com:/cvs/src co \
+-r gdb_$V-branch src/gdb/version.in
+cvs -f -d :ext:sources.redhat.com:/cvs/src co
+ -r gdb_5_2-branch src/gdb/version.in
+$ ^echo ^^
+U src/gdb/version.in
+$ cd src/gdb
+$ echo $u.90-0000-00-00-cvs > version.in
+$ cat version.in
+5.1.90-0000-00-00-cvs
+$ cvs -f commit version.in
+@end smallexample
+
+@itemize @bullet
+@item
+@file{0000-00-00} is used as a date to pump prime the version.in update
+mechanism
+@item
+@file{.90} and the previous branch version are used as fairly arbitrary
+initial branch version number
@end itemize
-@subheading Post the branch info
@subheading Update the web and news pages
+Something?
+
@subheading Tweak cron to track the new branch
+The file @file{gdbadmin/cron/crontab} contains gdbadmin's cron table.
+This file needs to be updated so that:
+
+@itemize @bullet
+@item
+a daily timestamp is added to the file @file{version.in}
+@item
+the new branch is included in the snapshot process
+@end itemize
+
+@noindent
+See the file @file{gdbadmin/cron/README} for how to install the updated
+cron table.
+
+The file @file{gdbadmin/ss/README} should also be reviewed to reflect
+any changes. That file is copied to both the branch/ and current/
+snapshot directories.
+
+
+@subheading Update the NEWS and README files
+
+The @file{NEWS} file needs to be updated so that on the branch it refers
+to @emph{changes in the current release} while on the trunk it also
+refers to @emph{changes since the current release}.
+
+The @file{README} file needs to be updated so that it refers to the
+current release.
+
+@subheading Post the branch info
+
+Send an announcement to the mailing lists:
+
+@itemize @bullet
+@item
+@email{gdb-announce@@sources.redhat.com, GDB Announcement mailing list}
+@item
+@email{gdb@@sources.redhat.com, GDB Discsussion mailing list} and
+@email{gdb-testers@@sources.redhat.com, GDB Discsussion mailing list}
+@end itemize
+
+@emph{Pragmatics: The branch creation is sent to the announce list to
+ensure that people people not subscribed to the higher volume discussion
+list are alerted.}
+
+The announcement should include:
+
+@itemize @bullet
+@item
+the branch tag
+@item
+how to check out the branch using CVS
+@item
+the date/number of weeks until the release
+@item
+the branch commit policy
+still holds.
+@end itemize
+
@section Stabilize the branch
Something goes here.
static struct context *context_alloc ();
static struct frame_state *frame_state_alloc ();
+static void unwind_tmp_obstack_init ();
static void unwind_tmp_obstack_free ();
static void context_cpy (struct context *dst, struct context *src);
-static unsigned int read_1u (bfd *abfd, char **p);
-static int read_1s (bfd *abfd, char **p);
-static unsigned int read_2u (bfd *abfd, char **p);
-static int read_2s (bfd *abfd, char **p);
-static unsigned int read_4u (bfd *abfd, char **p);
-static int read_4s (bfd *abfd, char **p);
-static ULONGEST read_8u (bfd *abfd, char **p);
-static LONGEST read_8s (bfd *abfd, char **p);
-
-static ULONGEST read_uleb128 (bfd *abfd, char **p);
-static LONGEST read_sleb128 (bfd *abfd, char **p);
-static CORE_ADDR read_pointer (bfd *abfd, char **p);
-static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
+static unsigned int read_1u (bfd * abfd, char **p);
+static int read_1s (bfd * abfd, char **p);
+static unsigned int read_2u (bfd * abfd, char **p);
+static int read_2s (bfd * abfd, char **p);
+static unsigned int read_4u (bfd * abfd, char **p);
+static int read_4s (bfd * abfd, char **p);
+static ULONGEST read_8u (bfd * abfd, char **p);
+static LONGEST read_8s (bfd * abfd, char **p);
+
+static ULONGEST read_uleb128 (bfd * abfd, char **p);
+static LONGEST read_sleb128 (bfd * abfd, char **p);
+static CORE_ADDR read_pointer (bfd * abfd, char **p);
+static CORE_ADDR read_encoded_pointer (bfd * abfd, char **p,
unsigned char encoding);
-static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
-static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
+static LONGEST read_initial_length (bfd * abfd, char *buf, int *bytes_read);
+static ULONGEST read_length (bfd * abfd, char *buf, int *bytes_read,
int dwarf64);
static int is_cie (ULONGEST cie_id, int dwarf64);
static void get_reg (char *reg, struct context *context, int regnum);
static CORE_ADDR execute_stack_op (struct objfile *objfile,
char *op_ptr, char *op_end,
- struct context *context, CORE_ADDR initial);
+ struct context *context,
+ CORE_ADDR initial);
static void update_context (struct context *context, struct frame_state *fs,
int chain);
-
\f
+
/* Memory allocation functions. */
static struct fde_unit *
fde_unit_alloc (void)
fs = (struct frame_state *) obstack_alloc (&unwind_tmp_obstack,
sizeof (struct frame_state));
memset (fs, 0, sizeof (struct frame_state));
- fs->regs.reg = (struct frame_state_reg *) obstack_alloc (&unwind_tmp_obstack,
- regs_size);
+ fs->regs.reg =
+ (struct frame_state_reg *) obstack_alloc (&unwind_tmp_obstack, regs_size);
memset (fs->regs.reg, 0, regs_size);
return fs;
}
+static void
+unwind_tmp_obstack_init ()
+{
+ obstack_init (&unwind_tmp_obstack);
+}
+
static void
unwind_tmp_obstack_free ()
{
obstack_free (&unwind_tmp_obstack, NULL);
- obstack_init (&unwind_tmp_obstack);
+ unwind_tmp_obstack_init ();
}
static void
dreg = dst->reg;
*dst = *src;
dst->reg = dreg;
-
+
memcpy (dst->reg, src->reg, regs_size);
}
static unsigned int
-read_1u (bfd *abfd, char **p)
+read_1u (bfd * abfd, char **p)
{
unsigned ret;
- ret= bfd_get_8 (abfd, (bfd_byte *) *p);
- (*p) ++;
+ ret = bfd_get_8 (abfd, (bfd_byte *) * p);
+ (*p)++;
return ret;
}
static int
-read_1s (bfd *abfd, char **p)
+read_1s (bfd * abfd, char **p)
{
int ret;
- ret= bfd_get_signed_8 (abfd, (bfd_byte *) *p);
- (*p) ++;
+ ret = bfd_get_signed_8 (abfd, (bfd_byte *) * p);
+ (*p)++;
return ret;
}
static unsigned int
-read_2u (bfd *abfd, char **p)
+read_2u (bfd * abfd, char **p)
{
unsigned ret;
- ret= bfd_get_16 (abfd, (bfd_byte *) *p);
- (*p) ++;
+ ret = bfd_get_16 (abfd, (bfd_byte *) * p);
+ (*p)++;
return ret;
}
static int
-read_2s (bfd *abfd, char **p)
+read_2s (bfd * abfd, char **p)
{
int ret;
- ret= bfd_get_signed_16 (abfd, (bfd_byte *) *p);
+ ret = bfd_get_signed_16 (abfd, (bfd_byte *) * p);
(*p) += 2;
return ret;
}
static unsigned int
-read_4u (bfd *abfd, char **p)
+read_4u (bfd * abfd, char **p)
{
unsigned int ret;
- ret= bfd_get_32 (abfd, (bfd_byte *) *p);
+ ret = bfd_get_32 (abfd, (bfd_byte *) * p);
(*p) += 4;
return ret;
}
static int
-read_4s (bfd *abfd, char **p)
+read_4s (bfd * abfd, char **p)
{
int ret;
- ret= bfd_get_signed_32 (abfd, (bfd_byte *) *p);
+ ret = bfd_get_signed_32 (abfd, (bfd_byte *) * p);
(*p) += 4;
return ret;
}
static ULONGEST
-read_8u (bfd *abfd, char **p)
+read_8u (bfd * abfd, char **p)
{
ULONGEST ret;
- ret = bfd_get_64 (abfd, (bfd_byte *) *p);
+ ret = bfd_get_64 (abfd, (bfd_byte *) * p);
(*p) += 8;
return ret;
}
static LONGEST
-read_8s (bfd *abfd, char **p)
+read_8s (bfd * abfd, char **p)
{
LONGEST ret;
- ret = bfd_get_signed_64 (abfd, (bfd_byte *) *p);
+ ret = bfd_get_signed_64 (abfd, (bfd_byte *) * p);
(*p) += 8;
return ret;
}
static ULONGEST
-read_uleb128 (bfd *abfd, char **p)
+read_uleb128 (bfd * abfd, char **p)
{
ULONGEST ret;
int i, shift;
i = 0;
while (1)
{
- byte = bfd_get_8 (abfd, (bfd_byte *) *p);
- (*p) ++;
+ byte = bfd_get_8 (abfd, (bfd_byte *) * p);
+ (*p)++;
ret |= ((unsigned long) (byte & 127) << shift);
if ((byte & 128) == 0)
{
}
static LONGEST
-read_sleb128 (bfd *abfd, char **p)
+read_sleb128 (bfd * abfd, char **p)
{
LONGEST ret;
int i, shift, size, num_read;
i = 0;
while (1)
{
- byte = bfd_get_8 (abfd, (bfd_byte *) *p);
- (*p) ++;
+ byte = bfd_get_8 (abfd, (bfd_byte *) * p);
+ (*p)++;
ret |= ((long) (byte & 127) << shift);
shift += 7;
if ((byte & 128) == 0)
}
static CORE_ADDR
-read_pointer (bfd *abfd, char **p)
+read_pointer (bfd * abfd, char **p)
{
switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
{
}
static CORE_ADDR
-read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
+read_encoded_pointer (bfd * abfd, char **p, unsigned char encoding)
{
CORE_ADDR ret;
case DW_EH_PE_absptr:
break;
case DW_EH_PE_pcrel:
- ret += (CORE_ADDR) *p;
+ ret += (CORE_ADDR) * p;
break;
case DW_EH_PE_textrel:
case DW_EH_PE_datarel:
}
static void
-execute_cfa_program ( struct objfile *objfile, char *insn_ptr, char *insn_end,
- struct context *context, struct frame_state *fs)
+execute_cfa_program (struct objfile *objfile, char *insn_ptr, char *insn_end,
+ struct context *context, struct frame_state *fs)
{
struct frame_state_regs *unused_rs = NULL;
{
reg = insn & 0x3f;
uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = (long) uoffset * fs->data_align;
+ offset = (long) uoffset *fs->data_align;
fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset;
}
if (fde == NULL)
return;
-
+
fs->pc = fde->initial_location;
if (fde->cie_ptr)
- {
+ {
cie = fde->cie_ptr;
-
+
fs->code_align = cie->code_align;
fs->data_align = cie->data_align;
fs->retaddr_column = cie->ra;
cie->data + cie->data_length, context, fs);
execute_cfa_program (cie->objfile, fde->data,
fde->data + fde->data_length, context, fs);
- }
+ }
else
- internal_error (__FILE__, __LINE__,
- "%s(): Internal error: fde->cie_ptr==NULL !",
- __func__);
+ internal_error (__FILE__, __LINE__,
+ "%s(): Internal error: fde->cie_ptr==NULL !", __func__);
}
static void
REGISTER_RAW_SIZE (regnum));
break;
default:
- internal_error (__FILE__, __LINE__,
- "get_reg: unknown register rule");
+ internal_error (__FILE__, __LINE__, "get_reg: unknown register rule");
}
}
case DW_OP_ne:
result = (LONGEST) first != (LONGEST) second;
break;
- default: /* This label is here just to avoid warning. */
- break;
+ default: /* This label is here just to avoid warning. */
+ break;
}
}
break;
CORE_ADDR cfa;
long i;
+ unwind_tmp_obstack_init ();
+
orig_context = context_alloc ();
context_cpy (orig_context, context);
+
/* Compute this frame's CFA. */
switch (fs->cfa_how)
{
case CFA_EXP:
/* ??? No way of knowing what register number is the stack pointer
- to do the same sort of handling as above. Assume that if the
- CFA calculation is so complicated as to require a stack program
- that this will not be a problem. */
+ to do the same sort of handling as above. Assume that if the
+ CFA calculation is so complicated as to require a stack program
+ that this will not be a problem. */
{
char *exp = fs->cfa_exp;
ULONGEST len;
char *end = NULL;
int from_eh = 0;
- obstack_init (&unwind_tmp_obstack);
+ unwind_tmp_obstack_init ();
dwarf_frame_buffer = 0;
fde = fde_unit_alloc ();
fde_chunks.array[fde_chunks.elems++] = fde;
-
+
fde->initial_location = read_pointer (abfd, &start)
- + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ + ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile));
fde->address_range = read_pointer (abfd, &start);
cie = cie_chunks;
- while(cie)
- {
- if (cie->objfile == objfile)
+ while (cie)
{
- if (from_eh && (cie->offset == (unit_offset + bytes_read - cie_id)))
- break;
- if (!from_eh && (cie->offset == cie_id))
- break;
+ if (cie->objfile == objfile)
+ {
+ if (from_eh
+ && (cie->offset ==
+ (unit_offset + bytes_read - cie_id)))
+ break;
+ if (!from_eh && (cie->offset == cie_id))
+ break;
+ }
+
+ cie = cie->next;
}
- cie = cie->next;
- }
-
if (!cie)
error ("%s(): can't find CIE pointer", __func__);
fde->cie_ptr = cie;
if (cie->augmentation[0] == 'z')
- read_uleb128 (abfd, &start);
+ read_uleb128 (abfd, &start);
fde->data = start;
fde->data_length = block_end - start;
struct frame_state *fs;
CORE_ADDR cfa;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
update_context (context, fs, 0);
cfa = context->cfa;
+
unwind_tmp_obstack_free ();
+
return cfa;
}
struct context *context;
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
struct frame_state *fs;
CORE_ADDR cfa;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
context_cpy (context, UNWIND_CONTEXT (fi));
cfa = context->cfa;
unwind_tmp_obstack_free ();
-
+
return cfa;
}
{
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
fs = frame_state_alloc ();
fi->context = frame_obstack_alloc (sizeof (struct context));
UNWIND_CONTEXT (fi)->reg =
frame_state_for (UNWIND_CONTEXT (fi), fs);
update_context (UNWIND_CONTEXT (fi), fs, 0);
}
+
unwind_tmp_obstack_free ();
}
struct context *context;
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
struct type *, struct objfile *);
static void dwarf2_add_member_fn (struct field_info *,
- struct die_info *, struct type *,
- struct objfile *objfile,
+ struct die_info *, struct objfile *objfile,
const struct comp_unit_head *);
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
static void
dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
- struct type *type, struct objfile *objfile,
+ struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
struct attribute *attr;
if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC)
{
struct type *return_type = TYPE_TARGET_TYPE (die->type);
- struct type **arg_types;
int nparams = TYPE_NFIELDS (die->type);
- int iparams;
- /* Copy argument types from the subroutine type. */
- arg_types = (struct type **)
- TYPE_ALLOC (fnp->type, (nparams + 1) * sizeof (struct type *));
- for (iparams = 0; iparams < nparams; iparams++)
- arg_types[iparams] = TYPE_FIELD_TYPE (die->type, iparams);
-
- /* Set last entry in argument type vector. */
- if (TYPE_VARARGS (die->type))
- arg_types[nparams] = NULL;
- else
- arg_types[nparams] = dwarf2_fundamental_type (objfile, FT_VOID);
-
- smash_to_method_type (fnp->type, type, return_type, arg_types);
+ smash_to_method_type (fnp->type, die->type,
+ TYPE_TARGET_TYPE (die->type),
+ TYPE_FIELDS (die->type),
+ TYPE_NFIELDS (die->type),
+ TYPE_VARARGS (die->type));
/* Handle static member functions.
Dwarf2 has no clean way to discern C++ static and non-static
{
/* C++ member function. */
process_die (child_die, objfile, cu_header);
- dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header);
+ dwarf2_add_member_fn (&fi, child_die, objfile, cu_header);
}
else if (child_die->tag == DW_TAG_inheritance)
{
-/* Cache and manage the values of registers for GDB, the GNU debugger.
+/* Cache and manage frames for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
2001, 2002 Free Software Foundation, Inc.
#include "value.h"
#include "inferior.h" /* for inferior_ptid */
#include "regcache.h"
+#include "gdb_assert.h"
+
+/* Return a frame uniq ID that can be used to, later re-find the
+ frame. */
+
+void
+get_frame_id (struct frame_info *fi, struct frame_id *id)
+{
+ if (fi == NULL)
+ {
+ id->base = 0;
+ id->pc = 0;
+ }
+ else
+ {
+ id->base = FRAME_FP (fi);
+ id->pc = fi->pc;
+ }
+}
+
+struct frame_info *
+frame_find_by_id (struct frame_id id)
+{
+ struct frame_info *frame;
+
+ /* ZERO denotes the null frame, let the caller decide what to do
+ about it. Should it instead return get_current_frame()? */
+ if (id.base == 0 && id.pc == 0)
+ return NULL;
+
+ for (frame = get_current_frame ();
+ frame != NULL;
+ frame = get_prev_frame (frame))
+ {
+ if (INNER_THAN (FRAME_FP (frame), id.base))
+ /* ``inner/current < frame < id.base''. Keep looking along
+ the frame chain. */
+ continue;
+ if (INNER_THAN (id.base, FRAME_FP (frame)))
+ /* ``inner/current < id.base < frame''. Oops, gone past it.
+ Just give up. */
+ return NULL;
+ /* FIXME: cagney/2002-04-21: This isn't sufficient. It should
+ use id.pc to check that the two frames belong to the same
+ function. Otherwise we'll do things like match dummy frames
+ or mis-match frameless functions. However, until someone
+ notices, stick with the existing behavour. */
+ return frame;
+ }
+ return NULL;
+}
/* FIND_SAVED_REGISTER ()
return addr;
}
-/* DEFAULT_GET_SAVED_REGISTER ()
-
- Find register number REGNUM relative to FRAME and put its (raw,
- target format) contents in *RAW_BUFFER. Set *OPTIMIZED if the
- variable was optimized out (and thus can't be fetched). Set *LVAL
- to lval_memory, lval_register, or not_lval, depending on whether
- the value was fetched from memory, from a register, or in a strange
- and non-modifiable way (e.g. a frame pointer which was calculated
- rather than fetched). Set *ADDRP to the address, either in memory
- on as a REGISTER_BYTE offset into the registers array.
-
- Note that this implementation never sets *LVAL to not_lval. But
- it can be replaced by defining GET_SAVED_REGISTER and supplying
- your own.
-
- The argument RAW_BUFFER must point to aligned memory. */
-
-static void
-default_get_saved_register (char *raw_buffer,
- int *optimized,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lval)
+void
+frame_register_unwind (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump, void *bufferp)
{
- CORE_ADDR addr;
+ struct frame_unwind_cache *cache;
+
+ /* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
+ that the value proper does not need to be fetched. */
+ gdb_assert (optimizedp != NULL);
+ gdb_assert (lvalp != NULL);
+ gdb_assert (addrp != NULL);
+ gdb_assert (realnump != NULL);
+ /* gdb_assert (bufferp != NULL); */
+
+ /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
+ special case, there was always an inner frame dedicated to the
+ hardware registers. Unfortunatly, there is too much unwind code
+ around that looks up/down the frame chain while making the
+ assumption that each frame level is using the same unwind code. */
+
+ if (frame == NULL)
+ {
+ /* We're in the inner-most frame, get the value direct from the
+ register cache. */
+ *optimizedp = 0;
+ *lvalp = lval_register;
+ *addrp = 0;
+ /* Should this code test ``register_cached (regnum) < 0'' and do
+ something like set realnum to -1 when the register isn't
+ available? */
+ *realnump = regnum;
+ if (bufferp)
+ read_register_gen (regnum, bufferp);
+ return;
+ }
+
+ /* Ask this frame to unwind its register. */
+ frame->register_unwind (frame, &frame->register_unwind_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
+}
+
+
+void
+generic_unwind_get_saved_register (char *raw_buffer,
+ int *optimizedp,
+ CORE_ADDR *addrp,
+ struct frame_info *frame,
+ int regnum,
+ enum lval_type *lvalp)
+{
+ int optimizedx;
+ CORE_ADDR addrx;
+ int realnumx;
+ enum lval_type lvalx;
if (!target_has_registers)
error ("No registers.");
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
- addr = find_saved_register (frame, regnum);
- if (addr != 0)
- {
- if (lval != NULL)
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer != NULL)
- {
- /* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- (LONGEST) addr);
- }
- if (addrp != NULL)
- *addrp = 0;
- return;
- }
- if (raw_buffer != NULL)
- target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
- }
+ /* Keep things simple, ensure that all the pointers (except valuep)
+ are non NULL. */
+ if (optimizedp == NULL)
+ optimizedp = &optimizedx;
+ if (lvalp == NULL)
+ lvalp = &lvalx;
+ if (addrp == NULL)
+ addrp = &addrx;
+
+ /* Reached the the bottom (youngest, inner most) of the frame chain
+ (youngest, inner most) frame, go direct to the hardware register
+ cache (do not pass go, do not try to cache the value, ...). The
+ unwound value would have been cached in frame->next but that
+ doesn't exist. This doesn't matter as the hardware register
+ cache is stopping any unnecessary accesses to the target. */
+
+ /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
+ special case, there was always an inner frame dedicated to the
+ hardware registers. Unfortunatly, there is too much unwind code
+ around that looks up/down the frame chain while making the
+ assumption that each frame level is using the same unwind code. */
+
+ if (frame == NULL)
+ frame_register_unwind (NULL, regnum, optimizedp, lvalp, addrp, &realnumx,
+ raw_buffer);
else
- {
- if (lval != NULL)
- *lval = lval_register;
- addr = REGISTER_BYTE (regnum);
- if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
- }
- if (addrp != NULL)
- *addrp = addr;
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ &realnumx, raw_buffer);
}
-#if !defined (GET_SAVED_REGISTER)
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
- default_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
-#endif
-
void
get_saved_register (char *raw_buffer,
int *optimized,
#if !defined (FRAME_H)
#define FRAME_H 1
+/* Return the location (and possibly value) of REGNUM for the previous
+ (older, up) frame. All parameters except VALUEP can be assumed to
+ be non NULL. When VALUEP is NULL, just the location of the
+ register should be returned.
+
+ UNWIND_CACHE is provided as mechanism for implementing a per-frame
+ local cache. It's initial value being NULL. Memory for that cache
+ should be allocated using frame_obstack_alloc().
+
+ Register window architectures (eg SPARC) should note that REGNUM
+ identifies the register for the previous frame. For instance, a
+ request for the value of "o1" for the previous frame would be found
+ in the register "i1" in this FRAME. */
+
+typedef void (frame_register_unwind_ftype) (struct frame_info *frame,
+ void **unwind_cache,
+ int regnum,
+ int *optimized,
+ enum lval_type *lvalp,
+ CORE_ADDR *addrp,
+ int *realnump,
+ void *valuep);
+
/* Describe the saved registers of a frame. */
#if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS)
/* If dwarf2 unwind frame informations is used, this structure holds all
related unwind data. */
- struct unwind_contect *context;
+ struct context *context;
+
+ /* See description above. Return the register value for the
+ previous frame. */
+ frame_register_unwind_ftype *register_unwind;
+ void *register_unwind_cache;
/* Pointers to the next (down, inner) and previous (up, outer)
frame_info's in the frame cache. */
extern void select_frame (struct frame_info *);
-extern void record_selected_frame (CORE_ADDR *, int *);
+/* Return an ID that can be used to re-find a frame. */
+
+struct frame_id
+{
+ /* The frame's address. This should be constant through out the
+ lifetime of a frame. */
+ CORE_ADDR base;
+ /* The frame's current PC. While this changes, the function that
+ the PC falls into, does not. */
+ CORE_ADDR pc;
+};
+
+extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
+
+extern struct frame_info *frame_find_by_id (struct frame_id id);
extern void print_frame_info (struct frame_info *, int, int, int);
struct frame_info *, int,
enum lval_type *);
+extern void generic_unwind_get_saved_register (char *raw_buffer,
+ int *optimized,
+ CORE_ADDR * addrp,
+ struct frame_info *frame,
+ int regnum,
+ enum lval_type *lval);
+
+/* Unwind the stack frame so that the value of REGNUM, in the previous
+ frame is returned. If VALUEP is NULL, don't fetch/compute the
+ value. Instead just return the location of the value. */
+
+extern void frame_register_unwind (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump,
+ void *valuep);
+
extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
extern void get_saved_register (char *raw_buffer, int *optimized,
# Run indent per GDB specs
-types="-T FILE `cat *.h | sed -n \
+types="\
+-T FILE \
+-T prgregset_t -T fpregset_t -T gregset_t \
+`cat *.h | sed -n \
-e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
-e 's/^.*[^a-z0-9_]\([a-z0-9_]*_func\).*$/-T \1/p' \
-e 's/^typedef.*[^a-zA-Z0-9_]\([a-zA-Z0-9_]*[a-zA-Z0-9_]\);$/-T \1/p' \
static void verify_gdbarch (struct gdbarch *gdbarch);
static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_data (struct gdbarch *);
static void free_gdbarch_data (struct gdbarch *);
static void init_gdbarch_swap (struct gdbarch *);
static void clear_gdbarch_swap (struct gdbarch *);
struct gdbarch
{
+ /* Has this architecture been fully initialized? */
+ int initialized_p;
/* basic architectural information */
const struct bfd_arch_info * bfd_arch_info;
int byte_order;
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
gdbarch_return_value_on_stack_ftype *return_value_on_stack;
- gdbarch_extract_return_value_ftype *extract_return_value;
+ gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
gdbarch_push_arguments_ftype *push_arguments;
gdbarch_push_dummy_frame_ftype *push_dummy_frame;
gdbarch_push_return_address_ftype *push_return_address;
gdbarch_pop_frame_ftype *pop_frame;
gdbarch_store_struct_return_ftype *store_struct_return;
gdbarch_store_return_value_ftype *store_return_value;
- gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
+ gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
gdbarch_use_struct_convention_ftype *use_struct_convention;
gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
struct gdbarch startup_gdbarch =
{
+ 1, /* Always initialized. */
/* basic architecture information */
&bfd_default_arch_struct,
BFD_ENDIAN_BIG,
0,
0,
0,
+ default_print_float_info,
0,
0,
0,
0,
0,
0,
- generic_get_saved_register,
0,
0,
0,
they are starting from scratch. */
clear_gdbarch_swap (&startup_gdbarch);
init_gdbarch_swap (&startup_gdbarch);
- init_gdbarch_data (&startup_gdbarch);
}
current_gdbarch->max_register_virtual_size = -1;
current_gdbarch->do_registers_info = do_registers_info;
current_gdbarch->print_float_info = default_print_float_info;
- current_gdbarch->register_sim_regno = default_register_sim_regno;
+ current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
current_gdbarch->cannot_store_register = cannot_register_not;
current_gdbarch->use_generic_dummy_frames = -1;
current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
current_gdbarch->init_frame_pc = init_frame_pc_default;
current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
+ current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
current_gdbarch->register_convertible = generic_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
current_gdbarch->frame_args_skip = -1;
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
- current_gdbarch->frame_chain_valid = func_frame_chain_valid;
+ current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
current_gdbarch->extra_stack_alignment_needed = 1;
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
/* Skip verify of init_frame_pc_first, invalid_p == 0 */
/* Skip verify of init_frame_pc, invalid_p == 0 */
/* Skip verify of coerce_float_to_double, invalid_p == 0 */
- if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->get_saved_register == 0))
- fprintf_unfiltered (log, "\n\tget_saved_register");
+ /* Skip verify of get_saved_register, invalid_p == 0 */
/* Skip verify of register_convertible, invalid_p == 0 */
/* Skip verify of register_convert_to_virtual, invalid_p == 0 */
/* Skip verify of register_convert_to_raw, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
/* Skip verify of return_value_on_stack, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->extract_return_value == 0))
- fprintf_unfiltered (log, "\n\textract_return_value");
+ && (gdbarch->deprecated_extract_return_value == 0))
+ fprintf_unfiltered (log, "\n\tdeprecated_extract_return_value");
/* Skip verify of push_arguments, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->push_dummy_frame == 0))
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->store_return_value == 0))
fprintf_unfiltered (log, "\n\tstore_return_value");
- /* Skip verify of extract_struct_value_address, has predicate */
+ /* Skip verify of deprecated_extract_struct_value_address, has predicate */
/* Skip verify of use_struct_convention, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->frame_init_saved_regs == 0))
"gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
(long) DECR_PC_AFTER_BREAK);
#endif
+#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
+ XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
+ (long) current_gdbarch->deprecated_extract_return_value
+ /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
+#endif
+#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
+ XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
+ (long) current_gdbarch->deprecated_extract_struct_value_address
+ /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
+#endif
#ifdef DO_REGISTERS_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
(long) current_gdbarch->elf_make_msymbol_special
/*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
#endif
-#ifdef EXTRACT_RETURN_VALUE
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
- XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
- (long) current_gdbarch->extract_return_value
- /*EXTRACT_RETURN_VALUE ()*/);
-#endif
-#ifdef EXTRACT_STRUCT_VALUE_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
- XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
- (long) current_gdbarch->extract_struct_value_address
- /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
-#endif
#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
fprintf_unfiltered (file,
"gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
"gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
(long) current_gdbarch->prepare_to_proceed
/*PREPARE_TO_PROCEED ()*/);
-#endif
-#ifdef PRINT_FLOAT_INFO
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PRINT_FLOAT_INFO()",
- XSTRING (PRINT_FLOAT_INFO ()));
#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
- (long) current_gdbarch->print_float_info
- /*PRINT_FLOAT_INFO ()*/);
-#endif
+ "gdbarch_dump: print_float_info = 0x%08lx\n",
+ (long) current_gdbarch->print_float_info);
#ifdef PROLOGUE_FRAMELESS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
}
-char *
+const char *
gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
{
gdb_assert (gdbarch != NULL);
}
void
-gdbarch_print_float_info (struct gdbarch *gdbarch)
+gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->print_float_info == 0)
"gdbarch: gdbarch_print_float_info invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
- gdbarch->print_float_info ();
+ gdbarch->print_float_info (gdbarch, file, frame);
}
void
}
void
-gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
+gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->extract_return_value == 0)
+ if (gdbarch->deprecated_extract_return_value == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_extract_return_value invalid");
+ "gdbarch: gdbarch_deprecated_extract_return_value invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
- gdbarch->extract_return_value (type, regbuf, valbuf);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
+ gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
}
void
-set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
- gdbarch_extract_return_value_ftype extract_return_value)
+set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
+ gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
{
- gdbarch->extract_return_value = extract_return_value;
+ gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
}
CORE_ADDR
}
int
-gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->extract_struct_value_address != 0;
+ return gdbarch->deprecated_extract_struct_value_address != 0;
}
CORE_ADDR
-gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
+gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->extract_struct_value_address == 0)
+ if (gdbarch->deprecated_extract_struct_value_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_extract_struct_value_address invalid");
+ "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
- return gdbarch->extract_struct_value_address (regbuf);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
+ return gdbarch->deprecated_extract_struct_value_address (regbuf);
}
void
-set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
- gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
+set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
{
- gdbarch->extract_struct_value_address = extract_struct_value_address;
+ gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
}
int
struct gdbarch_data
{
unsigned index;
+ int init_p;
gdbarch_data_init_ftype *init;
gdbarch_data_free_ftype *free;
};
gdbarch_data_free_ftype *free)
{
struct gdbarch_data_registration **curr;
+ /* Append the new registraration. */
for (curr = &gdbarch_data_registry.registrations;
(*curr) != NULL;
curr = &(*curr)->next);
(*curr)->data = XMALLOC (struct gdbarch_data);
(*curr)->data->index = gdbarch_data_registry.nr++;
(*curr)->data->init = init;
+ (*curr)->data->init_p = 1;
(*curr)->data->free = free;
return (*curr)->data;
}
-/* Walk through all the registered users initializing each in turn. */
-
-static void
-init_gdbarch_data (struct gdbarch *gdbarch)
-{
- struct gdbarch_data_registration *rego;
- for (rego = gdbarch_data_registry.registrations;
- rego != NULL;
- rego = rego->next)
- {
- struct gdbarch_data *data = rego->data;
- gdb_assert (data->index < gdbarch->nr_data);
- if (data->init != NULL)
- {
- void *pointer = data->init (gdbarch);
- set_gdbarch_data (gdbarch, data, pointer);
- }
- }
-}
-
/* Create/delete the gdbarch data vector. */
static void
}
-/* Initialize the current value of thee specified per-architecture
+/* Initialize the current value of the specified per-architecture
data-pointer. */
void
void *pointer)
{
gdb_assert (data->index < gdbarch->nr_data);
- if (data->free != NULL && gdbarch->data[data->index] != NULL)
- data->free (gdbarch, gdbarch->data[data->index]);
+ if (gdbarch->data[data->index] != NULL)
+ {
+ gdb_assert (data->free != NULL);
+ data->free (gdbarch, gdbarch->data[data->index]);
+ }
gdbarch->data[data->index] = pointer;
}
gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
{
gdb_assert (data->index < gdbarch->nr_data);
+ /* The data-pointer isn't initialized, call init() to get a value but
+ only if the architecture initializaiton has completed. Otherwise
+ punt - hope that the caller knows what they are doing. */
+ if (gdbarch->data[data->index] == NULL
+ && gdbarch->initialized_p)
+ {
+ /* Be careful to detect an initialization cycle. */
+ gdb_assert (data->init_p);
+ data->init_p = 0;
+ gdb_assert (data->init != NULL);
+ gdbarch->data[data->index] = data->init (gdbarch);
+ data->init_p = 1;
+ gdb_assert (gdbarch->data[data->index] != NULL);
+ }
return gdbarch->data[data->index];
}
rego->arches = this;
}
- /* Switch to this new architecture. Dump it out. */
+ /* Switch to this new architecture marking it initialized. */
current_gdbarch = new_gdbarch;
+ current_gdbarch->initialized_p = 1;
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
called. */
init_gdbarch_swap (new_gdbarch);
- /* Initialize the per-architecture data-pointer of all parties that
- registered an interest in this architecture. CURRENT_GDBARCH
+ /* Initialize the per-architecture data. CURRENT_GDBARCH
must be updated before these modules are called. */
- init_gdbarch_data (new_gdbarch);
architecture_changed_event ();
if (gdbarch_debug)
#define REGISTER_NAME(regnr) (legacy_register_name (regnr))
#endif
-typedef char * (gdbarch_register_name_ftype) (int regnr);
-extern char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
+typedef const char * (gdbarch_register_name_ftype) (int regnr);
+extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
#error "Non multi-arch definition of REGISTER_NAME"
#endif
#endif
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PRINT_FLOAT_INFO)
-#define PRINT_FLOAT_INFO() (default_print_float_info ())
-#endif
-
-typedef void (gdbarch_print_float_info_ftype) (void);
-extern void gdbarch_print_float_info (struct gdbarch *gdbarch);
+typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame);
+extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame);
extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PRINT_FLOAT_INFO)
-#error "Non multi-arch definition of PRINT_FLOAT_INFO"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PRINT_FLOAT_INFO)
-#define PRINT_FLOAT_INFO() (gdbarch_print_float_info (current_gdbarch))
-#endif
-#endif
/* MAP a GDB RAW register number onto a simulator register number. See
also include/...-sim.h. */
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
-#define REGISTER_SIM_REGNO(reg_nr) (default_register_sim_regno (reg_nr))
+#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
#endif
typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
#endif
#endif
-/* GET_SAVED_REGISTER is like DUMMY_FRAMES. It is at level one as the
- old code has strange #ifdef interaction. So far no one has found
- that default_get_saved_register() is the default they are after. */
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
+#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval))
+#endif
typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
#error "Non multi-arch definition of GET_SAVED_REGISTER"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
#endif
#endif
#endif
#endif
-typedef void (gdbarch_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
-extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
-extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
-#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
+typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
+extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
+extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
-#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
#endif
#endif
#endif
#endif
-#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
-#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
+#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
+#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
#endif
-extern int gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
+extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
-#define EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_extract_struct_value_address_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
#endif
-typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (char *regbuf);
-extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
-extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
+typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
+extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
+extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
#endif
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe))
+#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
#endif
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
for the reserved data-pointer is returned. That identifer should
be saved in a local static variable.
- The per-architecture data-pointer can be initialized in one of two
- ways: The value can be set explicitly using a call to
- set_gdbarch_data(); the value can be set implicitly using the value
- returned by a non-NULL INIT() callback. INIT(), when non-NULL is
- called after the basic architecture vector has been created.
+ The per-architecture data-pointer is either initialized explicitly
+ (set_gdbarch_data()) or implicitly (by INIT() via a call to
+ gdbarch_data()). FREE() is called to delete either an existing
+ data-pointer overridden by set_gdbarch_data() or when the
+ architecture object is being deleted.
When a previously created architecture is re-selected, the
per-architecture data-pointer for that previous architecture is
- restored. INIT() is not called.
-
- During initialization, multiple assignments of the data-pointer are
- allowed, non-NULL values are deleted by calling FREE(). If the
- architecture is deleted using gdbarch_free() all non-NULL data
- pointers are also deleted using FREE().
+ restored. INIT() is not re-called.
Multiple registrarants for any architecture are allowed (and
strongly encouraged). */
# to map one to one onto the sdb register numbers.
f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
-f:2:REGISTER_NAME:char *:register_name:int regnr:regnr:::legacy_register_name::0
+f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
v:2:REGISTER_SIZE:int:register_size::::0:-1
v:2:REGISTER_BYTES:int:register_bytes::::0:-1
f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0
v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
f:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs:::do_registers_info::0
-f:2:PRINT_FLOAT_INFO:void:print_float_info:void::::default_print_float_info::0
+m:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame:file, frame:::default_print_float_info::0
# MAP a GDB RAW register number onto a simulator register number. See
# also include/...-sim.h.
-f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::default_register_sim_regno::0
+f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::legacy_register_sim_regno::0
F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes::0:0
f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_register_not::0
f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double::0
-# GET_SAVED_REGISTER is like DUMMY_FRAMES. It is at level one as the
-# old code has strange #ifdef interaction. So far no one has found
-# that default_get_saved_register() is the default they are after.
-f:1:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval::generic_get_saved_register:0
+f:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval:::generic_unwind_get_saved_register::0
#
f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
f:2:REGISTER_CONVERT_TO_VIRTUAL:void:register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
#
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0
+f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0
f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0
f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0
F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
#
f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0
-F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0
+F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf:::0
f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0
#
f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
# XXXX - both default and alternate frame_chain_valid functions are
# deprecated. New code should use dummy frames and one of the generic
# functions.
-f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::func_frame_chain_valid::0
+f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0
for the reserved data-pointer is returned. That identifer should
be saved in a local static variable.
- The per-architecture data-pointer can be initialized in one of two
- ways: The value can be set explicitly using a call to
- set_gdbarch_data(); the value can be set implicitly using the value
- returned by a non-NULL INIT() callback. INIT(), when non-NULL is
- called after the basic architecture vector has been created.
+ The per-architecture data-pointer is either initialized explicitly
+ (set_gdbarch_data()) or implicitly (by INIT() via a call to
+ gdbarch_data()). FREE() is called to delete either an existing
+ data-pointer overridden by set_gdbarch_data() or when the
+ architecture object is being deleted.
When a previously created architecture is re-selected, the
per-architecture data-pointer for that previous architecture is
- restored. INIT() is not called.
-
- During initialization, multiple assignments of the data-pointer are
- allowed, non-NULL values are deleted by calling FREE(). If the
- architecture is deleted using gdbarch_free() all non-NULL data
- pointers are also deleted using FREE().
+ restored. INIT() is not re-called.
Multiple registrarants for any architecture are allowed (and
strongly encouraged). */
static void verify_gdbarch (struct gdbarch *gdbarch);
static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_data (struct gdbarch *);
static void free_gdbarch_data (struct gdbarch *);
static void init_gdbarch_swap (struct gdbarch *);
static void clear_gdbarch_swap (struct gdbarch *);
printf "\n"
printf "struct gdbarch\n"
printf "{\n"
+printf " /* Has this architecture been fully initialized? */\n"
+printf " int initialized_p;\n"
printf " /* basic architectural information */\n"
function_list | while do_read
do
printf "\n"
printf "struct gdbarch startup_gdbarch =\n"
printf "{\n"
+printf " 1, /* Always initialized. */\n"
printf " /* basic architecture information */\n"
function_list | while do_read
do
they are starting from scratch. */
clear_gdbarch_swap (&startup_gdbarch);
init_gdbarch_swap (&startup_gdbarch);
- init_gdbarch_data (&startup_gdbarch);
}
EOF
struct gdbarch_data
{
unsigned index;
+ int init_p;
gdbarch_data_init_ftype *init;
gdbarch_data_free_ftype *free;
};
gdbarch_data_free_ftype *free)
{
struct gdbarch_data_registration **curr;
+ /* Append the new registraration. */
for (curr = &gdbarch_data_registry.registrations;
(*curr) != NULL;
curr = &(*curr)->next);
(*curr)->data = XMALLOC (struct gdbarch_data);
(*curr)->data->index = gdbarch_data_registry.nr++;
(*curr)->data->init = init;
+ (*curr)->data->init_p = 1;
(*curr)->data->free = free;
return (*curr)->data;
}
-/* Walk through all the registered users initializing each in turn. */
-
-static void
-init_gdbarch_data (struct gdbarch *gdbarch)
-{
- struct gdbarch_data_registration *rego;
- for (rego = gdbarch_data_registry.registrations;
- rego != NULL;
- rego = rego->next)
- {
- struct gdbarch_data *data = rego->data;
- gdb_assert (data->index < gdbarch->nr_data);
- if (data->init != NULL)
- {
- void *pointer = data->init (gdbarch);
- set_gdbarch_data (gdbarch, data, pointer);
- }
- }
-}
-
/* Create/delete the gdbarch data vector. */
static void
}
-/* Initialize the current value of thee specified per-architecture
+/* Initialize the current value of the specified per-architecture
data-pointer. */
void
void *pointer)
{
gdb_assert (data->index < gdbarch->nr_data);
- if (data->free != NULL && gdbarch->data[data->index] != NULL)
- data->free (gdbarch, gdbarch->data[data->index]);
+ if (gdbarch->data[data->index] != NULL)
+ {
+ gdb_assert (data->free != NULL);
+ data->free (gdbarch, gdbarch->data[data->index]);
+ }
gdbarch->data[data->index] = pointer;
}
gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
{
gdb_assert (data->index < gdbarch->nr_data);
+ /* The data-pointer isn't initialized, call init() to get a value but
+ only if the architecture initializaiton has completed. Otherwise
+ punt - hope that the caller knows what they are doing. */
+ if (gdbarch->data[data->index] == NULL
+ && gdbarch->initialized_p)
+ {
+ /* Be careful to detect an initialization cycle. */
+ gdb_assert (data->init_p);
+ data->init_p = 0;
+ gdb_assert (data->init != NULL);
+ gdbarch->data[data->index] = data->init (gdbarch);
+ data->init_p = 1;
+ gdb_assert (gdbarch->data[data->index] != NULL);
+ }
return gdbarch->data[data->index];
}
rego->arches = this;
}
- /* Switch to this new architecture. Dump it out. */
+ /* Switch to this new architecture marking it initialized. */
current_gdbarch = new_gdbarch;
+ current_gdbarch->initialized_p = 1;
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
called. */
init_gdbarch_swap (new_gdbarch);
- /* Initialize the per-architecture data-pointer of all parties that
- registered an interest in this architecture. CURRENT_GDBARCH
+ /* Initialize the per-architecture data. CURRENT_GDBARCH
must be updated before these modules are called. */
- init_gdbarch_data (new_gdbarch);
architecture_changed_event ();
if (gdbarch_debug)
utils.o \
mem-break.o \
$(DEPFILES)
+GDBSERVER_LIBS = @GDBSERVER_LIBS@
# Prevent Sun make from putting in the machine type. Setting
# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
## with no dependencies and no actions.
unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
regdat_sh = $(srcdir)/../regformats/regdat.sh
regdef_h = $(srcdir)/../regformats/regdef.h
regcache_h = $(srcdir)/regcache.h
inferiors.o: inferiors.c $(server_h)
mem-break.o: mem-break.c $(server_h)
+proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h)
regcache.o: regcache.c $(server_h) $(regdef_h)
remote-utils.o: remote-utils.c terminal.h $(server_h)
server.o: server.c $(server_h)
target.o: target.c $(server_h)
+thread-db.o: thread-db.c $(server_h) $(gdb_proc_service_h)
utils.o: utils.c $(server_h)
signals.o: ../signals/signals.c $(server_h)
linux_low_h = $(srcdir)/linux-low.h
linux-low.o: linux-low.c $(linux_low_h) $(server_h)
+ $(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
+
linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
/* Define if the target supports PTRACE_GETFPXREGS for extended
register access. */
#undef HAVE_PTRACE_GETFPXREGS
+
+/* Define if <sys/procfs.h> has prgregset_t. */
+#undef HAVE_PRGREGSET_T
+
+/* Define if <sys/procfs.h> has prfpregset_t. */
+#undef HAVE_PRFPREGSET_T
+
+/* Define if <sys/procfs.h> has lwpid_t. */
+#undef HAVE_LWPID_T
+
+/* Define if <sys/procfs.h> has psaddr_t. */
+#undef HAVE_PSADDR_T
+
+/* Define if the prfpregset_t type is broken. */
+#undef PRFPREGSET_T_BROKEN
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
+dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
+sinclude(../../bfd/acinclude.m4)
-# serial 1
+AC_DEFUN([SRV_CHECK_THREAD_DB],
+[AC_CACHE_CHECK([for libthread_db],[srv_cv_thread_db],
+ [old_LIBS="$LIBS"
+ LIBS="$LIBS -lthread_db"
+ AC_TRY_LINK(
+ [void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+ void ps_pdwrite() {}
+ void ps_lgetregs() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="-lthread_db"],
+ [srv_cv_thread_db=no
-# @defmac AC_PROG_CC_STDC
-# @maindex PROG_CC_STDC
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so. This macro tries various
-# options that select ANSI C on some system or another. It considers the
-# compiler to be in ANSI C mode if it handles function prototypes correctly.
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN(AM_PROG_CC_STDC,
-[AC_REQUIRE([AC_PROG_CC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_BEFORE([$0], [AC_C_CONST])
-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
-dnl a magic option to avoid problems with ANSI preprocessor commands
-dnl like #elif.
-dnl FIXME: can't do this because then AC_AIX won't work due to a
-dnl circular dependency.
-dnl AC_BEFORE([$0], [AC_PROG_CPP])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# 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 -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- AC_TRY_COMPILE(
-[#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;
-], [
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
-],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
-])
-if test -z "$am_cv_prog_cc_stdc"; then
- AC_MSG_RESULT([none needed])
-else
- AC_MSG_RESULT($am_cv_prog_cc_stdc)
-fi
-case "x$am_cv_prog_cc_stdc" in
- x|xno) ;;
- *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
+ if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
+ thread_db="/lib/libthread_db.so.1"
+ else
+ thread_db='$prefix/lib/libthread_db.so.1'
+ fi
+ LIBS="$old_LIBS `eval echo "$thread_db"`"
+ AC_TRY_LINK(
+ [void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+ void ps_pdwrite() {}
+ void ps_lgetregs() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="$thread_db"],
+ [srv_cv_thread_db=no])
+ LIBS="$old_LIBS"
+ ]])
+)])
-/* config.in. Generated automatically from configure.in by autoheader 2.13. */
+/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
register access. */
#undef HAVE_PTRACE_GETFPXREGS
+/* Define if the prfpregset_t type is broken. */
+#undef PRFPREGSET_T_BROKEN
+
+/* Define if you have the <linux/elf.h> header file. */
+#undef HAVE_LINUX_ELF_H
+
+/* Define if you have the <proc_service.h> header file. */
+#undef HAVE_PROC_SERVICE_H
+
/* Define if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define if you have the <sys/procfs.h> header file. */
+#undef HAVE_SYS_PROCFS_H
+
/* Define if you have the <sys/reg.h> header file. */
#undef HAVE_SYS_REG_H
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
+
+/* Define if you have the <thread_db.h> header file. */
+#undef HAVE_THREAD_DB_H
+
+/* Define if <sys/procfs.h> has lwpid_t. */
+#undef HAVE_LWPID_T
+
+/* Define if <sys/procfs.h> has psaddr_t. */
+#undef HAVE_PSADDR_T
+
+/* Define if <sys/procfs.h> has prgregset_t. */
+#undef HAVE_PRGREGSET_T
+
+/* Define if <sys/procfs.h> has prfpregset_t. */
+#undef HAVE_PRFPREGSET_T
+
+/* Define if <sys/procfs.h> has elf_fpregset_t. */
+#undef HAVE_ELF_FPREGSET_T
+
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
# 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:530: checking for $ac_word" >&5
+echo "configure:541: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:560: checking for $ac_word" >&5
+echo "configure:571: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:611: checking for $ac_word" >&5
+echo "configure:622: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:643: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:654: 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.
cat > conftest.$ac_ext << EOF
-#line 654 "configure"
+#line 665 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:670: \"$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
{ 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:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:690: checking whether we are using GNU C" >&5
+echo "configure:701: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:718: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:729: 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
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:797: checking host system type" >&5
+echo "configure:808: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:818: checking target system type" >&5
+echo "configure:829: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:836: checking build system type" >&5
+echo "configure:847: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:871: checking for a BSD compatible install" >&5
+echo "configure:882: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:925: checking how to run the C preprocessor" >&5
+echo "configure:936: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 940 "configure"
+#line 951 "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:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:957: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 957 "configure"
+#line 968 "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:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:974: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 974 "configure"
+#line 985 "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:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:991: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1005: checking for ANSI C header files" >&5
+echo "configure:1016: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1010 "configure"
+#line 1021 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1029: \"$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*
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 1035 "configure"
+#line 1046 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 1053 "configure"
+#line 1064 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1074 "configure"
+#line 1085 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
-for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h
+for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1113: checking for $ac_hdr" >&5
+echo "configure:1124: 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 1118 "configure"
+#line 1129 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1134: \"$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*
if test "${srv_linux_regsets}" = "yes"; then
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:1161: checking for PTRACE_GETREGS" >&5
+echo "configure:1172: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
+#line 1177 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdbsrv_cv_have_ptrace_getregs=yes
else
fi
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:1194: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:1205: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
+#line 1210 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdbsrv_cv_have_ptrace_getfpxregs=yes
else
fi
fi
-GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj"
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+ echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1240: checking for lwpid_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1245 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+lwpid_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpid_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpid_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_LWPID_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
+
+ echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1276: checking for psaddr_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1281 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+psaddr_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psaddr_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psaddr_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PSADDR_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
+
+ echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1312: checking for prgregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1317 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prgregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prgregset_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prgregset_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRGREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
+
+ echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1348: checking for prfpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1353 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prfpregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prfpregset_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
+
+
+
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
+echo "configure:1388: checking whether prfpregset_t type is broken" >&5
+ if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ gdb_cv_prfpregset_t_broken=yes
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1396 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+ int main ()
+ {
+ if (sizeof (prfpregset_t) == sizeof (void *))
+ return 1;
+ return 0;
+ }
+EOF
+if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ gdb_cv_prfpregset_t_broken=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ gdb_cv_prfpregset_t_broken=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+
+ echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
+ if test $gdb_cv_prfpregset_t_broken = yes; then
+ cat >> confdefs.h <<\EOF
+#define PRFPREGSET_T_BROKEN 1
+EOF
+
+ fi
+ fi
+
+ echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1430: checking for elf_fpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1435 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+elf_fpregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
+
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ELF_FPREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_elf_fpregset_t" 1>&6
+
+fi
+
+srv_thread_depfiles=
+srv_libs=
+USE_THREAD_DB=
+
+if test "$srv_linux_thread_db" = "yes"; then
+ echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
+echo "configure:1473: checking for libthread_db" >&5
+if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ old_LIBS="$LIBS"
+ LIBS="$LIBS -lthread_db"
+ cat > conftest.$ac_ext <<EOF
+#line 1480 "configure"
+#include "confdefs.h"
+void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+ void ps_pdwrite() {}
+ void ps_lgetregs() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
+ void ps_getpid() {}
+int main() {
+td_ta_new();
+; return 0; }
+EOF
+if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ srv_cv_thread_db="-lthread_db"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ srv_cv_thread_db=no
+
+ if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
+ thread_db="/lib/libthread_db.so.1"
+ else
+ thread_db='$prefix/lib/libthread_db.so.1'
+ fi
+ LIBS="$old_LIBS `eval echo "$thread_db"`"
+ cat > conftest.$ac_ext <<EOF
+#line 1510 "configure"
+#include "confdefs.h"
+void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+ void ps_pdwrite() {}
+ void ps_lgetregs() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
+ void ps_getpid() {}
+int main() {
+td_ta_new();
+; return 0; }
+EOF
+if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ srv_cv_thread_db="$thread_db"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ srv_cv_thread_db=no
+fi
+rm -f conftest*
+ LIBS="$old_LIBS"
+
+fi
+
+echo "$ac_t""$srv_cv_thread_db" 1>&6
+
+fi
+rm -f conftest*
+ if test "$srv_cv_thread_db" = no; then
+ echo "configure: warning: Could not find libthread_db." 1>&2
+ echo "configure: warning: Disabling thread support in gdbserver." 1>&2
+ srv_linux_thread_db=no
+ else
+ srv_libs="$srv_cv_thread_db"
+ fi
+fi
+
+if test "$srv_linux_thread_db" = "yes"; then
+ srv_thread_depfiles="thread-db.o proc-service.o"
+ USE_THREAD_DB="-DUSE_THREAD_DB"
+fi
+
+GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
+GDBSERVER_LIBS="$srv_libs"
+
+
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CPP@%$CPP%g
s%@GDBSERVER_DEPFILES@%$GDBSERVER_DEPFILES%g
+s%@GDBSERVER_LIBS@%$GDBSERVER_LIBS%g
+s%@USE_THREAD_DB@%$USE_THREAD_DB%g
CEOF
EOF
AC_HEADER_STDC
-AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h)
+AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
+ proc_service.h sys/procfs.h thread_db.h linux/elf.h)
. ${srcdir}/configure.srv
fi
fi
-GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj"
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+ BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
+ BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
+
+ dnl Check for broken prfpregset_t type
+
+ dnl For Linux/i386, glibc 2.1.3 was released with a bogus
+ dnl prfpregset_t type (it's a typedef for the pointer to a struct
+ dnl instead of the struct itself). We detect this here, and work
+ dnl around it in gdb_proc_service.h.
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ AC_MSG_CHECKING(whether prfpregset_t type is broken)
+ AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
+ [AC_TRY_RUN([#include <sys/procfs.h>
+ int main ()
+ {
+ if (sizeof (prfpregset_t) == sizeof (void *))
+ return 1;
+ return 0;
+ }],
+ gdb_cv_prfpregset_t_broken=no,
+ gdb_cv_prfpregset_t_broken=yes,
+ gdb_cv_prfpregset_t_broken=yes)])
+ AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
+ if test $gdb_cv_prfpregset_t_broken = yes; then
+ AC_DEFINE(PRFPREGSET_T_BROKEN)
+ fi
+ fi
+
+ BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
+fi
+
+srv_thread_depfiles=
+srv_libs=
+USE_THREAD_DB=
+
+if test "$srv_linux_thread_db" = "yes"; then
+ SRV_CHECK_THREAD_DB
+ if test "$srv_cv_thread_db" = no; then
+ AC_WARN([Could not find libthread_db.])
+ AC_WARN([Disabling thread support in gdbserver.])
+ srv_linux_thread_db=no
+ else
+ srv_libs="$srv_cv_thread_db"
+ fi
+fi
+
+if test "$srv_linux_thread_db" = "yes"; then
+ srv_thread_depfiles="thread-db.o proc-service.o"
+ USE_THREAD_DB="-DUSE_THREAD_DB"
+fi
+
+GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
+GDBSERVER_LIBS="$srv_libs"
AC_SUBST(GDBSERVER_DEPFILES)
+AC_SUBST(GDBSERVER_LIBS)
+AC_SUBST(USE_THREAD_DB)
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in
arm*-*-linux*) srv_regobj=reg-arm.o
srv_tgtobj="linux-low.o linux-arm-low.o"
srv_linux_usrregs=yes
+ srv_linux_thread_db=yes
;;
i[3456]86-*-linux*) srv_regobj=reg-i386-linux.o
srv_tgtobj="linux-low.o linux-i386-low.o i387-fp.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes
+ srv_linux_thread_db=yes
;;
ia64-*-linux*) srv_regobj=reg-ia64.o
srv_tgtobj="linux-low.o linux-ia64-low.o"
mips*-*-linux*) srv_regobj=reg-mips.o
srv_tgtobj="linux-low.o linux-mips-low.o"
srv_linux_usrregs=yes
+ srv_linux_thread_db=yes
;;
powerpc*-*-linux*) srv_regobj=reg-ppc.o
srv_tgtobj="linux-low.o linux-ppc-low.o"
srv_linux_usrregs=yes
+ srv_linux_thread_db=yes
;;
s390-*-linux*) srv_regobj=reg-s390.o
srv_tgtobj="linux-low.o linux-s390-low.o"
sh*-*-linux*) srv_regobj=reg-sh.o
srv_tgtobj="linux-low.o linux-sh-low.o"
srv_linux_usrregs=yes
+ srv_linux_thread_db=yes
;;
x86_64-*-linux*) srv_regobj=reg-x86-64.o
srv_tgtobj="linux-low.o linux-x86-64-low.o i387-fp.o"
Boston, MA 02111-1307, USA. */
#include "server.h"
+#include "i387-fp.h"
int num_xmm_registers = 8;
}
void
-i387_fsave_to_cache (void *buf)
+i387_fsave_to_cache (const void *buf)
{
struct i387_fsave *fp = (struct i387_fsave *) buf;
int i;
}
void
-i387_fxsave_to_cache (void *buf)
+i387_fxsave_to_cache (const void *buf)
{
struct i387_fxsave *fp = (struct i387_fxsave *) buf;
int i, top;
val = (fp->fop) & 0x7FF;
supply_register_by_name ("fop", &val);
}
-
#define I387_FP_H
void i387_cache_to_fsave (void *buf);
-void i387_fsave_to_cache (void *buf);
+void i387_fsave_to_cache (const void *buf);
void i387_cache_to_fxsave (void *buf);
-void i387_fxsave_to_cache (void *buf);
+void i387_fxsave_to_cache (const void *buf);
extern int num_xmm_registers;
#include "server.h"
-struct inferior_info
+struct thread_info
{
- int pid;
+ struct inferior_list_entry entry;
void *target_data;
void *regcache_data;
- struct inferior_info *next;
};
-static struct inferior_info *inferiors;
-struct inferior_info *current_inferior;
-int signal_pid;
+struct inferior_list all_threads;
+
+struct thread_info *current_inferior;
+
+#define get_thread(inf) ((struct thread_info *)(inf))
+
+void
+add_inferior_to_list (struct inferior_list *list,
+ struct inferior_list_entry *new_inferior)
+{
+ new_inferior->next = NULL;
+ if (list->tail != NULL)
+ list->tail->next = new_inferior;
+ else
+ list->head = new_inferior;
+ list->tail = new_inferior;
+}
+
+void
+for_each_inferior (struct inferior_list *list,
+ void (*action) (struct inferior_list_entry *))
+{
+ struct inferior_list_entry *cur = list->head, *next;
+
+ while (cur != NULL)
+ {
+ next = cur->next;
+ (*action) (cur);
+ cur = next;
+ }
+}
void
-add_inferior (int pid)
+change_inferior_id (struct inferior_list *list,
+ int new_id)
{
- struct inferior_info *new_inferior
- = (struct inferior_info *) malloc (sizeof (*new_inferior));
+ if (list->head != list->tail)
+ error ("tried to change thread ID after multiple threads are created");
- memset (new_inferior, 0, sizeof (*new_inferior));
+ list->head->id = new_id;
+}
- new_inferior->pid = pid;
+void
+remove_inferior (struct inferior_list *list,
+ struct inferior_list_entry *entry)
+{
+ struct inferior_list_entry **cur;
- new_inferior->next = inferiors;
- inferiors = new_inferior;
+ if (list->head == entry)
+ {
+ list->head = entry->next;
+ if (list->tail == entry)
+ list->tail = list->head;
+ return;
+ }
+
+ cur = &list->head;
+ while (*cur && (*cur)->next != entry)
+ cur = &(*cur)->next;
+
+ if (*cur == NULL)
+ return;
+ (*cur)->next = entry->next;
+
+ if (list->tail == entry)
+ list->tail = *cur;
+}
+
+void
+add_thread (int thread_id, void *target_data)
+{
+ struct thread_info *new_thread
+ = (struct thread_info *) malloc (sizeof (*new_thread));
+
+ memset (new_thread, 0, sizeof (*new_thread));
+
+ new_thread->entry.id = thread_id;
+
+ add_inferior_to_list (&all_threads, & new_thread->entry);
+
if (current_inferior == NULL)
- current_inferior = inferiors;
+ current_inferior = new_thread;
- create_register_cache (new_inferior);
+ new_thread->target_data = target_data;
+ set_inferior_regcache_data (new_thread, new_register_cache ());
+}
- if (signal_pid == 0)
- signal_pid = pid;
+static void
+free_one_thread (struct inferior_list_entry *inf)
+{
+ struct thread_info *thread = get_thread (inf);
+ free_register_cache (inferior_regcache_data (thread));
+ free (thread);
+}
+
+void
+remove_thread (struct thread_info *thread)
+{
+ remove_inferior (&all_threads, (struct inferior_list_entry *) thread);
+ free_one_thread (&thread->entry);
}
void
clear_inferiors (void)
{
- struct inferior_info *inf = inferiors, *next_inf;
+ for_each_inferior (&all_threads, free_one_thread);
+
+ all_threads.head = all_threads.tail = NULL;
+}
+
+struct inferior_list_entry *
+find_inferior (struct inferior_list *list,
+ int (*func) (struct inferior_list_entry *, void *), void *arg)
+{
+ struct inferior_list_entry *inf = list->head;
- while (inf)
+ while (inf != NULL)
{
- next_inf = inf->next;
+ if ((*func) (inf, arg))
+ return inf;
+ inf = inf->next;
+ }
- if (inf->target_data)
- free (inf->target_data);
- if (inf->regcache_data)
- free_register_cache (inf);
+ return NULL;
+}
- free (inf);
- inf = next_inf;
+struct inferior_list_entry *
+find_inferior_id (struct inferior_list *list, int id)
+{
+ struct inferior_list_entry *inf = list->head;
+
+ while (inf != NULL)
+ {
+ if (inf->id == id)
+ return inf;
+ inf = inf->next;
}
- inferiors = NULL;
+ return NULL;
}
void *
-inferior_target_data (struct inferior_info *inferior)
+inferior_target_data (struct thread_info *inferior)
{
return inferior->target_data;
}
void
-set_inferior_target_data (struct inferior_info *inferior, void *data)
+set_inferior_target_data (struct thread_info *inferior, void *data)
{
inferior->target_data = data;
}
void *
-inferior_regcache_data (struct inferior_info *inferior)
+inferior_regcache_data (struct thread_info *inferior)
{
return inferior->regcache_data;
}
void
-set_inferior_regcache_data (struct inferior_info *inferior, void *data)
+set_inferior_regcache_data (struct thread_info *inferior, void *data)
{
inferior->regcache_data = data;
}
return (regno >= arm_num_regs);
}
+static CORE_ADDR
+arm_get_pc ()
+{
+ unsigned long pc;
+ collect_register_by_name ("pc", &pc);
+ return pc;
+}
+
+static void
+arm_set_pc (CORE_ADDR pc)
+{
+ unsigned long newpc = pc;
+ supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness. We do not support Thumb yet. */
+static const unsigned long arm_breakpoint = 0xef9f0001;
+#define arm_breakpoint_len 4
+
+static int
+arm_breakpoint_at (CORE_ADDR where)
+{
+ unsigned long insn;
+
+ (*the_target->read_memory) (where, (char *) &insn, 4);
+ if (insn == arm_breakpoint)
+ return 1;
+
+ /* If necessary, recognize more trap instructions here. GDB only uses the
+ one. */
+ return 0;
+}
+
struct linux_target_ops the_low_target = {
arm_num_regs,
arm_regmap,
arm_cannot_fetch_register,
arm_cannot_store_register,
+ arm_get_pc,
+ arm_set_pc,
+ (const char *) &arm_breakpoint,
+ arm_breakpoint_len,
+ NULL,
+ 0,
+ arm_breakpoint_at,
};
}
static void
-i386_store_gregset (void *buf)
+i386_store_gregset (const void *buf)
{
int i;
}
static void
-i386_store_fpregset (void *buf)
+i386_store_fpregset (const void *buf)
{
i387_fsave_to_cache (buf);
}
}
static void
-i386_store_fpxregset (void *buf)
+i386_store_fpxregset (const void *buf)
{
i387_fxsave_to_cache (buf);
}
struct regset_info target_regsets[] = {
{ PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
+ GENERAL_REGS,
i386_fill_gregset, i386_store_gregset },
#ifdef HAVE_PTRACE_GETFPXREGS
{ PTRACE_GETFPXREGS, PTRACE_SETFPXREGS, sizeof (elf_fpxregset_t),
+ EXTENDED_REGS,
i386_fill_fpxregset, i386_store_fpxregset },
#endif
{ PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof (elf_fpregset_t),
+ FP_REGS,
i386_fill_fpregset, i386_store_fpregset },
- { 0, 0, -1, NULL, NULL }
+ { 0, 0, -1, -1, NULL, NULL }
};
#endif /* HAVE_LINUX_REGSETS */
static const char i386_breakpoint[] = { 0xCC };
#define i386_breakpoint_len 1
+extern int debug_threads;
+
static CORE_ADDR
-i386_stop_pc ()
+i386_get_pc ()
{
unsigned long pc;
- /* Overkill */
- fetch_inferior_registers (0);
-
collect_register_by_name ("eip", &pc);
- return pc - 1;
+
+ if (debug_threads)
+ fprintf (stderr, "stop pc (before any decrement) is %08lx\n", pc);
+ return pc;
}
static void
i386_set_pc (CORE_ADDR newpc)
{
+ if (debug_threads)
+ fprintf (stderr, "set pc to %08lx\n", (long) newpc);
supply_register_by_name ("eip", &newpc);
+}
+
+static int
+i386_breakpoint_at (CORE_ADDR pc)
+{
+ unsigned char c;
+
+ read_inferior_memory (pc, &c, 1);
+ if (c == 0xCC)
+ return 1;
- /* Overkill */
- store_inferior_registers (0);
+ return 0;
}
struct linux_target_ops the_low_target = {
i386_regmap,
i386_cannot_fetch_register,
i386_cannot_store_register,
- i386_stop_pc,
+ i386_get_pc,
i386_set_pc,
i386_breakpoint,
i386_breakpoint_len,
+ NULL,
+ 1,
+ i386_breakpoint_at,
};
#include <stdlib.h>
#include <unistd.h>
-static CORE_ADDR linux_bp_reinsert;
+/* ``all_threads'' is keyed by the LWP ID - it should be the thread ID instead,
+ however. This requires changing the ID in place when we go from !using_threads
+ to using_threads, immediately.
+ ``all_processes'' is keyed by the process ID - which on Linux is (presently)
+ the same as the LWP ID. */
+
+struct inferior_list all_processes;
+
+/* FIXME this is a bit of a hack, and could be removed. */
+int stopping_threads;
+
+/* FIXME make into a target method? */
+int using_threads;
+
+static void linux_resume_one_process (struct inferior_list_entry *entry,
+ int step, int signal);
static void linux_resume (int step, int signal);
+static void stop_all_processes (void);
+static int linux_wait_for_event (struct thread_info *child);
+
+struct pending_signals
+{
+ int signal;
+ struct pending_signals *prev;
+};
#define PTRACE_ARG3_TYPE long
#define PTRACE_XFER_TYPE long
extern int errno;
-static int inferior_pid;
+int debug_threads = 0;
+
+#define pid_of(proc) ((proc)->head.id)
+
+/* FIXME: Delete eventually. */
+#define inferior_pid (pid_of (get_thread_process (current_inferior)))
+
+/* This function should only be called if the process got a SIGTRAP.
+ The SIGTRAP could mean several things.
+
+ On i386, where decr_pc_after_break is non-zero:
+ If we were single-stepping this process using PTRACE_SINGLESTEP,
+ we will get only the one SIGTRAP (even if the instruction we
+ stepped over was a breakpoint). The value of $eip will be the
+ next instruction.
+ If we continue the process using PTRACE_CONT, we will get a
+ SIGTRAP when we hit a breakpoint. The value of $eip will be
+ the instruction after the breakpoint (i.e. needs to be
+ decremented). If we report the SIGTRAP to GDB, we must also
+ report the undecremented PC. If we cancel the SIGTRAP, we
+ must resume at the decremented PC.
+
+ (Presumably, not yet tested) On a non-decr_pc_after_break machine
+ with hardware or kernel single-step:
+ If we single-step over a breakpoint instruction, our PC will
+ point at the following instruction. If we continue and hit a
+ breakpoint instruction, our PC will point at the breakpoint
+ instruction. */
+
+static CORE_ADDR
+get_stop_pc (void)
+{
+ CORE_ADDR stop_pc = (*the_low_target.get_pc) ();
+
+ if (get_thread_process (current_inferior)->stepping)
+ return stop_pc;
+ else
+ return stop_pc - the_low_target.decr_pc_after_break;
+}
-struct inferior_linux_data
+static void *
+add_process (int pid)
{
- int pid;
-};
+ struct process_info *process;
+
+ process = (struct process_info *) malloc (sizeof (*process));
+ memset (process, 0, sizeof (*process));
+
+ process->head.id = pid;
+
+ /* Default to tid == lwpid == pid. */
+ process->tid = pid;
+ process->lwpid = pid;
+
+ add_inferior_to_list (&all_processes, &process->head);
+
+ return process;
+}
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
static int
linux_create_inferior (char *program, char **allargs)
{
- struct inferior_linux_data *tdata;
+ void *new_process;
int pid;
pid = fork ();
{
ptrace (PTRACE_TRACEME, 0, 0, 0);
+ signal (SIGRTMIN + 1, SIG_DFL);
+
execv (program, allargs);
fprintf (stderr, "Cannot exec %s: %s.\n", program,
_exit (0177);
}
- add_inferior (pid);
- tdata = (struct inferior_linux_data *) malloc (sizeof (*tdata));
- tdata->pid = pid;
- set_inferior_target_data (current_inferior, tdata);
+ new_process = add_process (pid);
+ add_thread (pid, new_process);
- /* FIXME remove */
- inferior_pid = pid;
return 0;
}
/* Attach to an inferior process. */
-static int
-linux_attach (int pid)
+void
+linux_attach_lwp (int pid, int tid)
{
- struct inferior_linux_data *tdata;
+ struct process_info *new_process;
if (ptrace (PTRACE_ATTACH, pid, 0, 0) != 0)
{
errno < sys_nerr ? sys_errlist[errno] : "unknown error",
errno);
fflush (stderr);
- _exit (0177);
+
+ /* If we fail to attach to an LWP, just return. */
+ if (!using_threads)
+ _exit (0177);
+ return;
}
- add_inferior (pid);
- tdata = (struct inferior_linux_data *) malloc (sizeof (*tdata));
- tdata->pid = pid;
- set_inferior_target_data (current_inferior, tdata);
+ new_process = (struct process_info *) add_process (pid);
+ add_thread (tid, new_process);
+
+ /* The next time we wait for this LWP we'll see a SIGSTOP as PTRACE_ATTACH
+ brings it to a halt. We should ignore that SIGSTOP and resume the process
+ (unless this is the first process, in which case the flag will be cleared
+ in linux_attach).
+
+ On the other hand, if we are currently trying to stop all threads, we
+ should treat the new thread as if we had sent it a SIGSTOP. This works
+ because we are guaranteed that add_process added us to the end of the
+ list, and so the new thread has not yet reached wait_for_sigstop (but
+ will). */
+ if (! stopping_threads)
+ new_process->stop_expected = 1;
+}
+
+int
+linux_attach (int pid)
+{
+ struct process_info *process;
+
+ linux_attach_lwp (pid, pid);
+
+ /* Don't ignore the initial SIGSTOP if we just attached to this process. */
+ process = (struct process_info *) find_inferior_id (&all_processes, pid);
+ process->stop_expected = 0;
+
return 0;
}
/* Kill the inferior process. Make us have no inferior. */
static void
-linux_kill (void)
+linux_kill_one_process (struct inferior_list_entry *entry)
{
- if (inferior_pid == 0)
- return;
- ptrace (PTRACE_KILL, inferior_pid, 0, 0);
- wait (0);
- clear_inferiors ();
+ struct thread_info *thread = (struct thread_info *) entry;
+ struct process_info *process = get_thread_process (thread);
+ int wstat;
+
+ do
+ {
+ ptrace (PTRACE_KILL, pid_of (process), 0, 0);
+
+ /* Make sure it died. The loop is most likely unnecessary. */
+ wstat = linux_wait_for_event (thread);
+ } while (WIFSTOPPED (wstat));
}
/* Return nonzero if the given thread is still alive. */
+static void
+linux_kill (void)
+{
+ for_each_inferior (&all_threads, linux_kill_one_process);
+}
+
+static int
+linux_thread_alive (int tid)
+{
+ if (find_inferior_id (&all_threads, tid) != NULL)
+ return 1;
+ else
+ return 0;
+}
+
+/* Return nonzero if this process stopped at a breakpoint which
+ no longer appears to be inserted. Also adjust the PC
+ appropriately to resume where the breakpoint used to be. */
static int
-linux_thread_alive (int pid)
+check_removed_breakpoint (struct process_info *event_child)
{
+ CORE_ADDR stop_pc;
+ struct thread_info *saved_inferior;
+
+ if (event_child->pending_is_breakpoint == 0)
+ return 0;
+
+ if (debug_threads)
+ fprintf (stderr, "Checking for breakpoint.\n");
+
+ saved_inferior = current_inferior;
+ current_inferior = get_process_thread (event_child);
+
+ stop_pc = get_stop_pc ();
+
+ /* If the PC has changed since we stopped, then we shouldn't do
+ anything. This happens if, for instance, GDB handled the
+ decr_pc_after_break subtraction itself. */
+ if (stop_pc != event_child->pending_stop_pc)
+ {
+ if (debug_threads)
+ fprintf (stderr, "Ignoring, PC was changed.\n");
+
+ event_child->pending_is_breakpoint = 0;
+ current_inferior = saved_inferior;
+ return 0;
+ }
+
+ /* If the breakpoint is still there, we will report hitting it. */
+ if ((*the_low_target.breakpoint_at) (stop_pc))
+ {
+ if (debug_threads)
+ fprintf (stderr, "Ignoring, breakpoint is still present.\n");
+ current_inferior = saved_inferior;
+ return 0;
+ }
+
+ if (debug_threads)
+ fprintf (stderr, "Removed breakpoint.\n");
+
+ /* For decr_pc_after_break targets, here is where we perform the
+ decrement. We go immediately from this function to resuming,
+ and can not safely call get_stop_pc () again. */
+ if (the_low_target.set_pc != NULL)
+ (*the_low_target.set_pc) (stop_pc);
+
+ /* We consumed the pending SIGTRAP. */
+ event_child->status_pending_p = 0;
+ event_child->status_pending = 0;
+
+ current_inferior = saved_inferior;
return 1;
}
+/* Return 1 if this process has an interesting status pending. This function
+ may silently resume an inferior process. */
static int
-linux_wait_for_one_inferior (struct inferior_info *child)
+status_pending_p (struct inferior_list_entry *entry, void *dummy)
+{
+ struct process_info *process = (struct process_info *) entry;
+
+ if (process->status_pending_p)
+ if (check_removed_breakpoint (process))
+ {
+ /* This thread was stopped at a breakpoint, and the breakpoint
+ is now gone. We were told to continue (or step...) all threads,
+ so GDB isn't trying to single-step past this breakpoint.
+ So instead of reporting the old SIGTRAP, pretend we got to
+ the breakpoint just after it was removed instead of just
+ before; resume the process. */
+ linux_resume_one_process (&process->head, 0, 0);
+ return 0;
+ }
+
+ return process->status_pending_p;
+}
+
+static void
+linux_wait_for_process (struct process_info **childp, int *wstatp)
{
- struct inferior_linux_data *child_data = inferior_target_data (child);
- int pid, wstat;
+ int ret;
+ int to_wait_for = -1;
+
+ if (*childp != NULL)
+ to_wait_for = (*childp)->lwpid;
while (1)
{
- pid = waitpid (child_data->pid, &wstat, 0);
+ ret = waitpid (to_wait_for, wstatp, WNOHANG);
+
+ if (ret == -1)
+ {
+ if (errno != ECHILD)
+ perror_with_name ("waitpid");
+ }
+ else if (ret > 0)
+ break;
+
+ ret = waitpid (to_wait_for, wstatp, WNOHANG | __WCLONE);
+
+ if (ret == -1)
+ {
+ if (errno != ECHILD)
+ perror_with_name ("waitpid (WCLONE)");
+ }
+ else if (ret > 0)
+ break;
+
+ usleep (1000);
+ }
+
+ if (debug_threads
+ && (!WIFSTOPPED (*wstatp)
+ || (WSTOPSIG (*wstatp) != 32
+ && WSTOPSIG (*wstatp) != 33)))
+ fprintf (stderr, "Got an event from %d (%x)\n", ret, *wstatp);
+
+ if (to_wait_for == -1)
+ *childp = (struct process_info *) find_inferior_id (&all_processes, ret);
+
+ (*childp)->stopped = 1;
+ (*childp)->pending_is_breakpoint = 0;
+
+ if (debug_threads
+ && WIFSTOPPED (*wstatp))
+ {
+ current_inferior = (struct thread_info *)
+ find_inferior_id (&all_threads, (*childp)->tid);
+ /* For testing only; i386_stop_pc prints out a diagnostic. */
+ if (the_low_target.get_pc != NULL)
+ get_stop_pc ();
+ }
+}
- if (pid != child_data->pid)
- perror_with_name ("wait");
+static int
+linux_wait_for_event (struct thread_info *child)
+{
+ CORE_ADDR stop_pc;
+ struct process_info *event_child;
+ int wstat;
+
+ /* Check for a process with a pending status. */
+ /* It is possible that the user changed the pending task's registers since
+ it stopped. We correctly handle the change of PC if we hit a breakpoint
+ (in check_removed_breakpoints); signals should be reported anyway. */
+ if (child == NULL)
+ {
+ event_child = (struct process_info *)
+ find_inferior (&all_processes, status_pending_p, NULL);
+ if (debug_threads && event_child)
+ fprintf (stderr, "Got a pending child %d\n", event_child->lwpid);
+ }
+ else
+ {
+ event_child = get_thread_process (child);
+ if (event_child->status_pending_p
+ && check_removed_breakpoint (event_child))
+ event_child = NULL;
+ }
- /* If this target supports breakpoints, see if we hit one. */
- if (the_low_target.stop_pc != NULL
- && WIFSTOPPED (wstat)
- && WSTOPSIG (wstat) == SIGTRAP)
+ if (event_child != NULL)
+ {
+ if (event_child->status_pending_p)
{
- CORE_ADDR stop_pc;
+ if (debug_threads)
+ fprintf (stderr, "Got an event from pending child %d (%04x)\n",
+ event_child->lwpid, event_child->status_pending);
+ wstat = event_child->status_pending;
+ event_child->status_pending_p = 0;
+ event_child->status_pending = 0;
+ current_inferior = get_process_thread (event_child);
+ return wstat;
+ }
+ }
+
+ /* We only enter this loop if no process has a pending wait status. Thus
+ any action taken in response to a wait status inside this loop is
+ responding as soon as we detect the status, not after any pending
+ events. */
+ while (1)
+ {
+ if (child == NULL)
+ event_child = NULL;
+ else
+ event_child = get_thread_process (child);
+
+ linux_wait_for_process (&event_child, &wstat);
+
+ if (event_child == NULL)
+ error ("event from unknown child");
- if (linux_bp_reinsert != 0)
+ current_inferior = (struct thread_info *)
+ find_inferior_id (&all_threads, event_child->tid);
+
+ if (using_threads)
+ {
+ /* Check for thread exit. */
+ if (! WIFSTOPPED (wstat))
{
- reinsert_breakpoint (linux_bp_reinsert);
- linux_bp_reinsert = 0;
- linux_resume (0, 0);
+ if (debug_threads)
+ fprintf (stderr, "Thread %d (LWP %d) exiting\n",
+ event_child->tid, event_child->head.id);
+
+ /* If the last thread is exiting, just return. */
+ if (all_threads.head == all_threads.tail)
+ return wstat;
+
+ dead_thread_notify (event_child->tid);
+
+ remove_inferior (&all_processes, &event_child->head);
+ free (event_child);
+ remove_thread (current_inferior);
+ current_inferior = (struct thread_info *) all_threads.head;
+
+ /* If we were waiting for this particular child to do something...
+ well, it did something. */
+ if (child != NULL)
+ return wstat;
+
+ /* Wait for a more interesting event. */
continue;
}
- fetch_inferior_registers (0);
- stop_pc = (*the_low_target.stop_pc) ();
+ if (WIFSTOPPED (wstat)
+ && WSTOPSIG (wstat) == SIGSTOP
+ && event_child->stop_expected)
+ {
+ if (debug_threads)
+ fprintf (stderr, "Expected stop.\n");
+ event_child->stop_expected = 0;
+ linux_resume_one_process (&event_child->head,
+ event_child->stepping, 0);
+ continue;
+ }
- if (check_breakpoints (stop_pc) != 0)
+ /* FIXME drow/2002-06-09: Get signal numbers from the inferior's
+ thread library? */
+ if (WIFSTOPPED (wstat)
+ && (WSTOPSIG (wstat) == SIGRTMIN
+ || WSTOPSIG (wstat) == SIGRTMIN + 1))
{
- if (the_low_target.set_pc != NULL)
- (*the_low_target.set_pc) (stop_pc);
+ if (debug_threads)
+ fprintf (stderr, "Ignored signal %d for %d (LWP %d).\n",
+ WSTOPSIG (wstat), event_child->tid,
+ event_child->head.id);
+ linux_resume_one_process (&event_child->head,
+ event_child->stepping,
+ WSTOPSIG (wstat));
+ continue;
+ }
+ }
- if (the_low_target.breakpoint_reinsert_addr == NULL)
- {
- linux_bp_reinsert = stop_pc;
- uninsert_breakpoint (stop_pc);
- linux_resume (1, 0);
- }
- else
- {
- reinsert_breakpoint_by_bp
- (stop_pc, (*the_low_target.breakpoint_reinsert_addr) ());
- linux_resume (0, 0);
- }
+ /* If this event was not handled above, and is not a SIGTRAP, report
+ it. */
+ if (!WIFSTOPPED (wstat) || WSTOPSIG (wstat) != SIGTRAP)
+ return wstat;
- continue;
+ /* If this target does not support breakpoints, we simply report the
+ SIGTRAP; it's of no concern to us. */
+ if (the_low_target.get_pc == NULL)
+ return wstat;
+
+ stop_pc = get_stop_pc ();
+
+ /* bp_reinsert will only be set if we were single-stepping.
+ Notice that we will resume the process after hitting
+ a gdbserver breakpoint; single-stepping to/over one
+ is not supported (yet). */
+ if (event_child->bp_reinsert != 0)
+ {
+ if (debug_threads)
+ fprintf (stderr, "Reinserted breakpoint.\n");
+ reinsert_breakpoint (event_child->bp_reinsert);
+ event_child->bp_reinsert = 0;
+
+ /* Clear the single-stepping flag and SIGTRAP as we resume. */
+ linux_resume_one_process (&event_child->head, 0, 0);
+ continue;
+ }
+
+ if (debug_threads)
+ fprintf (stderr, "Hit a (non-reinsert) breakpoint.\n");
+
+ if (check_breakpoints (stop_pc) != 0)
+ {
+ /* We hit one of our own breakpoints. We mark it as a pending
+ breakpoint, so that check_removed_breakpoints () will do the PC
+ adjustment for us at the appropriate time. */
+ event_child->pending_is_breakpoint = 1;
+ event_child->pending_stop_pc = stop_pc;
+
+ /* Now we need to put the breakpoint back. We continue in the event
+ loop instead of simply replacing the breakpoint right away,
+ in order to not lose signals sent to the thread that hit the
+ breakpoint. Unfortunately this increases the window where another
+ thread could sneak past the removed breakpoint. For the current
+ use of server-side breakpoints (thread creation) this is
+ acceptable; but it needs to be considered before this breakpoint
+ mechanism can be used in more general ways. For some breakpoints
+ it may be necessary to stop all other threads, but that should
+ be avoided where possible.
+
+ If breakpoint_reinsert_addr is NULL, that means that we can
+ use PTRACE_SINGLESTEP on this platform. Uninsert the breakpoint,
+ mark it for reinsertion, and single-step.
+
+ Otherwise, call the target function to figure out where we need
+ our temporary breakpoint, create it, and continue executing this
+ process. */
+ if (the_low_target.breakpoint_reinsert_addr == NULL)
+ {
+ event_child->bp_reinsert = stop_pc;
+ uninsert_breakpoint (stop_pc);
+ linux_resume_one_process (&event_child->head, 1, 0);
+ }
+ else
+ {
+ reinsert_breakpoint_by_bp
+ (stop_pc, (*the_low_target.breakpoint_reinsert_addr) ());
+ linux_resume_one_process (&event_child->head, 0, 0);
}
+
+ continue;
+ }
+
+ /* If we were single-stepping, we definitely want to report the
+ SIGTRAP. The single-step operation has completed, so also
+ clear the stepping flag; in general this does not matter,
+ because the SIGTRAP will be reported to the client, which
+ will give us a new action for this thread, but clear it for
+ consistency anyway. It's safe to clear the stepping flag
+ because the only consumer of get_stop_pc () after this point
+ is check_removed_breakpoints, and pending_is_breakpoint is not
+ set. It might be wiser to use a step_completed flag instead. */
+ if (event_child->stepping)
+ {
+ event_child->stepping = 0;
+ return wstat;
+ }
+
+ /* A SIGTRAP that we can't explain. It may have been a breakpoint.
+ Check if it is a breakpoint, and if so mark the process information
+ accordingly. This will handle both the necessary fiddling with the
+ PC on decr_pc_after_break targets and suppressing extra threads
+ hitting a breakpoint if two hit it at once and then GDB removes it
+ after the first is reported. Arguably it would be better to report
+ multiple threads hitting breakpoints simultaneously, but the current
+ remote protocol does not allow this. */
+ if ((*the_low_target.breakpoint_at) (stop_pc))
+ {
+ event_child->pending_is_breakpoint = 1;
+ event_child->pending_stop_pc = stop_pc;
}
return wstat;
}
+
/* NOTREACHED */
return 0;
}
-/* Wait for process, returns status */
+/* Wait for process, returns status. */
static unsigned char
linux_wait (char *status)
{
int w;
+ struct thread_info *child = NULL;
+
+retry:
+ /* If we were only supposed to resume one thread, only wait for
+ that thread - if it's still alive. If it died, however - which
+ can happen if we're coming from the thread death case below -
+ then we need to make sure we restart the other threads. We could
+ pick a thread at random or restart all; restarting all is less
+ arbitrary. */
+ if (cont_thread > 0)
+ {
+ child = (struct thread_info *) find_inferior_id (&all_threads,
+ cont_thread);
+
+ /* No stepping, no signal - unless one is pending already, of course. */
+ if (child == NULL)
+ linux_resume (0, 0);
+ }
enable_async_io ();
- w = linux_wait_for_one_inferior (current_inferior);
+ w = linux_wait_for_event (child);
+ stop_all_processes ();
disable_async_io ();
- if (WIFEXITED (w))
+ /* If we are waiting for a particular child, and it exited,
+ linux_wait_for_event will return its exit status. Similarly if
+ the last child exited. If this is not the last child, however,
+ do not report it as exited until there is a 'thread exited' response
+ available in the remote protocol. Instead, just wait for another event.
+ This should be safe, because if the thread crashed we will already
+ have reported the termination signal to GDB; that should stop any
+ in-progress stepping operations, etc.
+
+ Report the exit status of the last thread to exit. This matches
+ LinuxThreads' behavior. */
+
+ if (all_threads.head == all_threads.tail)
{
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- clear_inferiors ();
- return ((unsigned char) WEXITSTATUS (w));
+ if (WIFEXITED (w))
+ {
+ fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
+ *status = 'W';
+ clear_inferiors ();
+ return ((unsigned char) WEXITSTATUS (w));
+ }
+ else if (!WIFSTOPPED (w))
+ {
+ fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
+ clear_inferiors ();
+ *status = 'X';
+ return ((unsigned char) WTERMSIG (w));
+ }
}
- else if (!WIFSTOPPED (w))
+ else
{
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- clear_inferiors ();
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
+ if (!WIFSTOPPED (w))
+ goto retry;
}
- fetch_inferior_registers (0);
-
*status = 'T';
return ((unsigned char) WSTOPSIG (w));
}
+static void
+send_sigstop (struct inferior_list_entry *entry)
+{
+ struct process_info *process = (struct process_info *) entry;
+
+ if (process->stopped)
+ return;
+
+ /* If we already have a pending stop signal for this process, don't
+ send another. */
+ if (process->stop_expected)
+ {
+ process->stop_expected = 0;
+ return;
+ }
+
+ if (debug_threads)
+ fprintf (stderr, "Sending sigstop to process %d\n", process->head.id);
+
+ kill (process->head.id, SIGSTOP);
+ process->sigstop_sent = 1;
+}
+
+static void
+wait_for_sigstop (struct inferior_list_entry *entry)
+{
+ struct process_info *process = (struct process_info *) entry;
+ struct thread_info *saved_inferior, *thread;
+ int wstat, saved_tid;
+
+ if (process->stopped)
+ return;
+
+ saved_inferior = current_inferior;
+ saved_tid = ((struct inferior_list_entry *) saved_inferior)->id;
+ thread = (struct thread_info *) find_inferior_id (&all_threads,
+ process->tid);
+ wstat = linux_wait_for_event (thread);
+
+ /* If we stopped with a non-SIGSTOP signal, save it for later
+ and record the pending SIGSTOP. If the process exited, just
+ return. */
+ if (WIFSTOPPED (wstat)
+ && WSTOPSIG (wstat) != SIGSTOP)
+ {
+ if (debug_threads)
+ fprintf (stderr, "Stopped with non-sigstop signal\n");
+ process->status_pending_p = 1;
+ process->status_pending = wstat;
+ process->stop_expected = 1;
+ }
+
+ if (linux_thread_alive (saved_tid))
+ current_inferior = saved_inferior;
+ else
+ {
+ if (debug_threads)
+ fprintf (stderr, "Previously current thread died.\n");
+
+ /* Set a valid thread as current. */
+ set_desired_inferior (0);
+ }
+}
+
+static void
+stop_all_processes (void)
+{
+ stopping_threads = 1;
+ for_each_inferior (&all_processes, send_sigstop);
+ for_each_inferior (&all_processes, wait_for_sigstop);
+ stopping_threads = 0;
+}
+
/* Resume execution of the inferior process.
If STEP is nonzero, single-step it.
If SIGNAL is nonzero, give it that signal. */
static void
-linux_resume (int step, int signal)
+linux_resume_one_process (struct inferior_list_entry *entry,
+ int step, int signal)
{
+ struct process_info *process = (struct process_info *) entry;
+ struct thread_info *saved_inferior;
+
+ if (process->stopped == 0)
+ return;
+
+ /* If we have pending signals or status, and a new signal, enqueue the
+ signal. Also enqueue the signal if we are waiting to reinsert a
+ breakpoint; it will be picked up again below. */
+ if (signal != 0
+ && (process->status_pending_p || process->pending_signals != NULL
+ || process->bp_reinsert != 0))
+ {
+ struct pending_signals *p_sig;
+ p_sig = malloc (sizeof (*p_sig));
+ p_sig->prev = process->pending_signals;
+ p_sig->signal = signal;
+ process->pending_signals = p_sig;
+ }
+
+ if (process->status_pending_p)
+ return;
+
+ saved_inferior = current_inferior;
+ current_inferior = get_process_thread (process);
+
+ if (debug_threads)
+ fprintf (stderr, "Resuming process %d (%s, signal %d, stop %s)\n", inferior_pid,
+ step ? "step" : "continue", signal,
+ process->stop_expected ? "expected" : "not expected");
+
+ /* This bit needs some thinking about. If we get a signal that
+ we must report while a single-step reinsert is still pending,
+ we often end up resuming the thread. It might be better to
+ (ew) allow a stack of pending events; then we could be sure that
+ the reinsert happened right away and not lose any signals.
+
+ Making this stack would also shrink the window in which breakpoints are
+ uninserted (see comment in linux_wait_for_process) but not enough for
+ complete correctness, so it won't solve that problem. It may be
+ worthwhile just to solve this one, however. */
+ if (process->bp_reinsert != 0)
+ {
+ if (debug_threads)
+ fprintf (stderr, " pending reinsert at %08lx", (long)process->bp_reinsert);
+ if (step == 0)
+ fprintf (stderr, "BAD - reinserting but not stepping.\n");
+ step = 1;
+
+ /* Postpone any pending signal. It was enqueued above. */
+ signal = 0;
+ }
+
+ check_removed_breakpoint (process);
+
+ if (debug_threads && the_low_target.get_pc != NULL)
+ {
+ fprintf (stderr, " ");
+ (long) (*the_low_target.get_pc) ();
+ }
+
+ /* If we have pending signals, consume one unless we are trying to reinsert
+ a breakpoint. */
+ if (process->pending_signals != NULL && process->bp_reinsert == 0)
+ {
+ struct pending_signals **p_sig;
+
+ p_sig = &process->pending_signals;
+ while ((*p_sig)->prev != NULL)
+ p_sig = &(*p_sig)->prev;
+
+ signal = (*p_sig)->signal;
+ free (*p_sig);
+ *p_sig = NULL;
+ }
+
+ regcache_invalidate_one ((struct inferior_list_entry *)
+ get_process_thread (process));
errno = 0;
- ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
+ process->stopped = 0;
+ process->stepping = step;
+ ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, process->lwpid, 0, signal);
+
+ current_inferior = saved_inferior;
if (errno)
perror_with_name ("ptrace");
}
+/* This function is called once per process other than the first
+ one. The first process we are told the signal to continue
+ with, and whether to step or continue; for all others, any
+ existing signals will be marked in status_pending_p to be
+ reported momentarily, and we preserve the stepping flag. */
+static void
+linux_continue_one_process (struct inferior_list_entry *entry)
+{
+ struct process_info *process;
-#ifdef HAVE_LINUX_USRREGS
+ process = (struct process_info *) entry;
+ linux_resume_one_process (entry, process->stepping, 0);
+}
+
+static void
+linux_resume (int step, int signal)
+{
+ struct process_info *process;
+
+ process = get_thread_process (current_inferior);
+
+ /* If the current process has a status pending, this signal will
+ be enqueued and sent later. */
+ linux_resume_one_process (&process->head, step, signal);
-#define REGISTER_RAW_SIZE(regno) register_size((regno))
+ if (cont_thread == 0 || cont_thread == -1)
+ for_each_inferior (&all_processes, linux_continue_one_process);
+}
+
+#ifdef HAVE_LINUX_USRREGS
int
register_addr (int regnum)
{
CORE_ADDR regaddr;
register int i;
+ char *buf;
if (regno >= the_low_target.num_regs)
return;
regaddr = register_addr (regno);
if (regaddr == -1)
return;
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ buf = alloca (register_size (regno));
+ for (i = 0; i < register_size (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
- *(PTRACE_XFER_TYPE *) (register_data (regno) + i) =
+ *(PTRACE_XFER_TYPE *) (buf + i) =
ptrace (PTRACE_PEEKUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, 0);
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
goto error_exit;
}
}
+ supply_register (regno, buf);
+
error_exit:;
}
{
CORE_ADDR regaddr;
int i;
+ char *buf;
if (regno >= 0)
{
if (regaddr == -1)
return;
errno = 0;
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ buf = alloca (register_size (regno));
+ collect_register (regno, buf);
+ for (i = 0; i < register_size (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) (register_data (regno) + i));
+ *(int *) (buf + i));
if (errno != 0)
{
if ((*the_low_target.cannot_store_register) (regno) == 0)
}
else
for (regno = 0; regno < the_low_target.num_regs; regno++)
- store_inferior_registers (regno);
+ usr_store_inferior_registers (regno);
}
#endif /* HAVE_LINUX_USRREGS */
#ifdef HAVE_LINUX_REGSETS
static int
-regsets_fetch_inferior_registers (void)
+regsets_fetch_inferior_registers ()
{
struct regset_info *regset;
}
else
{
- perror ("Warning: ptrace(regsets_fetch_inferior_registers)");
+ char s[256];
+ sprintf (s, "ptrace(regsets_fetch_inferior_registers) PID=%d",
+ inferior_pid);
+ perror (s);
}
}
regset->store_function (buf);
}
static int
-regsets_store_inferior_registers (void)
+regsets_store_inferior_registers ()
{
struct regset_info *regset;
register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
extern int errno;
+ if (debug_threads)
+ {
+ fprintf (stderr, "Writing %02x to %08lx\n", (unsigned)myaddr[0], (long)memaddr);
+ }
+
/* Fill start and end extra bytes of buffer with existing memory data. */
buffer[0] = ptrace (PTRACE_PEEKTEXT, inferior_pid,
static void
linux_look_up_symbols (void)
{
- /* Don't need to look up any symbols yet. */
+#ifdef USE_THREAD_DB
+ if (using_threads)
+ return;
+
+ using_threads = thread_db_init ();
+#endif
+}
+
+/* Return 1 if this process is not stopped. */
+static int
+unstopped_p (struct inferior_list_entry *entry, void *dummy)
+{
+ struct process_info *process = (struct process_info *) entry;
+
+ if (process->stopped)
+ return 0;
+
+ return 1;
+}
+
+static int
+linux_signal_pid ()
+{
+ struct inferior_list_entry *process;
+
+ process = find_inferior (&all_processes, unstopped_p, NULL);
+
+ if (process == NULL)
+ {
+ warning ("no unstopped process");
+ return inferior_pid;
+ }
+
+ return pid_of ((struct process_info *) process);
}
\f
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
+ linux_signal_pid,
};
+static void
+linux_init_signals ()
+{
+ /* FIXME drow/2002-06-09: As above, we should check with LinuxThreads
+ to find what the cancel signal actually is. */
+ signal (SIGRTMIN+1, SIG_IGN);
+}
+
void
initialize_low (void)
{
+ using_threads = 0;
set_target_ops (&linux_target_ops);
set_breakpoint_data (the_low_target.breakpoint,
the_low_target.breakpoint_len);
init_registers ();
+ linux_init_signals ();
}
Boston, MA 02111-1307, USA. */
#ifdef HAVE_LINUX_REGSETS
-typedef void (*regset_func) (void *);
+typedef void (*regset_fill_func) (void *);
+typedef void (*regset_store_func) (const void *);
+enum regset_type {
+ GENERAL_REGS,
+ FP_REGS,
+ EXTENDED_REGS,
+};
+
struct regset_info
{
int get_request, set_request;
int size;
- regset_func fill_function, store_function;
+ enum regset_type type;
+ regset_fill_func fill_function;
+ regset_store_func store_function;
};
extern struct regset_info target_regsets[];
#endif
store the register, and 2 if failure to store the register
is acceptable. */
int (*cannot_store_register) (int);
- CORE_ADDR (*stop_pc) (void);
+ CORE_ADDR (*get_pc) (void);
void (*set_pc) (CORE_ADDR newpc);
const char *breakpoint;
int breakpoint_len;
CORE_ADDR (*breakpoint_reinsert_addr) (void);
+
+
+ int decr_pc_after_break;
+ int (*breakpoint_at) (CORE_ADDR pc);
};
extern struct linux_target_ops the_low_target;
+
+#define get_process(inf) ((struct process_info *)(inf))
+#define get_thread_process(thr) (get_process (inferior_target_data (thr)))
+#define get_process_thread(proc) ((struct thread_info *) \
+ find_inferior_id (&all_threads, \
+ get_process (proc)->tid))
+
+struct process_info
+{
+ struct inferior_list_entry head;
+ int thread_known;
+ int lwpid;
+ int tid;
+
+ /* If this flag is set, the next SIGSTOP will be ignored (the process will
+ be immediately resumed). */
+ int stop_expected;
+
+ /* If this flag is set, the process is known to be stopped right now (stop
+ event already received in a wait()). */
+ int stopped;
+
+ /* If this flag is set, we have sent a SIGSTOP to this process and are
+ waiting for it to stop. */
+ int sigstop_sent;
+
+ /* If this flag is set, STATUS_PENDING is a waitstatus that has not yet
+ been reported. */
+ int status_pending_p;
+ int status_pending;
+
+ /* If this flag is set, the pending status is a (GDB-placed) breakpoint. */
+ int pending_is_breakpoint;
+ CORE_ADDR pending_stop_pc;
+
+ /* If this is non-zero, it is a breakpoint to be reinserted at our next
+ stop (SIGTRAP stops only). */
+ CORE_ADDR bp_reinsert;
+
+ /* If this flag is set, the last continue operation on this process
+ was a single-step. */
+ int stepping;
+
+ /* If this is non-zero, it points to a chain of signals which need to
+ be delivered to this process. */
+ struct pending_signals *pending_signals;
+};
+extern struct inferior_list all_processes;
+
+void linux_attach_lwp (int pid, int tid);
+
+int thread_db_init (void);
return 0;
}
+static CORE_ADDR
+mips_get_pc ()
+{
+ unsigned long pc;
+ collect_register_by_name ("pc", &pc);
+ return pc;
+}
+
+static void
+mips_set_pc (CORE_ADDR pc)
+{
+ unsigned long newpc = pc;
+ supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness. */
+static const unsigned long mips_breakpoint = 0x0005000d;
+#define mips_breakpoint_len 4
+
+/* We only place breakpoints in empty marker functions, and thread locking
+ is outside of the function. So rather than importing software single-step,
+ we can just run until exit. */
+static CORE_ADDR
+mips_reinsert_addr ()
+{
+ unsigned long pc;
+ collect_register_by_name ("ra", &pc);
+ return pc;
+}
+
+static int
+mips_breakpoint_at (CORE_ADDR where)
+{
+ unsigned long insn;
+
+ (*the_target->read_memory) (where, (char *) &insn, 4);
+ if (insn == mips_breakpoint)
+ return 1;
+
+ /* If necessary, recognize more trap instructions here. GDB only uses the
+ one. */
+ return 0;
+}
+
struct linux_target_ops the_low_target = {
mips_num_regs,
mips_regmap,
mips_cannot_fetch_register,
mips_cannot_store_register,
+ mips_get_pc,
+ mips_set_pc,
+ (const char *) &mips_breakpoint,
+ mips_breakpoint_len,
+ mips_reinsert_addr,
+ 0,
+ mips_breakpoint_at,
};
return 0;
}
+static CORE_ADDR
+ppc_get_pc (void)
+{
+ unsigned long pc;
+
+ collect_register_by_name ("pc", &pc);
+ return (CORE_ADDR) pc;
+}
+
+static void
+ppc_set_pc (CORE_ADDR pc)
+{
+ unsigned long newpc = pc;
+
+ supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness. Note that this file is
+ for PowerPC only, not PowerPC64.
+ This instruction is "twge r2, r2", which GDB uses as a software
+ breakpoint. */
+static const unsigned long ppc_breakpoint = 0x7d821008;
+#define ppc_breakpoint_len 4
+
+static int
+ppc_breakpoint_at (CORE_ADDR where)
+{
+ unsigned long insn;
+
+ (*the_target->read_memory) (where, (char *) &insn, 4);
+ if (insn == ppc_breakpoint)
+ return 1;
+ /* If necessary, recognize more trap instructions here. GDB only uses the
+ one. */
+ return 0;
+}
+
struct linux_target_ops the_low_target = {
ppc_num_regs,
ppc_regmap,
ppc_cannot_fetch_register,
ppc_cannot_store_register,
+ ppc_get_pc,
+ ppc_set_pc,
+ (const char *) &ppc_breakpoint,
+ ppc_breakpoint_len,
+ NULL,
+ 0,
+ ppc_breakpoint_at,
};
return 0;
}
+static CORE_ADDR
+sh_get_pc ()
+{
+ unsigned long pc;
+ collect_register_by_name ("pc", &pc);
+ return pc;
+}
+
+static void
+sh_set_pc (CORE_ADDR pc)
+{
+ unsigned long newpc = pc;
+ supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness, obviously. */
+static const unsigned short sh_breakpoint = 0xc3c3;
+#define sh_breakpoint_len 2
+
+static int
+sh_breakpoint_at (CORE_ADDR where)
+{
+ unsigned short insn;
+
+ (*the_target->read_memory) (where, (char *) &insn, 2);
+ if (insn == sh_breakpoint)
+ return 1;
+
+ /* If necessary, recognize more trap instructions here. GDB only uses the
+ one. */
+ return 0;
+}
+
struct linux_target_ops the_low_target = {
sh_num_regs,
sh_regmap,
sh_cannot_fetch_register,
sh_cannot_store_register,
+ sh_get_pc,
+ sh_set_pc,
+ (const char *) &sh_breakpoint,
+ sh_breakpoint_len,
+ NULL,
+ 0,
+ sh_breakpoint_at,
};
struct regset_info target_regsets[] = {
{ PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
+ GENERAL_REGS,
x86_64_fill_gregset, x86_64_store_gregset },
{ PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof (elf_fpregset_t),
+ FP_REGS,
x86_64_fill_fpregset, x86_64_store_fpregset },
- { 0, 0, -1, NULL, NULL }
+ { 0, 0, -1, -1, NULL, NULL }
};
struct linux_target_ops the_low_target = {
#include <stdlib.h>
#include <string.h>
+/* The private data for the register cache. Note that we have one
+ per inferior; this is primarily for simplicity, as the performance
+ benefit is minimal. */
+
struct inferior_regcache_data
{
+ int registers_valid;
char *registers;
};
const char **gdbserver_expedite_regs;
static struct inferior_regcache_data *
-get_regcache (struct inferior_info *inf)
+get_regcache (struct thread_info *inf, int fetch)
{
struct inferior_regcache_data *regcache;
if (regcache == NULL)
fatal ("no register cache");
+ /* FIXME - fetch registers for INF */
+ if (fetch && regcache->registers_valid == 0)
+ {
+ fetch_inferior_registers (0);
+ regcache->registers_valid = 1;
+ }
+
return regcache;
}
+void
+regcache_invalidate_one (struct inferior_list_entry *entry)
+{
+ struct thread_info *thread = (struct thread_info *) entry;
+ struct inferior_regcache_data *regcache;
+
+ regcache = (struct inferior_regcache_data *) inferior_regcache_data (thread);
+
+ if (regcache->registers_valid)
+ {
+ struct thread_info *saved_inferior = current_inferior;
+
+ current_inferior = thread;
+ store_inferior_registers (-1);
+ current_inferior = saved_inferior;
+ }
+
+ regcache->registers_valid = 0;
+}
+
+void
+regcache_invalidate ()
+{
+ for_each_inferior (&all_threads, regcache_invalidate_one);
+}
+
int
registers_length (void)
{
return 2 * register_bytes;
}
-void
-create_register_cache (struct inferior_info *inferior)
+void *
+new_register_cache (void)
{
struct inferior_regcache_data *regcache;
if (regcache->registers == NULL)
fatal ("Could not allocate register cache.");
- set_inferior_regcache_data (inferior, regcache);
+ regcache->registers_valid = 0;
+
+ return regcache;
}
void
-free_register_cache (struct inferior_info *inferior)
+free_register_cache (void *regcache_p)
{
- free (get_regcache (current_inferior)->registers);
- free (get_regcache (current_inferior));
- set_inferior_regcache_data (inferior, NULL);
+ struct inferior_regcache_data *regcache
+ = (struct inferior_regcache_data *) regcache_p;
+
+ free (regcache->registers);
+ free (regcache);
}
void
void
registers_to_string (char *buf)
{
- char *registers = get_regcache (current_inferior)->registers;
+ char *registers = get_regcache (current_inferior, 1)->registers;
convert_int_to_ascii (registers, buf, register_bytes);
}
registers_from_string (char *buf)
{
int len = strlen (buf);
- char *registers = get_regcache (current_inferior)->registers;
+ char *registers = get_regcache (current_inferior, 1)->registers;
if (len != register_bytes * 2)
{
return reg_defs[n].size / 8;
}
-char *
-register_data (int n)
+static char *
+register_data (int n, int fetch)
{
- char *registers = get_regcache (current_inferior)->registers;
+ char *registers = get_regcache (current_inferior, fetch)->registers;
return registers + (reg_defs[n].offset / 8);
}
void
supply_register (int n, const void *buf)
{
- memcpy (register_data (n), buf, register_size (n));
+ memcpy (register_data (n, 0), buf, register_size (n));
}
void
void
collect_register (int n, void *buf)
{
- memcpy (buf, register_data (n), register_size (n));
+ memcpy (buf, register_data (n, 1), register_size (n));
+}
+
+void
+collect_register_as_string (int n, char *buf)
+{
+ convert_int_to_ascii (register_data (n, 1), buf, register_size (n));
}
void
#ifndef REGCACHE_H
#define REGCACHE_H
-struct inferior_info;
+struct inferior_list_entry;
/* Create a new register cache for INFERIOR. */
-void create_register_cache (struct inferior_info *inferior);
+void *new_register_cache (void);
/* Release all memory associated with the register cache for INFERIOR. */
-void free_register_cache (struct inferior_info *inferior);
+void free_register_cache (void *regcache);
+
+/* Invalidate cached registers for one or all threads. */
+
+void regcache_invalidate_one (struct inferior_list_entry *);
+void regcache_invalidate (void);
/* Convert all registers to a string in the currently specified remote
format. */
struct reg *find_register_by_number (int n);
-char *register_data (int n);
-
int register_size (int n);
int find_regno (const char *name);
void collect_register (int n, void *buf);
+void collect_register_as_string (int n, char *buf);
+
void collect_register_by_name (const char *name, void *buf);
#endif /* REGCACHE_H */
static int remote_desc;
+/* FIXME headerize? */
+extern int using_threads;
+extern int debug_threads;
+
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
}
if (remote_debug)
- printf ("putpkt (\"%s\"); [looking for ack]\n", buf2);
+ {
+ fprintf (stderr, "putpkt (\"%s\"); [looking for ack]\n", buf2);
+ fflush (stderr);
+ }
cc = read (remote_desc, buf3, 1);
if (remote_debug)
- printf ("[received '%c' (0x%x)]\n", buf3[0], buf3[0]);
+ {
+ fprintf (stderr, "[received '%c' (0x%x)]\n", buf3[0], buf3[0]);
+ fflush (stderr);
+ }
+
if (cc <= 0)
{
if (cc == 0)
free (buf2);
return -1;
}
+
+ /* Check for an input interrupt while we're here. */
+ if (buf3[0] == '\003')
+ kill ((*the_target->signal_pid) (), SIGINT);
}
while (buf3[0] != '+');
return;
}
- kill (signal_pid, SIGINT);
+ kill ((*the_target->signal_pid) (), SIGINT);
}
}
if (c == '$')
break;
if (remote_debug)
- printf ("[getpkt: discarding char '%c']\n", c);
+ {
+ fprintf (stderr, "[getpkt: discarding char '%c']\n", c);
+ fflush (stderr);
+ }
+
if (c < 0)
return -1;
}
}
if (remote_debug)
- printf ("getpkt (\"%s\"); [sending ack] \n", buf);
+ {
+ fprintf (stderr, "getpkt (\"%s\"); [sending ack] \n", buf);
+ fflush (stderr);
+ }
write (remote_desc, "+", 1);
if (remote_debug)
- printf ("[sent ack]\n");
+ {
+ fprintf (stderr, "[sent ack]\n");
+ fflush (stderr);
+ }
+
return bp - buf;
}
static char *
outreg (int regno, char *buf)
{
- int regsize = register_size (regno);
-
if ((regno >> 12) != 0)
*buf++ = tohex ((regno >> 12) & 0xf);
if ((regno >> 8) != 0)
*buf++ = tohex ((regno >> 4) & 0xf);
*buf++ = tohex (regno & 0xf);
*buf++ = ':';
- convert_int_to_ascii (register_data (regno), buf, regsize);
- buf += 2 * regsize;
+ collect_register_as_string (regno, buf);
+ buf += 2 * register_size (regno);
*buf++ = ';';
return buf;
}
+void
+new_thread_notify (int id)
+{
+ char own_buf[256];
+
+ /* The `n' response is not yet part of the remote protocol. Do nothing. */
+ if (1)
+ return;
+
+ if (server_waiting == 0)
+ return;
+
+ sprintf (own_buf, "n%x", id);
+ disable_async_io ();
+ putpkt (own_buf);
+ enable_async_io ();
+}
+
+void
+dead_thread_notify (int id)
+{
+ char own_buf[256];
+
+ /* The `x' response is not yet part of the remote protocol. Do nothing. */
+ if (1)
+ return;
+
+ sprintf (own_buf, "x%x", id);
+ disable_async_io ();
+ putpkt (own_buf);
+ enable_async_io ();
+}
+
void
prepare_resume_reply (char *buf, char status, unsigned char signo)
{
regp ++;
}
- /* If the debugger hasn't used any thread features, don't burden it with
- threads. If we didn't check this, GDB 4.13 and older would choke. */
- if (cont_thread != 0)
+ /* Formerly, if the debugger had not used any thread features we would not
+ burden it with a thread status response. This was for the benefit of
+ GDB 4.13 and older. However, in recent GDB versions the check
+ (``if (cont_thread != 0)'') does not have the desired effect because of
+ sillyness in the way that the remote protocol handles specifying a thread.
+ Since thread support relies on qSymbol support anyway, assume GDB can handle
+ threads. */
+
+ if (using_threads)
{
+ /* FIXME right place to set this? */
+ thread_from_wait = ((struct inferior_list_entry *)current_inferior)->id;
+ if (debug_threads)
+ fprintf (stderr, "Writing resume reply for %d\n\n", thread_from_wait);
if (old_thread_from_wait != thread_from_wait)
{
+ general_thread = thread_from_wait;
sprintf (buf, "thread:%x;", thread_from_wait);
buf += strlen (buf);
old_thread_from_wait = thread_from_wait;
{
/* Malformed response. */
if (remote_debug)
- fprintf (stderr, "Malformed response to qSymbol, ignoring.\n");
+ {
+ fprintf (stderr, "Malformed response to qSymbol, ignoring.\n");
+ fflush (stderr);
+ }
+
return -1;
}
int cont_thread;
int general_thread;
+int step_thread;
int thread_from_wait;
int old_thread_from_wait;
int extended_protocol;
+int server_waiting;
+
jmp_buf toplevel;
static unsigned char
{
/* FIXME Check error? Or turn to void. */
create_inferior (argv[0], argv);
- /* FIXME Print pid properly. */
- fprintf (stderr, "Process %s created; pid = %d\n", argv[0], signal_pid);
+
+ fprintf (stderr, "Process %s created; pid = %d\n", argv[0],
+ all_threads.head->id);
/* Wait till we are at 1st instruction in program, return signal number. */
- return mywait (statusptr);
+ return mywait (statusptr, 0);
}
static int
if (myattach (pid) != 0)
return -1;
- *sigptr = mywait (statusptr);
+ *sigptr = mywait (statusptr, 0);
return 0;
}
void
handle_query (char *own_buf)
{
+ static struct inferior_list_entry *thread_ptr;
+
if (strcmp ("qSymbol::", own_buf) == 0)
{
if (the_target->look_up_symbols != NULL)
return;
}
+ if (strcmp ("qfThreadInfo", own_buf) == 0)
+ {
+ thread_ptr = all_threads.head;
+ sprintf (own_buf, "m%x", thread_ptr->id);
+ thread_ptr = thread_ptr->next;
+ return;
+ }
+
+ if (strcmp ("qsThreadInfo", own_buf) == 0)
+ {
+ if (thread_ptr != NULL)
+ {
+ sprintf (own_buf, "m%x", thread_ptr->id);
+ thread_ptr = thread_ptr->next;
+ return;
+ }
+ else
+ {
+ sprintf (own_buf, "l");
+ return;
+ }
+ }
+
/* Otherwise we didn't know what packet it was. Say we didn't
understand it. */
own_buf[0] = 0;
case 'g':
general_thread = strtol (&own_buf[2], NULL, 16);
write_ok (own_buf);
- fetch_inferior_registers (0);
+ set_desired_inferior (1);
break;
case 'c':
cont_thread = strtol (&own_buf[2], NULL, 16);
write_ok (own_buf);
break;
+ case 's':
+ step_thread = strtol (&own_buf[2], NULL, 16);
+ write_ok (own_buf);
+ break;
default:
/* Silently ignore it so that gdb can extend the protocol
without compatibility headaches. */
}
break;
case 'g':
+ set_desired_inferior (1);
registers_to_string (own_buf);
break;
case 'G':
+ set_desired_inferior (1);
registers_from_string (&own_buf[1]);
- store_inferior_registers (-1);
write_ok (own_buf);
break;
case 'm':
signal = target_signal_to_host (sig);
else
signal = 0;
+ set_desired_inferior (0);
myresume (0, signal);
- signal = mywait (&status);
+ signal = mywait (&status, 1);
prepare_resume_reply (own_buf, status, signal);
break;
case 'S':
signal = target_signal_to_host (sig);
else
signal = 0;
+ set_desired_inferior (0);
myresume (1, signal);
- signal = mywait (&status);
+ signal = mywait (&status, 1);
prepare_resume_reply (own_buf, status, signal);
break;
case 'c':
+ set_desired_inferior (0);
myresume (0, 0);
- signal = mywait (&status);
+ signal = mywait (&status, 1);
prepare_resume_reply (own_buf, status, signal);
break;
case 's':
+ set_desired_inferior (0);
myresume (1, 0);
- signal = mywait (&status);
+ signal = mywait (&status, 1);
prepare_resume_reply (own_buf, status, signal);
break;
case 'k':
least the size of a (void *). */
typedef long long CORE_ADDR;
-/* Opaque inferior process information. */
-struct inferior_info;
+/* Generic information for tracking a list of ``inferiors'' - threads,
+ processes, etc. */
+struct inferior_list
+{
+ struct inferior_list_entry *head;
+ struct inferior_list_entry *tail;
+};
+struct inferior_list_entry
+{
+ int id;
+ struct inferior_list_entry *next;
+};
+
+/* Opaque type for user-visible threads. */
+struct thread_info;
#include "regcache.h"
#include "gdb/signals.h"
void initialize_low ();
-/* Target-specific variables */
-
-extern char *registers;
-
/* From inferiors.c. */
-extern struct inferior_info *current_inferior;
-extern int signal_pid;
-void add_inferior (int pid);
+extern struct inferior_list all_threads;
+void add_inferior_to_list (struct inferior_list *list,
+ struct inferior_list_entry *new_inferior);
+void for_each_inferior (struct inferior_list *list,
+ void (*action) (struct inferior_list_entry *));
+extern struct thread_info *current_inferior;
+void remove_inferior (struct inferior_list *list,
+ struct inferior_list_entry *entry);
+void remove_thread (struct thread_info *thread);
+void add_thread (int thread_id, void *target_data);
void clear_inferiors (void);
-void *inferior_target_data (struct inferior_info *);
-void set_inferior_target_data (struct inferior_info *, void *);
-void *inferior_regcache_data (struct inferior_info *);
-void set_inferior_regcache_data (struct inferior_info *, void *);
+struct inferior_list_entry *find_inferior
+ (struct inferior_list *,
+ int (*func) (struct inferior_list_entry *,
+ void *),
+ void *arg);
+struct inferior_list_entry *find_inferior_id (struct inferior_list *list,
+ int id);
+void *inferior_target_data (struct thread_info *);
+void set_inferior_target_data (struct thread_info *, void *);
+void *inferior_regcache_data (struct thread_info *);
+void set_inferior_regcache_data (struct thread_info *, void *);
+void change_inferior_id (struct inferior_list *list,
+ int new_id);
/* Public variables in server.c */
extern int cont_thread;
extern int general_thread;
+extern int step_thread;
extern int thread_from_wait;
extern int old_thread_from_wait;
+extern int server_waiting;
extern jmp_buf toplevel;
void disable_async_io (void);
void convert_ascii_to_int (char *from, char *to, int n);
void convert_int_to_ascii (char *from, char *to, int n);
+void new_thread_notify (int id);
+void dead_thread_notify (int id);
void prepare_resume_reply (char *buf, char status, unsigned char sig);
void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
struct target_ops *the_target;
+void
+set_desired_inferior (int use_general)
+{
+ struct thread_info *found;
+
+ if (use_general == 1)
+ {
+ found = (struct thread_info *) find_inferior_id (&all_threads,
+ general_thread);
+ }
+ else
+ {
+ found = NULL;
+
+ /* If we are continuing any (all) thread(s), use step_thread
+ to decide which thread to step and/or send the specified
+ signal to. */
+ if (step_thread > 0 && (cont_thread == 0 || cont_thread == -1))
+ found = (struct thread_info *) find_inferior_id (&all_threads,
+ step_thread);
+
+ if (found == NULL)
+ found = (struct thread_info *) find_inferior_id (&all_threads,
+ cont_thread);
+ }
+
+ if (found == NULL)
+ current_inferior = (struct thread_info *) all_threads.head;
+ else
+ current_inferior = found;
+}
+
void
read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
}
int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
+write_inferior_memory (CORE_ADDR memaddr, const char *myaddr, int len)
+{
+ /* Lacking cleanups, there is some potential for a memory leak if the
+ write fails and we go through error(). Make sure that no more than
+ one buffer is ever pending by making BUFFER static. */
+ static char *buffer = 0;
+ int res;
+
+ if (buffer != NULL)
+ free (buffer);
+
+ buffer = malloc (len);
+ memcpy (buffer, myaddr, len);
+ check_mem_write (memaddr, buffer, len);
+ res = (*the_target->write_memory) (memaddr, buffer, len);
+ free (buffer);
+ buffer = NULL;
+
+ return res;
+}
+
+unsigned char
+mywait (char *statusp, int connected_wait)
{
- check_mem_write (memaddr, myaddr, len);
- return (*the_target->write_memory) (memaddr, myaddr, len);
+ unsigned char ret;
+
+ if (connected_wait)
+ server_waiting = 1;
+
+ ret = (*the_target->wait) (statusp);
+
+ if (connected_wait)
+ server_waiting = 0;
+
+ return ret;
}
void
symbols. */
void (*look_up_symbols) (void);
+
+ /* Return the PID we should send a signal to. Used for asynchronous
+ interrupts (user hitting Control-C). */
+
+ int (*signal_pid) (void);
};
extern struct target_ops *the_target;
#define myresume(step,signo) \
(*the_target->resume) (step, signo)
-#define mywait(statusp) \
- (*the_target->wait) (statusp)
-
#define fetch_inferior_registers(regno) \
(*the_target->fetch_registers) (regno)
#define store_inferior_registers(regno) \
(*the_target->store_registers) (regno)
+unsigned char mywait (char *statusp, int connected_wait);
+
void read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
-int write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
+int write_inferior_memory (CORE_ADDR memaddr, const char *myaddr, int len);
+
+void set_desired_inferior (int id);
#endif /* TARGET_H */
static void cfront_mangle_name (struct type *, int, int);
#endif
static void print_bit_vector (B_TYPE *, int);
-static void print_arg_types (struct type **, int);
+static void print_arg_types (struct field *, int, int);
static void dump_fn_fieldlists (struct type *, int);
static void print_cplus_stuff (struct type *, int);
static void virtual_base_list_aux (struct type *dclass);
TYPE_OBJFILE (type));
TYPE_TARGET_TYPE (mtype) = type;
/* _DOMAIN_TYPE (mtype) = unknown yet */
- /* _ARG_TYPES (mtype) = unknown yet */
return (mtype);
}
void
smash_to_method_type (struct type *type, struct type *domain,
- struct type *to_type, struct type **args)
+ struct type *to_type, struct field *args,
+ int nargs, int varargs)
{
struct objfile *objfile;
TYPE_OBJFILE (type) = objfile;
TYPE_TARGET_TYPE (type) = to_type;
TYPE_DOMAIN_TYPE (type) = domain;
- TYPE_ARG_TYPES (type) = args;
+ TYPE_FIELDS (type) = args;
+ TYPE_NFIELDS (type) = nargs;
+ if (varargs)
+ TYPE_FLAGS (type) |= TYPE_FLAG_VARARGS;
TYPE_LENGTH (type) = 1; /* In practice, this is never needed. */
TYPE_CODE (type) = TYPE_CODE_METHOD;
}
DMGL_PARAMS | DMGL_ANSI);
char *argtypetext, *p;
int depth = 0, argcount = 1;
- struct type **argtypes;
+ struct field *argtypes;
struct type *mtype;
/* Make sure we got back a function string that we can use. */
p += 1;
}
- /* We need two more slots: one for the THIS pointer, and one for the
- NULL [...] or void [end of arglist]. */
+ /* If we read one argument and it was ``void'', don't count it. */
+ if (strncmp (argtypetext, "(void)", 6) == 0)
+ argcount -= 1;
- argtypes = (struct type **)
- TYPE_ALLOC (type, (argcount + 2) * sizeof (struct type *));
+ /* We need one extra slot, for the THIS pointer. */
+
+ argtypes = (struct field *)
+ TYPE_ALLOC (type, (argcount + 1) * sizeof (struct field));
p = argtypetext;
/* Add THIS pointer for non-static methods. */
argcount = 0;
else
{
- argtypes[0] = lookup_pointer_type (type);
+ argtypes[0].type = lookup_pointer_type (type);
argcount = 1;
}
{
if (depth <= 0 && (*p == ',' || *p == ')'))
{
- /* Avoid parsing of ellipsis, they will be handled below. */
- if (strncmp (argtypetext, "...", p - argtypetext) != 0)
+ /* Avoid parsing of ellipsis, they will be handled below.
+ Also avoid ``void'' as above. */
+ if (strncmp (argtypetext, "...", p - argtypetext) != 0
+ && strncmp (argtypetext, "void", p - argtypetext) != 0)
{
- argtypes[argcount] =
+ argtypes[argcount].type =
safe_parse_type (argtypetext, p - argtypetext);
argcount += 1;
}
}
}
- if (p[-2] != '.') /* Not '...' */
- {
- argtypes[argcount] = builtin_type_void; /* List terminator */
- }
- else
- {
- argtypes[argcount] = NULL; /* Ellist terminator */
- }
-
- xfree (demangled_name);
-
TYPE_FN_FIELD_PHYSNAME (f, signature_id) = mangled_name;
/* Now update the old "stub" type into a real type. */
mtype = TYPE_FN_FIELD_TYPE (f, signature_id);
TYPE_DOMAIN_TYPE (mtype) = type;
- TYPE_ARG_TYPES (mtype) = argtypes;
+ TYPE_FIELDS (mtype) = argtypes;
+ TYPE_NFIELDS (mtype) = argcount;
TYPE_FLAGS (mtype) &= ~TYPE_FLAG_STUB;
TYPE_FN_FIELD_STUB (f, signature_id) = 0;
+ if (p[-2] == '.')
+ TYPE_FLAGS (mtype) |= TYPE_FLAG_VARARGS;
+
+ xfree (demangled_name);
}
const struct cplus_struct_type cplus_struct_default;
}
}
-/* The args list is a strange beast. It is either terminated by a NULL
- pointer for varargs functions, or by a pointer to a TYPE_CODE_VOID
- type for normal fixed argcount functions. (FIXME someday)
- Also note the first arg should be the "this" pointer, we may not want to
- include it since we may get into a infinitely recursive situation. */
+/* Note the first arg should be the "this" pointer, we may not want to
+ include it since we may get into a infinitely recursive situation. */
static void
-print_arg_types (struct type **args, int spaces)
+print_arg_types (struct field *args, int nargs, int spaces)
{
if (args != NULL)
{
- while (*args != NULL)
- {
- recursive_dump_type (*args, spaces + 2);
- if (TYPE_CODE (*args++) == TYPE_CODE_VOID)
- {
- break;
- }
- }
+ int i;
+
+ for (i = 0; i < nargs; i++)
+ recursive_dump_type (args[i].type, spaces + 2);
}
}
gdb_print_host_address (TYPE_FN_FIELD_ARGS (f, overload_idx), gdb_stdout);
printf_filtered ("\n");
- print_arg_types (TYPE_FN_FIELD_ARGS (f, overload_idx), spaces);
+ print_arg_types (TYPE_FN_FIELD_ARGS (f, overload_idx),
+ TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (f, overload_idx)),
+ spaces);
printfi_filtered (spaces + 8, "fcontext ");
gdb_print_host_address (TYPE_FN_FIELD_FCONTEXT (f, overload_idx),
gdb_stdout);
printfi_filtered (spaces, "vptr_fieldno %d\n", TYPE_VPTR_FIELDNO (type));
switch (TYPE_CODE (type))
{
- case TYPE_CODE_METHOD:
- case TYPE_CODE_FUNC:
- printfi_filtered (spaces, "arg_types ");
- gdb_print_host_address (TYPE_ARG_TYPES (type), gdb_stdout);
- puts_filtered ("\n");
- print_arg_types (TYPE_ARG_TYPES (type), spaces);
- break;
-
case TYPE_CODE_STRUCT:
printfi_filtered (spaces, "cplus_stuff ");
gdb_print_host_address (TYPE_CPLUS_SPECIFIC (type), gdb_stdout);
#define TYPE_FLAG_DATA_SPACE (1 << 10)
#define TYPE_DATA_SPACE(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_FLAG_DATA_SPACE)
-/* FIXME: Kludge to mark a varargs function type for C++ member
- function argument processing. Currently only used in dwarf2read.c,
- but put it here so we won't accidentally overload the bit with
- another flag. */
+/* FIXME drow/2002-06-03: Only used for methods, but applies as well
+ to functions. */
#define TYPE_FLAG_VARARGS (1 << 11)
#define TYPE_VARARGS(t) (TYPE_FLAGS (t) & TYPE_FLAG_VARARGS)
For range types, there are two "fields",
the minimum and maximum values (both inclusive).
For enum types, each possible value is described by one "field".
- For a function type, a "field" for each parameter type.
+ For a function or method type, a "field" for each parameter.
For C++ classes, there is one field for each base class (if it is
a derived class) plus one field for each class data member. Member
functions are recorded elsewhere.
CORE_ADDR physaddr;
char *physname;
- /* For a function type, this is 1 if the argument is marked
+ /* For a function or member type, this is 1 if the argument is marked
artificial. Artificial arguments should not be shown to the
user. */
int artificial;
int bitsize;
/* In a struct or union type, type of this field.
- In a function type, type of this argument.
+ In a function or member type, type of this argument.
In an array type, the domain-type of the array. */
struct type *type;
/* Name of field, value or argument.
- NULL for range bounds and array domains. */
+ NULL for range bounds, array domains, and member function
+ arguments. */
char *name;
union type_specific
{
- /* ARG_TYPES is for TYPE_CODE_METHOD.
- Contains the type of each argument, ending with a void type
- after the last argument for normal member functions or a NULL
- pointer after the last argument for functions with variable
- arguments. */
-
- struct type **arg_types;
-
/* CPLUS_STUFF is for TYPE_CODE_STRUCT. It is initialized to point to
cplus_struct_default, a default static instance of a struct
cplus_struct_type. */
#define TYPE_NINSTANTIATIONS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->ninstantiations
#define TYPE_DECLARED_TYPE(thistype) TYPE_CPLUS_SPECIFIC(thistype)->declared_type
#define TYPE_TYPE_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific
-#define TYPE_ARG_TYPES(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.arg_types
#define TYPE_CPLUS_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.cplus_stuff
#define TYPE_FLOATFORMAT(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.floatformat
#define TYPE_BASECLASS(thistype,index) TYPE_MAIN_TYPE(thistype)->fields[index].type
#define TYPE_FN_FIELD(thisfn, n) (thisfn)[n]
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n) (thisfn)[n].physname
#define TYPE_FN_FIELD_TYPE(thisfn, n) (thisfn)[n].type
-#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_ARG_TYPES ((thisfn)[n].type)
+#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_FIELDS ((thisfn)[n].type)
#define TYPE_FN_FIELD_CONST(thisfn, n) ((thisfn)[n].is_const)
#define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)
#define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)
extern struct type *lookup_member_type (struct type *, struct type *);
extern void
-smash_to_method_type (struct type *, struct type *, struct type *,
- struct type **);
+smash_to_method_type (struct type *type, struct type *domain,
+ struct type *to_type, struct field *args,
+ int nargs, int varargs);
extern void
smash_to_member_type (struct type *, struct type *, struct type *);
/* But mark it as NULL if the method was incompletely processed
We'll fix this up later when the method is fully processed */
if (TYPE_INCOMPLETE (memtype))
- {
- fn_p->field.fn_fields[ix].type = NULL;
- }
+ fn_p->field.fn_fields[ix].type = NULL;
else
- {
- fn_p->field.fn_fields[ix].type = memtype;
-
- /* The argument list */
- TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type).arg_types
- = (struct type **) obstack_alloc (&objfile->type_obstack,
- (sizeof (struct type *)
- * (TYPE_NFIELDS (memtype)
- + 1)));
- for (i = 0; i < TYPE_NFIELDS (memtype); i++)
- TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type)
- .arg_types[i] = TYPE_FIELDS (memtype)[i].type;
- /* void termination */
- TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type)
- .arg_types[TYPE_NFIELDS (memtype)] = builtin_type_void;
- }
+ fn_p->field.fn_fields[ix].type = memtype;
/* For virtual functions, fill in the voffset field with the
* virtual table offset. (This is just copied over from the
{
/* Set the method type */
TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j) = method;
- /* The argument list */
- TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types
- = (struct type **) obstack_alloc (&objfile->type_obstack,
- sizeof (struct type *) * (TYPE_NFIELDS (method) + 1));
- for (k = 0; k < TYPE_NFIELDS (method); k++)
- TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[k] = TYPE_FIELDS (method)[k].type;
- /* void termination */
- TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[TYPE_NFIELDS (method)] = builtin_type_void;
/* Break out of both loops -- only one method to fix up in a class */
goto finish;
struct type *retvaltype;
int nargs;
int i;
- struct type **args_type;
class_type = hpread_type_lookup (dn_bufp->dptrmem.pointsto,
objfile);
functype = hpread_type_lookup (dn_bufp->dptrmem.memtype,
objfile);
retvaltype = TYPE_TARGET_TYPE (functype);
nargs = TYPE_NFIELDS (functype);
- args_type = (struct type **) xmalloc ((nargs + 1) * sizeof (struct type *));
- for (i = 0; i < nargs; i++)
- {
- args_type[i] = TYPE_FIELD_TYPE (functype, i);
- }
- args_type[nargs] = NULL;
ptrmemtype = alloc_type (objfile);
- smash_to_method_type (ptrmemtype, class_type, retvaltype, args_type);
+
+ smash_to_method_type (ptrmemtype, class_type, retvaltype,
+ TYPE_FIELDS (functype),
+ TYPE_NFIELDS (functype),
+ 0);
return make_pointer_type (ptrmemtype, NULL);
}
break;
/* Defines for XMM0_REGNUM etc. */
#include "i386-tdep.h"
+/* Defines I386_LINUX_ORIG_EAX_REGNUM. */
+#include "i386-linux-tdep.h"
+
/* Prototypes for local functions. */
static void dummy_sse_values (void);
#endif
/* Registers we shouldn't try to fetch. */
-#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
/* Fetch one register. */
}
/* Registers we shouldn't try to store. */
-#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
/* Store one register. */
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, (char *) (regp + regmap[i]));
- supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
+ if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
+ supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
}
/* Fill register REGNO (if it is a general-purpose register) in
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < NUM_GREGS; i++)
- if ((regno == -1 || regno == i))
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
regcache_collect (i, regp + regmap[i]);
- if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+ if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+ && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
}
#include "solib-svr4.h" /* For struct link_map_offsets. */
+#include "i386-tdep.h"
+#include "i386-linux-tdep.h"
+
/* Return the name of register REG. */
-char *
+static const char *
i386_linux_register_name (int reg)
{
/* Deal with the extra "orig_eax" pseudo register. */
return i386_register_name (reg);
}
-int
+static int
i386_linux_register_byte (int reg)
{
/* Deal with the extra "orig_eax" pseudo register. */
return i386_register_byte (reg);
}
-int
+static int
i386_linux_register_raw_size (int reg)
{
/* Deal with the extra "orig_eax" pseudo register. */
/* Return whether PC is in a GNU/Linux sigtramp routine. */
-int
-i386_linux_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
if (name)
return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
/* Set the program counter for process PTID to PC. */
-void
+static void
i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
{
write_register_pid (PC_REGNUM, pc, ptid);
from a GDB that was not built on an GNU/Linux x86 host (for cross
debugging). */
-struct link_map_offsets *
+static struct link_map_offsets *
i386_linux_svr4_fetch_link_map_offsets (void)
{
static struct link_map_offsets lmo;
return lmp;
}
+\f
+
+static void
+i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* GNU/Linux uses ELF. */
+ i386_elf_init_abi (info, gdbarch);
+
+ /* We support the SSE registers on GNU/Linux. */
+ tdep->num_xmm_regs = I386_NUM_XREGS - 1;
+ /* set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS); */
+
+ /* Since we have the extra "orig_eax" register on GNU/Linux, we have
+ to adjust a few things. */
+
+ set_gdbarch_write_pc (gdbarch, i386_linux_write_pc);
+ set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
+ set_gdbarch_register_name (gdbarch, i386_linux_register_name);
+ set_gdbarch_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
+ set_gdbarch_register_byte (gdbarch, i386_linux_register_byte);
+ set_gdbarch_register_raw_size (gdbarch, i386_linux_register_raw_size);
+
+ tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
+
+ /* When the i386 Linux kernel calls a signal handler, the return
+ address points to a bit of code on the stack. These definitions
+ are used to identify this bit of code as a signal trampoline in
+ order to support backtracing through calls to signal handlers. */
+
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
+ set_gdbarch_frame_chain (gdbarch, i386_linux_frame_chain);
+ set_gdbarch_frame_saved_pc (gdbarch, i386_linux_frame_saved_pc);
+ set_gdbarch_saved_pc_after_call (gdbarch, i386_linux_saved_pc_after_call);
+ tdep->sigtramp_saved_pc = i386_linux_sigtramp_saved_pc;
+
+ set_solib_svr4_fetch_link_map_offsets (gdbarch,
+ i386_linux_svr4_fetch_link_map_offsets);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern void _initialize_i386_linux_tdep (void);
+
+void
+_initialize_i386_linux_tdep (void)
+{
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_LINUX,
+ i386_linux_init_abi);
+}
#include "value.h"
#include "gdb_assert.h"
-#include "elf-bfd.h"
-
#include "i386-tdep.h"
/* Names of the registers. The first 10 registers match the register
/* i386_register_offset[i] is the offset into the register file of the
start of register number i. We initialize this from
i386_register_size. */
-static int i386_register_offset[MAX_NUM_REGS];
+static int i386_register_offset[I386_SSE_NUM_REGS];
/* i386_register_size[i] is the number of bytes of storage in GDB's
register array occupied by register i. */
-static int i386_register_size[MAX_NUM_REGS] = {
+static int i386_register_size[I386_SSE_NUM_REGS] = {
4, 4, 4, 4,
4, 4, 4, 4,
4, 4, 4, 4,
/* Return the name of register REG. */
-char *
+const char *
i386_register_name (int reg)
{
if (reg < 0)
return i386_register_size[reg];
}
-/* Return the size in bytes of the virtual type of register REG. */
-
-int
-i386_register_virtual_size (int reg)
-{
- return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg));
-}
-
/* Convert stabs register number REG to the appropriate register
number used by GDB. */
-int
+static int
i386_stab_reg_to_regnum (int reg)
{
/* This implements what GCC calls the "default" register map. */
return NUM_REGS + NUM_PSEUDO_REGS;
}
-/* Convert Dwarf register number REG to the appropriate register
+/* Convert DWARF register number REG to the appropriate register
number used by GDB. */
-int
+static int
i386_dwarf_reg_to_regnum (int reg)
{
/* The DWARF register numbering includes %eip and %eflags, and
frame's nominal address is the address of a 4-byte word containing
the calling frame's address. */
-CORE_ADDR
+static CORE_ADDR
i386_frame_chain (struct frame_info *frame)
{
if (frame->signal_handler_caller)
/* Return the saved program counter for FRAME. */
-CORE_ADDR
+static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
- /* FIXME: kettenis/2001-05-09: Conditionalizing the next bit of code
- on SIGCONTEXT_PC_OFFSET and I386V4_SIGTRAMP_SAVED_PC should be
- considered a temporary hack. I plan to come up with something
- better when we go multi-arch. */
-#if defined (SIGCONTEXT_PC_OFFSET) || defined (I386V4_SIGTRAMP_SAVED_PC)
if (frame->signal_handler_caller)
- return sigtramp_saved_pc (frame);
-#endif
+ {
+ CORE_ADDR (*sigtramp_saved_pc) (struct frame_info *);
+ sigtramp_saved_pc = gdbarch_tdep (current_gdbarch)->sigtramp_saved_pc;
- return read_memory_unsigned_integer (frame->frame + 4, 4);
-}
+ gdb_assert (sigtramp_saved_pc != NULL);
+ return sigtramp_saved_pc (frame);
+ }
-CORE_ADDR
-i386go32_frame_saved_pc (struct frame_info *frame)
-{
- return read_memory_integer (frame->frame + 4, 4);
+ return read_memory_unsigned_integer (frame->frame + 4, 4);
}
/* Immediately after a function call, return the saved pc. */
-CORE_ADDR
+static CORE_ADDR
i386_saved_pc_after_call (struct frame_info *frame)
{
return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
/* Return PC of first real instruction. */
-int
-i386_skip_prologue (int pc)
+CORE_ADDR
+i386_skip_prologue (CORE_ADDR pc)
{
unsigned char op;
int i;
return (codestream_tell ());
}
+/* Use the program counter to determine the contents and size of a
+ breakpoint instruction. Return a pointer to a string of bytes that
+ encode a breakpoint instruction, store the length of the string in
+ *LEN and optionally adjust *PC to point to the correct memory
+ location for inserting the breakpoint.
+
+ On the i386 we have a single breakpoint that fits in a single byte
+ and can be inserted anywhere. */
+
+static const unsigned char *
+i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+{
+ static unsigned char break_insn[] = { 0xcc }; /* int 3 */
+
+ *len = sizeof (break_insn);
+ return break_insn;
+}
+
void
i386_push_dummy_frame (void)
{
write_register (FP_REGNUM, fp);
}
+/* The i386 call dummy sequence:
+
+ call 11223344 (32-bit relative)
+ int 3
+
+ It is 8 bytes long. */
+
+static LONGEST i386_call_dummy_words[] =
+{
+ 0x223344e8,
+ 0xcc11
+};
+
/* Insert the (relative) function address into the call sequence
stored at DYMMY. */
}
\f
-#ifdef GET_LONGJMP_TARGET
-
-/* FIXME: Multi-arching does not set JB_PC and JB_ELEMENT_SIZE yet.
- Fill in with dummy value to enable compilation. */
-#ifndef JB_PC
-#define JB_PC 0
-#endif /* JB_PC */
-
-#ifndef JB_ELEMENT_SIZE
-#define JB_ELEMENT_SIZE 4
-#endif /* JB_ELEMENT_SIZE */
-
/* Figure out where the longjmp will land. Slurp the args out of the
stack. We expect the first arg to be a pointer to the jmp_buf
- structure from which we extract the pc (JB_PC) that we will land
- at. The pc is copied into PC. This routine returns true on
+ structure from which we extract the address that we will land at.
+ This address is copied into PC. This routine returns true on
success. */
-int
-get_longjmp_target (CORE_ADDR *pc)
+static int
+i386_get_longjmp_target (CORE_ADDR *pc)
{
- char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+ char buf[4];
CORE_ADDR sp, jb_addr;
+ int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
- sp = read_register (SP_REGNUM);
-
- if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack. */
- buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
+ /* If JB_PC_OFFSET is -1, we have no way to find out where the
+ longjmp will land. */
+ if (jb_pc_offset == -1)
return 0;
- jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
+ sp = read_register (SP_REGNUM);
+ if (target_read_memory (sp + 4, buf, 4))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ jb_addr = extract_address (buf, 4);
+ if (target_read_memory (jb_addr + jb_pc_offset, buf, 4))
+ return 0;
+ *pc = extract_address (buf, 4);
return 1;
}
-
-#endif /* GET_LONGJMP_TARGET */
\f
CORE_ADDR
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
{
warning ("Cannot find floating-point return value.");
memset (valbuf, 0, len);
unsigned int fstat;
char buf[FPU_REG_RAW_SIZE];
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
{
warning ("Cannot set floating-point return value.");
return;
}
\f
+/* This is the variable that is set with "set struct-convention", and
+ its legitimate values. */
+static const char default_struct_convention[] = "default";
+static const char pcc_struct_convention[] = "pcc";
+static const char reg_struct_convention[] = "reg";
+static const char *valid_conventions[] =
+{
+ default_struct_convention,
+ pcc_struct_convention,
+ reg_struct_convention,
+ NULL
+};
+static const char *struct_convention = default_struct_convention;
+
+static int
+i386_use_struct_convention (int gcc_p, struct type *type)
+{
+ enum struct_return struct_return;
+
+ if (struct_convention == default_struct_convention)
+ struct_return = gdbarch_tdep (current_gdbarch)->struct_return;
+ else if (struct_convention == pcc_struct_convention)
+ struct_return = pcc_struct_return;
+ else
+ struct_return = reg_struct_return;
+
+ return generic_use_struct_convention (struct_return == reg_struct_return,
+ type);
+}
+\f
+
/* Return the GDB type object for the "standard" data type of data in
register REGNUM. Perhaps %esi and %edi should go here, but
potentially they could be used for things other than address. */
}
\f
-#ifdef I386V4_SIGTRAMP_SAVED_PC
-/* Get saved user PC for sigtramp from the pushed ucontext on the
- stack for all three variants of SVR4 sigtramps. */
-
-CORE_ADDR
-i386v4_sigtramp_saved_pc (struct frame_info *frame)
-{
- CORE_ADDR saved_pc_offset = 4;
- char *name = NULL;
-
- find_pc_partial_function (frame->pc, &name, NULL, NULL);
- if (name)
- {
- if (STREQ (name, "_sigreturn"))
- saved_pc_offset = 132 + 14 * 4;
- else if (STREQ (name, "_sigacthandler"))
- saved_pc_offset = 80 + 14 * 4;
- else if (STREQ (name, "sigvechandler"))
- saved_pc_offset = 120 + 14 * 4;
- }
-
- if (frame->next)
- return read_memory_integer (frame->next->frame + saved_pc_offset, 4);
- return read_memory_integer (read_register (SP_REGNUM) + saved_pc_offset, 4);
-}
-#endif /* I386V4_SIGTRAMP_SAVED_PC */
-\f
-
#ifdef STATIC_TRANSFORM_NAME
/* SunPRO encodes the static variables. This is not related to C++
mangling, it is done for C too. */
}
\f
+/* Return non-zero if PC and NAME show that we are in a signal
+ trampoline. */
+
+static int
+i386_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ return (name && strcmp ("_sigtramp", name) == 0);
+}
+\f
+
/* We have two flavours of disassembly. The machinery on this page
deals with switching between those. */
or intel_flavor. */
internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
-
\f
-/* This table matches the indices assigned to enum i386_abi. Keep
- them in sync. */
-static const char * const i386_abi_names[] =
-{
- "<unknown>",
- "SVR4",
- "NetBSD",
- "GNU/Linux",
- "GNU/Hurd",
- "Solaris",
- "FreeBSD",
- NULL
-};
+/* There are a few i386 architecture variants that differ only
+ slightly from the generic i386 target. For now, we don't give them
+ their own source file, but include them here. As a consequence,
+ they'll always be included. */
-#define ABI_TAG_OS_GNU_LINUX I386_ABI_LINUX
-#define ABI_TAG_OS_GNU_HURD I386_ABI_HURD
-#define ABI_TAG_OS_GNU_SOLARIS I386_ABI_INVALID
-#define ABI_TAG_OS_FREEBSD I386_ABI_FREEBSD
-#define ABI_TAG_OS_NETBSD I386_ABI_NETBSD
+/* System V Release 4 (SVR4). */
-static void
-process_note_sections (bfd *abfd, asection *sect, void *obj)
+static int
+i386_svr4_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- int *abi = obj;
- const char *name;
- unsigned int sectsize;
+ return (name && (strcmp ("_sigreturn", name) == 0
+ || strcmp ("_sigacthandler", name) == 0
+ || strcmp ("sigvechandler", name) == 0));
+}
- name = bfd_get_section_name (abfd, sect);
- sectsize = bfd_section_size (abfd, sect);
+/* Get saved user PC for sigtramp from the pushed ucontext on the
+ stack for all three variants of SVR4 sigtramps. */
- if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0)
+CORE_ADDR
+i386_svr4_sigtramp_saved_pc (struct frame_info *frame)
+{
+ CORE_ADDR saved_pc_offset = 4;
+ char *name = NULL;
+
+ find_pc_partial_function (frame->pc, &name, NULL, NULL);
+ if (name)
{
- unsigned int name_length, data_length, note_type;
- char *note;
+ if (strcmp (name, "_sigreturn") == 0)
+ saved_pc_offset = 132 + 14 * 4;
+ else if (strcmp (name, "_sigacthandler") == 0)
+ saved_pc_offset = 80 + 14 * 4;
+ else if (strcmp (name, "sigvechandler") == 0)
+ saved_pc_offset = 120 + 14 * 4;
+ }
- /* If the section is larger than this, it's probably not what we
- are looking for. */
- if (sectsize > 128)
- sectsize = 128;
+ if (frame->next)
+ return read_memory_integer (frame->next->frame + saved_pc_offset, 4);
+ return read_memory_integer (read_register (SP_REGNUM) + saved_pc_offset, 4);
+}
+\f
- note = alloca (sectsize);
+/* DJGPP. */
- bfd_get_section_contents (abfd, sect, note,
- (file_ptr) 0, (bfd_size_type) sectsize);
+static int
+i386_go32_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+ /* DJGPP doesn't have any special frames for signal handlers. */
+ return 0;
+}
+\f
- name_length = bfd_h_get_32 (abfd, note);
- data_length = bfd_h_get_32 (abfd, note + 4);
- note_type = bfd_h_get_32 (abfd, note + 8);
+/* Generic ELF. */
- if (name_length == 4 && data_length == 16
- && note_type == NT_GNU_ABI_TAG
- && strcmp (note + 12, "GNU") == 0)
- {
- int abi_tag_os = bfd_h_get_32 (abfd, note + 16);
+void
+i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* We typically use stabs-in-ELF with the DWARF register numbering. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+}
- /* The case numbers are from abi-tags in glibc. */
- switch (abi_tag_os)
- {
- case GNU_ABI_TAG_LINUX:
- *abi = ABI_TAG_OS_GNU_LINUX;
- break;
-
- case GNU_ABI_TAG_HURD:
- *abi = ABI_TAG_OS_GNU_HURD;
- break;
-
- case GNU_ABI_TAG_SOLARIS:
- *abi = ABI_TAG_OS_GNU_SOLARIS;
- break;
-
- default:
- internal_error
- (__FILE__, __LINE__,
- "process_note_abi_sections: unknown ABI OS tag %d",
- abi_tag_os);
- break;
- }
- }
- else if (name_length == 8 && data_length == 4
- && note_type == NT_FREEBSD_ABI_TAG
- && strcmp (note + 12, "FreeBSD") == 0)
- *abi = ABI_TAG_OS_FREEBSD;
- }
- /* NetBSD uses a similar trick. */
- else if (strcmp (name, ".note.netbsd.ident") == 0 && sectsize > 0)
- {
- unsigned int name_length, desc_length, note_type;
- char *note;
+/* System V Release 4 (SVR4). */
- /* If the section is larger than this, it's probably not what we are
- looking for. */
- if (sectsize > 128)
- sectsize = 128;
+void
+i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- note = alloca (sectsize);
+ /* System V Release 4 uses ELF. */
+ i386_elf_init_abi (info, gdbarch);
- bfd_get_section_contents (abfd, sect, note,
- (file_ptr) 0, (bfd_size_type) sectsize);
+ /* FIXME: kettenis/20020511: Why do we override this function here? */
+ set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
- name_length = bfd_h_get_32 (abfd, note);
- desc_length = bfd_h_get_32 (abfd, note + 4);
- note_type = bfd_h_get_32 (abfd, note + 8);
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
+ tdep->sigtramp_saved_pc = i386_svr4_sigtramp_saved_pc;
- if (name_length == 7 && desc_length == 4
- && note_type == NT_NETBSD_IDENT
- && strcmp (note + 12, "NetBSD") == 0)
- *abi = ABI_TAG_OS_NETBSD;
- }
+ tdep->jb_pc_offset = 20;
}
-static int
-i386_elf_abi_from_note (bfd *abfd)
-{
- enum i386_abi abi = I386_ABI_UNKNOWN;
-
- bfd_map_over_sections (abfd, process_note_sections, &abi);
-
- return abi;
-}
+/* DJGPP. */
-static enum i386_abi
-i386_elf_abi (bfd *abfd)
+void
+i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- int elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
-
- /* The fact that the EI_OSABI byte is set to ELFOSABI_NONE doesn't
- necessarily mean that this is a System V ELF binary. To further
- distinguish between binaries for differens operating systems,
- check for vendor-specific note elements. */
- if (elfosabi == ELFOSABI_NONE)
- {
- enum i386_abi abi = i386_elf_abi_from_note (abfd);
-
- if (abi != I386_ABI_UNKNOWN)
- return abi;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* FreeBSD folks are naughty; they stored the string "FreeBSD"
- in the padding of the e_ident field of the ELF header. */
- if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
- return I386_ABI_FREEBSD;
- }
-
- switch (elfosabi)
- {
- case ELFOSABI_NONE:
- return I386_ABI_SVR4;
- case ELFOSABI_FREEBSD:
- return I386_ABI_FREEBSD;
- }
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386_go32_pc_in_sigtramp);
- return I386_ABI_UNKNOWN;
+ tdep->jb_pc_offset = 36;
}
-struct i386_abi_handler
-{
- struct i386_abi_handler *next;
- enum i386_abi abi;
- void (*init_abi)(struct gdbarch_info, struct gdbarch *);
-};
-
-struct i386_abi_handler *i386_abi_handler_list = NULL;
+/* NetWare. */
void
-i386_gdbarch_register_os_abi (enum i386_abi abi,
- void (*init_abi)(struct gdbarch_info,
- struct gdbarch *))
+i386_nw_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct i386_abi_handler **handler_p;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- for (handler_p = &i386_abi_handler_list; *handler_p != NULL;
- handler_p = &(*handler_p)->next)
- {
- if ((*handler_p)->abi == abi)
- {
- internal_error
- (__FILE__, __LINE__,
- "i386_gdbarch_register_abi: A handler for this ABI variant "
- "(%d) has already been registered", (int) abi);
- /* If user wants to continue, override previous definition. */
- (*handler_p)->init_abi = init_abi;
- return;
- }
- }
- (*handler_p)
- = (struct i386_abi_handler *) xmalloc (sizeof (struct i386_abi_handler));
- (*handler_p)->next = NULL;
- (*handler_p)->abi = abi;
- (*handler_p)->init_abi = init_abi;
+ /* FIXME: kettenis/20020511: Why do we override this function here? */
+ set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
+
+ tdep->jb_pc_offset = 24;
}
+\f
struct gdbarch *
i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- enum i386_abi abi = I386_ABI_UNKNOWN;
- struct i386_abi_handler *abi_handler;
+ enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
+ /* Try to determine the OS ABI of the object we're loading. */
if (info.abfd != NULL)
- {
- switch (bfd_get_flavour (info.abfd))
- {
- case bfd_target_elf_flavour:
- abi= i386_elf_abi (info.abfd);
- break;
-
- default:
- /* Not sure what to do here, leave the ABI as unknown. */
- break;
- }
- }
+ osabi = gdbarch_lookup_osabi (info.abfd);
/* Find a candidate among extant architectures. */
for (arches = gdbarch_list_lookup_by_info (arches, &info);
arches != NULL;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
- /* Make sure the ABI selection matches. */
+ /* Make sure the OS ABI selection matches. */
tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep && tdep->abi == abi)
+ if (tdep && tdep->osabi == osabi)
return arches->gdbarch;
}
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- tdep->abi = abi;
-
- /* FIXME: kettenis/2001-11-24: Although not all IA-32 processors
- have the SSE registers, it's easier to set the default to 8. */
- tdep->num_xmm_regs = 8;
+ tdep->osabi = osabi;
+
+ /* The i386 default settings don't include the SSE registers.
+ FIXME: kettenis/20020614: They do include the FPU registers for
+ now, which probably is not quite right. */
+ tdep->num_xmm_regs = 0;
+
+ tdep->jb_pc_offset = -1;
+ tdep->struct_return = pcc_struct_return;
+ tdep->sigtramp_saved_pc = NULL;
+ tdep->sigtramp_start = 0;
+ tdep->sigtramp_end = 0;
+ tdep->sc_pc_offset = -1;
+
+ /* The format used for `long double' on almost all i386 targets is
+ the i387 extended floating-point format. In fact, of all targets
+ in the GCC 2.95 tree, only OSF/1 does it different, and insists
+ on having a `long double' that's not `long' at all. */
+ set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+
+ /* Although the i386 extended floating-point has only 80 significant
+ bits, a `long double' actually takes up 96, probably to enforce
+ alignment. */
+ set_gdbarch_long_double_bit (gdbarch, 96);
+
+ /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
+ tm-symmetry.h currently override this. Sigh. */
+ set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
+
+ set_gdbarch_sp_regnum (gdbarch, 4);
+ set_gdbarch_fp_regnum (gdbarch, 5);
+ set_gdbarch_pc_regnum (gdbarch, 8);
+ set_gdbarch_ps_regnum (gdbarch, 9);
+ set_gdbarch_fp0_regnum (gdbarch, 16);
+
+ /* Use the "default" register numbering scheme for stabs and COFF. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+ set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+
+ /* Use the DWARF register numbering scheme for DWARF and DWARF 2. */
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+
+ /* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
+ be in use on any of the supported i386 targets. */
+
+ set_gdbarch_register_name (gdbarch, i386_register_name);
+ set_gdbarch_register_size (gdbarch, 4);
+ set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
+ set_gdbarch_register_byte (gdbarch, i386_register_byte);
+ set_gdbarch_register_raw_size (gdbarch, i386_register_raw_size);
+ set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
+
+ set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
/* Call dummy code. */
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+ set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 5);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+ set_gdbarch_call_dummy_length (gdbarch, 8);
set_gdbarch_call_dummy_p (gdbarch, 1);
+ set_gdbarch_call_dummy_words (gdbarch, i386_call_dummy_words);
+ set_gdbarch_sizeof_call_dummy_words (gdbarch,
+ sizeof (i386_call_dummy_words));
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+ set_gdbarch_fix_call_dummy (gdbarch, i386_fix_call_dummy);
+
+ set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
+ set_gdbarch_register_convert_to_virtual (gdbarch,
+ i386_register_convert_to_virtual);
+ set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
- /* NOTE: tm-i386nw.h and tm-i386v4.h override this. */
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+ /* "An argument's size is increased, if necessary, to make it a
+ multiple of [32-bit] words. This may require tail padding,
+ depending on the size of the argument" -- from the x86 ABI. */
+ set_gdbarch_parm_boundary (gdbarch, 32);
- /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-linux.h,
- tm-ptx.h, tm-symmetry.h currently override this. Sigh. */
- set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SSE_REGS);
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ i386_extract_return_value);
+ set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
+ set_gdbarch_push_dummy_frame (gdbarch, i386_push_dummy_frame);
+ set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
+ set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+ set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+ i386_extract_struct_value_address);
+ set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
+
+ set_gdbarch_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
+ set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
+
+ /* Stack grows downward. */
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+ set_gdbarch_breakpoint_from_pc (gdbarch, i386_breakpoint_from_pc);
+ set_gdbarch_decr_pc_after_break (gdbarch, 1);
+ set_gdbarch_function_start_offset (gdbarch, 0);
+
+ /* The following redefines make backtracing through sigtramp work.
+ They manufacture a fake sigtramp frame and obtain the saved pc in
+ sigtramp from the sigcontext structure which is pushed by the
+ kernel on the user stack, along with a pointer to it. */
+
+ set_gdbarch_frame_args_skip (gdbarch, 8);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ i386_frameless_function_invocation);
+ set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
+ set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+ set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
+ set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+ set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
+ set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
/* Hook in ABI-specific overrides, if they have been registered. */
- if (abi == I386_ABI_UNKNOWN)
- {
- /* Don't complain about not knowing the ABI variant if we don't
- have an inferior. */
- if (info.abfd)
- fprintf_filtered
- (gdb_stderr, "GDB doesn't recognize the ABI of the inferior. "
- "Attempting to continue with the default i386 settings");
- }
- else
- {
- for (abi_handler = i386_abi_handler_list; abi_handler != NULL;
- abi_handler = abi_handler->next)
- if (abi_handler->abi == abi)
- break;
+ gdbarch_init_osabi (info, gdbarch, osabi);
- if (abi_handler)
- abi_handler->init_abi (info, gdbarch);
- else
- {
- /* We assume that if GDB_MULTI_ARCH is less than
- GDB_MULTI_ARCH_TM that an ABI variant can be supported by
- overriding definitions in this file. */
- if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- fprintf_filtered
- (gdb_stderr,
- "A handler for the ABI variant \"%s\" is not built into this "
- "configuration of GDB. "
- "Attempting to continue with the default i386 settings",
- i386_abi_names[abi]);
- }
- }
-
return gdbarch;
}
+static enum gdb_osabi
+i386_coff_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "coff-go32-exe") == 0
+ || strcmp (bfd_get_target (abfd), "coff-go32") == 0)
+ return GDB_OSABI_GO32;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+static enum gdb_osabi
+i386_nlm_osabi_sniffer (bfd *abfd)
+{
+ return GDB_OSABI_NETWARE;
+}
+\f
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_i386_tdep (void);
int i, offset;
offset = 0;
- for (i = 0; i < MAX_NUM_REGS; i++)
+ for (i = 0; i < I386_SSE_NUM_REGS; i++)
{
i386_register_offset[i] = offset;
offset += i386_register_size[i];
&setlist);
add_show_from_set (new_cmd, &showlist);
}
+
+ /* Add the variable that controls the convention for returning
+ structs. */
+ {
+ struct cmd_list_element *new_cmd;
+
+ new_cmd = add_set_enum_cmd ("struct-convention", no_class,
+ valid_conventions,
+ &struct_convention, "\
+Set the convention for returning small structs, valid values \
+are \"default\", \"pcc\" and \"reg\", and the default value is \"default\".",
+ &setlist);
+ add_show_from_set (new_cmd, &showlist);
+ }
+
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+ i386_coff_osabi_sniffer);
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_nlm_flavour,
+ i386_nlm_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_SVR4,
+ i386_svr4_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_GO32,
+ i386_go32_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETWARE,
+ i386_nw_init_abi);
}
/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001
+ Copyright 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
#ifndef I386_TDEP_H
#define I386_TDEP_H
+#include "osabi.h"
+
/* GDB's i386 target supports both the 32-bit Intel Architecture
(IA-32) and the 64-bit AMD x86-64 architecture. Internally it uses
a similar register layout for both.
differs and is determined by the num_xmm_regs member of `struct
gdbarch_tdep'. */
-/* ABI variants that we know about. */
-enum i386_abi
-{
- I386_ABI_UNKNOWN = 0,
-
- /* ELF */
- I386_ABI_SVR4, /* This is the default. */
- I386_ABI_NETBSD,
- I386_ABI_LINUX,
- I386_ABI_HURD,
- I386_ABI_SOLARIS,
- I386_ABI_FREEBSD,
+/* Convention for returning structures. */
- I386_ABI_INVALID = -1
+enum struct_return
+{
+ pcc_struct_return, /* Return "short" structures in memory. */
+ reg_struct_return /* Return "short" structures in registers. */
};
/* i386 architecture specific information. */
struct gdbarch_tdep
{
/* ABI. */
- enum i386_abi abi;
+ enum gdb_osabi osabi;
/* Number of SSE registers. */
int num_xmm_regs;
+
+ /* Offset of saved PC in jmp_buf. */
+ int jb_pc_offset;
+
+ /* Convention for returning structures. */
+ enum struct_return struct_return;
+
+ /* Get saved PC for sigtramp. */
+ CORE_ADDR (*sigtramp_saved_pc) (struct frame_info *);
+
+ /* Address range where sigtramp lives. */
+ CORE_ADDR sigtramp_start;
+ CORE_ADDR sigtramp_end;
+
+ /* Offset of saved PC in `struct sigcontext'. */
+ int sc_pc_offset;
};
/* Floating-point registers. */
#define IS_FPU_CTRL_REGNUM(n) FPC_REGNUM_P (n)
#define IS_SSE_REGNUM(n) SSE_REGNUM_P (n)
-void i386_gdbarch_register_os_abi (enum i386_abi,
- void (*init_abi)(struct gdbarch_info,
- struct gdbarch *));
+#define I386_NUM_GREGS 16
+#define I386_NUM_FREGS 16
+#define I386_NUM_XREGS 9
+
+#define I386_SSE_NUM_REGS (I386_NUM_GREGS + I386_NUM_FREGS \
+ + I386_NUM_XREGS)
+
+/* Sizes of individual register sets. These cover the entire register
+ file, so summing up the sizes of those portions actually present
+ yields REGISTER_BYTES. */
+#define I386_SIZEOF_GREGS (I386_NUM_GREGS * 4)
+#define I386_SIZEOF_FREGS (8 * 10 + 8 * 4)
+#define I386_SIZEOF_XREGS (8 * 16 + 4)
+
+#define I386_SSE_SIZEOF_REGS (I386_SIZEOF_GREGS + I386_SIZEOF_FREGS \
+ + I386_SIZEOF_XREGS)
+
+/* Return the name of register REG. */
+extern char const *i386_register_name (int reg);
+
+/* Return the offset into the register array of the start of register
+ number REG. */
+extern int i386_register_byte (int reg);
+
+/* Return the number of bytes of storage in GDB's register array
+ occupied by register REG. */
+extern int i386_register_raw_size (int reg);
+
+/* Initialize a basic ELF architecture variant. */
+extern void i386_elf_init_abi (struct gdbarch_info, struct gdbarch *);
+
+/* Initialize a SVR4 architecture variant. */
+extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
+
+/* Functions exported from i386bsd-tdep.c. */
+
+extern CORE_ADDR i386bsd_sigtramp_saved_pc (struct frame_info *frame);
#endif /* i386-tdep.h */
#endif
#include "gregset.h"
+#include "i386-tdep.h"
\f
/* In older BSD versions we cannot get at some of the segment
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
{
if (CANNOT_FETCH_REGISTER (i))
supply_register (i, NULL);
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
if ((regno == -1 || regno == i) && ! CANNOT_STORE_REGISTER (i))
regcache_collect (i, REG_ADDR (gregsetp, i));
}
return (sizeof (struct user));
}
\f
-/* See i386bsd-tdep.c. */
-extern int i386bsd_sigcontext_pc_offset;
-
void
_initialize_i386bsd_nat (void)
{
+ int sc_pc_offset;
+
/* To support the recognition of signal handlers, i386bsd-tdep.c
hardcodes some constants. Inclusion of this file means that we
are compiling a native debugger, which means that we can use the
system header files and sysctl(3) to get at the relevant
information. */
+#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
+ extern int i386fbsd4_sc_pc_offset;
+#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
+#elif defined (NetBSD) || defined (__NetBSD_Version__)
+ extern int i386nbsd_sc_pc_offset;
+#define SC_PC_OFFSET i386nbsd_sc_pc_offset
+#else
+ extern int i386bsd_sc_pc_offset;
+#define SC_PC_OFFSET i386bsd_sc_pc_offset
+#endif
+
/* Override the default value for the offset of the program counter
in the sigcontext structure. */
- i386bsd_sigcontext_pc_offset = offsetof (struct sigcontext, sc_pc);
+ sc_pc_offset = offsetof (struct sigcontext, sc_pc);
+
+ if (SC_PC_OFFSET != sc_pc_offset)
+ {
+ warning ("\
+offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>.",
+ sc_pc_offset, SC_PC_OFFSET);
+ }
+
+ SC_PC_OFFSET = sc_pc_offset;
}
/* Target-dependent code for i386 BSD's.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdbcore.h"
#include "regcache.h"
-/* Support for signal handlers. */
-
-/* Range in which to find the signaltramp routine, traditionally found
- on the use stack, just below the user area. Initialized to values
- that work for NetBSD and FreeBSD. */
+#include "i386-tdep.h"
-CORE_ADDR i386bsd_sigtramp_start = 0xbfbfdf20;
-CORE_ADDR i386bsd_sigtramp_end = 0xbfbfdff0;
+/* Support for signal handlers. */
/* Return whether PC is in a BSD sigtramp routine. */
-int
-i386bsd_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- return (pc >= i386bsd_sigtramp_start && pc < i386bsd_sigtramp_end);
-}
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-/* Offset in the sigcontext structure of the program counter.
- Initialized to the value from 4.4 BSD Lite. */
-int i386bsd_sigcontext_pc_offset = 20;
+ return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
+}
/* Assuming FRAME is for a BSD sigtramp routine, return the address of
the associated sigcontext structure. */
}
/* Assuming FRAME is for a BSD sigtramp routine, return the saved
- program counter. */
+ program counter.
-static CORE_ADDR
+ Note: This function is used for Solaris 2 too, so don't make it
+ static. */
+
+CORE_ADDR
i386bsd_sigtramp_saved_pc (struct frame_info *frame)
{
+ int sc_pc_offset = gdbarch_tdep (current_gdbarch)->sc_pc_offset;
CORE_ADDR addr;
+
addr = i386bsd_sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + i386bsd_sigcontext_pc_offset, 4);
+ return read_memory_unsigned_integer (addr + sc_pc_offset, 4);
}
/* Return the saved program counter for FRAME. */
-CORE_ADDR
+static CORE_ADDR
i386bsd_frame_saved_pc (struct frame_info *frame)
{
if (frame->signal_handler_caller)
return read_memory_unsigned_integer (frame->frame + 4, 4);
}
+
+/* Return the start address of the sigtramp routine. */
+
+CORE_ADDR
+i386bsd_sigtramp_start (CORE_ADDR pc)
+{
+ return gdbarch_tdep (current_gdbarch)->sigtramp_start;
+}
+
+/* Return the end address of the sigtramp routine. */
+
+CORE_ADDR
+i386bsd_sigtramp_end (CORE_ADDR pc)
+{
+ return gdbarch_tdep (current_gdbarch)->sigtramp_end;
+}
+\f
+
+/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD). */
+
+/* From <machine/signal.h>. */
+int i386bsd_sc_pc_offset = 20;
+
+static void
+i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ set_gdbarch_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
+
+ tdep->jb_pc_offset = 0;
+
+ tdep->sigtramp_saved_pc = i386bsd_sigtramp_saved_pc;
+ tdep->sigtramp_start = 0xfdbfdfc0;
+ tdep->sigtramp_end = 0xfdbfe000;
+ tdep->sc_pc_offset = i386bsd_sc_pc_offset;
+}
+
+/* NetBSD 1.0 or later. */
+
+/* From <machine/signal.h>. */
+int i386nbsd_sc_pc_offset = 44;
+
+static void
+i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Obviously NetBSD is BSD-based. */
+ i386bsd_init_abi (info, gdbarch);
+
+ /* NetBSD uses -freg-struct-return by default. */
+ tdep->struct_return = reg_struct_return;
+
+ /* NetBSD uses a different memory layout. */
+ tdep->sigtramp_start = 0xbfbfdf20;
+ tdep->sigtramp_end = 0xbfbfdff0;
+
+ /* NetBSD has a `struct sigcontext' that's different from the
+ origional 4.3 BSD. */
+ tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
+}
+
+/* NetBSD ELF. */
+static void
+i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* It's still NetBSD. */
+ i386nbsd_init_abi (info, gdbarch);
+
+ /* But ELF-based. */
+ i386_elf_init_abi (info, gdbarch);
+
+ /* NetBSD ELF uses -fpcc-struct-return by default. */
+ tdep->struct_return = pcc_struct_return;
+
+ /* We support the SSE registers on NetBSD ELF. */
+ tdep->num_xmm_regs = I386_NUM_XREGS - 1;
+ set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS
+ + I386_NUM_XREGS);
+}
+
+/* FreeBSD 3.0-RELEASE or later. */
+
+CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
+CORE_ADDR i386fbsd_sigtramp_end = 0xbfbfdff0;
+
+static void
+i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Obviously FreeBSD is BSD-based. */
+ i386bsd_init_abi (info, gdbarch);
+
+ /* FreeBSD uses -freg-struct-return by default. */
+ tdep->struct_return = reg_struct_return;
+
+ /* FreeBSD uses a different memory layout. */
+ tdep->sigtramp_start = i386fbsd_sigtramp_start;
+ tdep->sigtramp_end = i386fbsd_sigtramp_end;
+}
+
+static void
+i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* It's almost identical to FreeBSD a.out. */
+ i386fbsdaout_init_abi (info, gdbarch);
+
+ /* Except that it uses ELF. */
+ i386_elf_init_abi (info, gdbarch);
+}
+
+/* FreeBSD 4.0-RELEASE or later. */
+
+/* From <machine/signal.h>. */
+int i386fbsd4_sc_pc_offset = 76;
+
+static void
+i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Inherit stuff from older releases. We assume that FreeBSD
+ 4.0-RELEASE always uses ELF. */
+ i386fbsd_init_abi (info, gdbarch);
+
+ /* FreeBSD 4.0 introduced a new `struct sigcontext'. */
+ tdep->sc_pc_offset = i386fbsd4_sc_pc_offset;
+}
+
+\f
+static enum gdb_osabi
+i386bsd_aout_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "a.out-i386-netbsd") == 0)
+ return GDB_OSABI_NETBSD_AOUT;
+
+ if (strcmp (bfd_get_target (abfd), "a.out-i386-freebsd") == 0)
+ return GDB_OSABI_FREEBSD_AOUT;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+\f
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386bsd_tdep (void);
+
+void
+_initialize_i386bsd_tdep (void)
+{
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
+ i386bsd_aout_osabi_sniffer);
+
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_AOUT,
+ i386nbsd_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_ELF,
+ i386nbsdelf_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_AOUT,
+ i386fbsdaout_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_ELF,
+ i386fbsd4_init_abi);
+}
/* Native-dependent code for FreeBSD/i386.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
{
/* FreeBSD provides a kern.ps_strings sysctl that we can use to
locate the sigtramp. That way we can still recognize a sigtramp
- if it's location is changed in a new kernel. Of course this is
+ if its location is changed in a new kernel. Of course this is
still based on the assumption that the sigtramp is placed
directly under the location where the program arguments and
environment can be found. */
int ps_strings;
size_t len;
+ extern CORE_ADDR i386fbsd_sigtramp_start;
+ extern CORE_ADDR i386fbsd_sigtramp_end;
+
mib[0] = CTL_KERN;
mib[1] = KERN_PS_STRINGS;
len = sizeof (ps_strings);
if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0)
{
- i386bsd_sigtramp_start = ps_strings - 128;
- i386bsd_sigtramp_end = ps_strings;
+ i386fbsd_sigtramp_start = ps_strings - 128;
+ i386fbsd_sigtramp_end = ps_strings;
}
}
#endif
supply_gregset (gdb_gregset_t *gregs)
{
int i;
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, REG_ADDR (gregs, i));
}
error ("Can't fetch registers from thread %d: No such thread",
PIDGET (inferior_ptid));
- if (regno < NUM_GREGS || regno == -1)
+ if (regno < I386_NUM_GREGS || regno == -1)
{
thread_state_t state;
proc_debug (thread, "fetching all register");
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
supply_register (i, REG_ADDR (state, i));
thread->fetched_regs = ~0;
}
}
}
- if (regno >= NUM_GREGS || regno == -1)
+ if (regno >= I386_NUM_GREGS || regno == -1)
{
proc_debug (thread, "fetching floating-point registers");
error ("Couldn't store registers into thread %d: No such thread",
PIDGET (inferior_ptid));
- if (regno < NUM_GREGS || regno == -1)
+ if (regno < I386_NUM_GREGS || regno == -1)
{
thread_state_t state;
thread_state_data_t old_state;
{
int check_regno;
- for (check_regno = 0; check_regno < NUM_GREGS; check_regno++)
+ for (check_regno = 0; check_regno < I386_NUM_GREGS; check_regno++)
if ((thread->fetched_regs & (1 << check_regno))
&& memcpy (REG_ADDR (&old_state, check_regno),
REG_ADDR (state, check_regno),
proc_debug (thread, "storing all registers");
- for (i = 0; i < NUM_GREGS; i++)
+ for (i = 0; i < I386_NUM_GREGS; i++)
if (register_valid[i])
fill (state, i);
}
#undef fill
- if (regno >= NUM_GREGS || regno == -1)
+ if (regno >= I386_NUM_GREGS || regno == -1)
{
proc_debug (thread, "storing floating-point registers");
/* Target-dependent code for Intel 386 running LynxOS.
- Copyright 1993, 1996, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1993, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "inferior.h"
-#include "target.h"
#include "gdbcore.h"
+#include "inferior.h"
#include "regcache.h"
+#include "target.h"
+
+#include "i386-tdep.h"
-/* Return the PC of the caller from the call frame. Assumes the subr prologue
- has already been executed, and the frame pointer setup. If this is the
- outermost frame, we check to see if we are in a system call by examining the
- previous instruction. If so, then the return PC is actually at SP+4 because
- system calls use a different calling sequence. */
+/* Return the PC of the caller from the call frame. Assumes the subr
+ prologue has already been executed, and the frame pointer setup.
+ If this is the outermost frame, we check to see if we are in a
+ system call by examining the previous instruction. If so, then the
+ return PC is actually at SP+4 because system calls use a different
+ calling sequence. */
-CORE_ADDR
+static CORE_ADDR
i386lynx_saved_pc_after_call (struct frame_info *frame)
{
char opcode[7];
static const unsigned char call_inst[] =
- {0x9a, 0, 0, 0, 0, 8, 0}; /* lcall 0x8,0x0 */
+ { 0x9a, 0, 0, 0, 0, 8, 0 }; /* lcall 0x8,0x0 */
- read_memory (frame->pc - 7, opcode, 7);
+ read_memory_nobpt (frame->pc - 7, opcode, 7);
if (memcmp (opcode, call_inst, 7) == 0)
- return read_memory_integer (read_register (SP_REGNUM) + 4, 4);
+ return read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
+
+ return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
+}
+\f
+
+/* LynxOS. */
+static void
+i386lynx_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ set_gdbarch_saved_pc_after_call (gdbarch, i386lynx_saved_pc_after_call);
+}
+\f
+
+static enum gdb_osabi
+i386lynx_coff_osabi_sniffer (bfd *abfd)
+{
+ if (strcmp (bfd_get_target (abfd), "coff-i386-lynx") == 0)
+ return GDB_OSABI_LYNXOS;
+
+ return GDB_OSABI_UNKNOWN;
+}
+
+\f
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386lynx_tdep (void);
+
+void
+_initialize_i386bsd_tdep (void)
+{
+ gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+ i386lynx_coff_osabi_sniffer);
- return read_memory_integer (read_register (SP_REGNUM), 4);
+ gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_LYNXOS,
+ i386lynx_init_abi);
}
NULL /* next */
};
-/* FIXME: should be multi-arch'd */
-int
-i386nbsd_aout_use_struct_convention (int gcc_p, struct type *type)
-{
- return !(TYPE_LENGTH (type) == 1
- || TYPE_LENGTH (type) == 2
- || TYPE_LENGTH (type) == 4
- || TYPE_LENGTH (type) == 8);
-}
-
void
_initialize_i386nbsd_tdep (void)
{
#include <sys/ioctl.h>
#include <fcntl.h>
-
-/* FIXME: 1998-10-21/jsm: The following used to be just "#include
- <sys/debugreg.h>", but the the Linux kernel (version 2.1.x) and
- glibc 2.0.x are not in sync; including <sys/debugreg.h> will result
- in an error. With luck, these losers will get their act together
- and we can trash this hack in the near future. */
-
#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
-#ifdef HAVE_ASM_DEBUGREG_H
-#include <asm/debugreg.h>
-#else
#include <sys/debugreg.h>
#endif
-#endif
#include <sys/file.h>
#include "gdb_stat.h"
-/* Native-dependent code for SVR4 Unix running on i386's, for GDB.
- Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001
+/* Native-dependent code for SVR4 Unix running on i386's.
+ Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
#endif
-#include "i387-tdep.h"
+#include "i386-tdep.h"
+#include "i387-tdep.h"
#ifdef HAVE_SYS_PROCFS_H
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
-/* The /proc interface divides the target machine's register set up into
- two different sets, the general register set (gregset) and the floating
- point register set (fpregset). For each set, there is an ioctl to get
- the current register set and another ioctl to set the current values.
+/* The `/proc' interface divides the target machine's register set up
+ into two different sets, the general purpose register set (gregset)
+ and the floating-point register set (fpregset). For each set,
+ there is an ioctl to get the current register set and another ioctl
+ to set the current values.
- The actual structure passed through the ioctl interface is, of course,
- naturally machine dependent, and is different for each set of registers.
- For the i386 for example, the general register set is typically defined
- by:
+ The actual structure passed through the ioctl interface is, of
+ course, naturally machine dependent, and is different for each set
+ of registers. For the i386 for example, the general-purpose
+ register set is typically defined by:
typedef int gregset_t[19]; (in <sys/regset.h>)
#define UESP 17
#define SS 18
- and the floating point set by:
-
- typedef struct fpregset
- {
- union
- {
- struct fpchip_state // fp extension state //
- {
- int state[27]; // 287/387 saved state //
- int status; // status word saved at exception //
- } fpchip_state;
- struct fp_emul_space // for emulators //
- {
- char fp_emul[246];
- char fp_epad[2];
- } fp_emul_space;
- int f_fpregs[62]; // union of the above //
- } fp_reg_set;
- long f_wregs[33]; // saved weitek state //
+ and the floating-point set by:
+
+ typedef struct fpregset {
+ union {
+ struct fpchip_state // fp extension state //
+ {
+ int state[27]; // 287/387 saved state //
+ int status; // status word saved at //
+ // exception //
+ } fpchip_state;
+ struct fp_emul_space // for emulators //
+ {
+ char fp_emul[246];
+ char fp_epad[2];
+ } fp_emul_space;
+ int f_fpregs[62]; // union of the above //
+ } fp_reg_set;
+ long f_wregs[33]; // saved weitek state //
} fpregset_t;
- These routines provide the packing and unpacking of gregset_t and
- fpregset_t formatted data.
+ Incidentally fpchip_state contains the FPU state in the same format
+ as used by the "fsave" instruction, and that's the only thing we
+ support here. I don't know how the emulator stores it state. The
+ Weitek stuff definitely isn't supported.
- */
+ The routines defined here, provide the packing and unpacking of
+ gregset_t and fpregset_t formatted data. */
#ifdef HAVE_GREGSET_T
-/* This is a duplicate of the table in i386-xdep.c. */
-
+/* Mapping between the general-purpose registers in `/proc'
+ format and GDB's register array layout. */
static int regmap[] =
{
EAX, ECX, EDX, EBX,
DS, ES, FS, GS,
};
-/* Prototypes for local functions */
-
-void fill_gregset (gregset_t *, int);
-
-void supply_gregset (gregset_t *);
-
-void supply_fpregset (fpregset_t *);
-
-void fill_fpregset (fpregset_t *, int);
-
-
-/* FIXME: These routine absolutely depends upon (NUM_REGS - NUM_FREGS)
- being less than or equal to the number of registers that can be stored
- in a gregset_t. Note that with the current scheme there will typically
- be more registers actually stored in a gregset_t that what we know
- about. This is bogus and should be fixed. */
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
+/* Fill GDB's register array with the general-purpose register values
+ in *GREGSETP. */
void
supply_gregset (gregset_t *gregsetp)
{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
- extern int regmap[];
-
- for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
- {
- supply_register (regi, (char *) (regp + regmap[regi]));
- }
+ greg_t *regp = (greg_t *) gregsetp;
+ int i;
+
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ supply_register (i, (char *) (regp + regmap[i]));
}
+/* Fill register REGNO (if it is a general-purpose register) in
+ *GREGSETPS with the value in GDB's register array. If REGNO is -1,
+ do this for all registers. */
+
void
fill_gregset (gregset_t *gregsetp, int regno)
{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
- extern int regmap[];
-
- for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- *(regp + regmap[regi]) = *(int *) ®isters[REGISTER_BYTE (regi)];
- }
- }
+ greg_t *regp = (greg_t *) gregsetp;
+ int i;
+
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
+ regcache_collect (i, regp + regmap[i]);
}
#endif /* HAVE_GREGSET_T */
-#if defined (HAVE_FPREGSET_T)
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
+#ifdef HAVE_FPREGSET_T
-/* FIXME: Assumes that fpregsetp contains an i387 FSAVE area. */
-#if !defined(FPREGSET_FSAVE_OFFSET)
-#define FPREGSET_FSAVE_OFFSET 0
-#endif
+/* Fill GDB's register array with the floating-point register values in
+ *FPREGSETP. */
void
supply_fpregset (fpregset_t *fpregsetp)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
return;
- i387_supply_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET);
+ i387_supply_fsave ((char *) fpregsetp);
}
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), update the register specified by REGNO from gdb's idea
- of the current floating point register set. If REGNO is -1, update
- them all. */
+/* Fill register REGNO (if it is a floating-point register) in
+ *FPREGSETP with the value in GDB's register array. If REGNO is -1,
+ do this for all registers. */
void
fill_fpregset (fpregset_t *fpregsetp, int regno)
{
- if (NUM_FREGS == 0)
+ if (FP0_REGNUM == 0)
return;
- i387_fill_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET, regno);
+ i387_fill_fsave ((char *) fpregsetp, regno);
}
-#endif /* defined (HAVE_FPREGSET_T) */
+#endif /* HAVE_FPREGSET_T */
#endif /* HAVE_SYS_PROCFS_H */
static gdbarch_skip_prologue_ftype ia64_skip_prologue;
static gdbarch_frame_init_saved_regs_ftype ia64_frame_init_saved_regs;
static gdbarch_get_saved_register_ftype ia64_get_saved_register;
-static gdbarch_extract_return_value_ftype ia64_extract_return_value;
-static gdbarch_extract_struct_value_address_ftype ia64_extract_struct_value_address;
+static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
+static gdbarch_deprecated_extract_struct_value_address_ftype ia64_extract_struct_value_address;
static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype ia64_frameless_function_invocation;
static gdbarch_init_extra_frame_info_ftype ia64_init_extra_frame_info;
#define FIND_GLOBAL_POINTER \
(gdbarch_tdep (current_gdbarch)->find_global_pointer)
-static char *
+static const char *
ia64_register_name (int reg)
{
return ia64_register_names[reg];
set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
- set_gdbarch_extract_return_value (gdbarch, ia64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
set_gdbarch_store_struct_return (gdbarch, ia64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, ia64_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
set_gdbarch_memory_insert_breakpoint (gdbarch, ia64_memory_insert_breakpoint);
set_gdbarch_memory_remove_breakpoint (gdbarch, ia64_memory_remove_breakpoint);
static void
float_info (char *addr_exp, int from_tty)
{
- PRINT_FLOAT_INFO ();
+ gdbarch_print_float_info (current_gdbarch, gdb_stdout, selected_frame);
}
\f
/* ARGSUSED */
CORE_ADDR step_resume_break_address;
int stop_after_trap;
int stop_soon_quietly;
- CORE_ADDR selected_frame_address;
char *stop_registers;
/* These are here because if call_function_by_hand has written some
any registers. */
char *registers;
- int selected_level;
+ /* A frame unique identifier. */
+ struct frame_id selected_frame_id;
+
int breakpoint_proceeded;
int restore_stack_info;
int proceed_to_finish;
read_register_bytes (0, inf_status->registers, REGISTER_BYTES);
- record_selected_frame (&(inf_status->selected_frame_address),
- &(inf_status->selected_level));
+ get_frame_id (selected_frame, &inf_status->selected_frame_id);
return inf_status;
}
-struct restore_selected_frame_args
-{
- CORE_ADDR frame_address;
- int level;
-};
-
static int
restore_selected_frame (void *args)
{
- struct restore_selected_frame_args *fr =
- (struct restore_selected_frame_args *) args;
+ struct frame_id *fid = (struct frame_id *) args;
struct frame_info *frame;
- int level = fr->level;
- frame = find_relative_frame (get_current_frame (), &level);
+ frame = frame_find_by_id (*fid);
/* If inf_status->selected_frame_address is NULL, there was no
previously selected frame. */
- if (frame == NULL ||
- /* FRAME_FP (frame) != fr->frame_address || */
- /* elz: deleted this check as a quick fix to the problem that
- for function called by hand gdb creates no internal frame
- structure and the real stack and gdb's idea of stack are
- different if nested calls by hands are made.
-
- mvs: this worries me. */
- level != 0)
+ if (frame == NULL)
{
warning ("Unable to restore previously selected frame.\n");
return 0;
if (target_has_stack && inf_status->restore_stack_info)
{
- struct restore_selected_frame_args fr;
- fr.level = inf_status->selected_level;
- fr.frame_address = inf_status->selected_frame_address;
/* The point of catch_errors is that if the stack is clobbered,
- walking the stack might encounter a garbage pointer and error()
- trying to dereference it. */
- if (catch_errors (restore_selected_frame, &fr,
+ walking the stack might encounter a garbage pointer and
+ error() trying to dereference it. */
+ if (catch_errors (restore_selected_frame, &inf_status->selected_frame_id,
"Unable to restore previously selected frame:\n",
RETURN_MASK_ERROR) == 0)
/* Error in restoring the selected frame. Select the innermost
frame. */
-
-
select_frame (get_current_frame ());
}
}
}
-static char *
+static const char *
m68hc11_register_name (int reg_nr)
{
if (reg_nr < 0)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_extract_return_value (gdbarch, m68hc11_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch,
- m68hc11_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
- set_gdbarch_extract_struct_value_address
+ set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, m68hc11_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, m68hc11_use_struct_convention);
set_gdbarch_init_extra_frame_info (gdbarch, m68hc11_init_extra_frame_info);
return frame_info->frame + 12;
else if (frameless_look_for_prologue (frame_info))
{
- /* Check for an interrupted system call */
- if (frame_info->next && frame_info->next->signal_handler_caller)
- return frame_info->next->frame + 16;
- else
- return frame_info->frame + 4;
+ /* Check for an interrupted system call */
+ if (frame_info->next && frame_info->next->signal_handler_caller)
+ return frame_info->next->frame + 16;
+ else
+ return frame_info->frame + 4;
}
else
return frame_info->frame;
}
if (fsr.regs[PS_REGNUM])
{
- write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4));
+ write_register (PS_REGNUM,
+ read_memory_integer (fsr.regs[PS_REGNUM], 4));
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
If so, ensure we don't go past it. If not, assume "infinity". */
sal = find_pc_line (ip, 0);
- limit = (sal.end) ? sal.end : (CORE_ADDR) ~ 0;
+ limit = (sal.end) ? sal.end : (CORE_ADDR) ~0;
while (ip < limit)
{
else if (op == P_FMOVM)
ip += 10; /* Skip fmovm */
else
- break; /* Found unknown code, bail out. */
+ break; /* Found unknown code, bail out. */
}
return (ip);
}
/* First possible address for a pc in a call dummy for this frame. */
CORE_ADDR possible_call_dummy_start =
- (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
+ (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
int nextinsn;
memset (saved_regs, 0, sizeof (*saved_regs));
next_addr += read_memory_integer (pc += 2, 4), pc += 4;
}
- for ( ; ; )
+ for (;;)
{
nextinsn = 0xffff & read_memory_integer (pc, 2);
regmask = read_memory_integer (pc + 2, 2);
buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
sp = read_register (SP_REGNUM);
- if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
- buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
+ if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
+ buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
static void
-show_macro_command (char *name, int from_tty)
+info_macro_command (char *name, int from_tty)
{
struct macro_scope *ms = NULL;
struct cleanup *cleanup_chain = make_cleanup (free_current_contents, &ms);
struct macro_definition *d;
if (! name || ! *name)
- error ("You must follow the `show macro' command with the name"
+ error ("You must follow the `info macro' command with the name"
" of the macro\n"
"whose definition you want to see.");
add_alias_cmd ("exp1", "expand-once", no_class, 1, ¯olist);
add_cmd
- ("macro", no_class, show_macro_command,
+ ("macro", no_class, info_macro_command,
"Show the definition of MACRO, and its source location.",
- &showlist);
+ &infolist);
add_cmd
("define", no_class, macro_define_command,
struct macro_scope *
-default_macro_scope ()
+default_macro_scope (void)
{
struct symtab_and_line sal;
struct macro_source_file *main;
#ifdef NOTYET
- /* FIXME: cagney/2001-09-24: A patch introducing a
- add_set_boolean_cmd() is pending, the below should probably use
- it. A patch implementing profiling is pending, this just sets up
- the framework. */
- tmpcmd = add_set_cmd ("profile", class_maintenance,
- var_boolean, &maintenance_profile_p,
- "Set internal profiling.\n\
-When enabled GDB is profiled.",
- &maintenance_set_cmdlist);
- set_cmd_sfunc (tmpcmd, maintenance_set_profile_cmd);
- add_show_from_set (tmpcmd, &maintenance_show_cmdlist);
+ /* FIXME: cagney/2002-06-15: A patch implementing profiling is
+ pending, this just sets up the framework. */
+ tmpcmd = add_setshow_boolean_cmd ("profile", class_maintenance,
+ var_boolean, &maintenance_profile_p, "\
+Set internal profiling.\n\
+When enabled GDB is profiled.", "\
+Show internal profiling.\n",
+ maintenance_set_profile_cmd, NULL,
+ &maintenance_set_cmdlist,
+ &maintenance_show_cmdlist);
#endif
}
remove redundant breakpoint info on "-break-insert" and "-break-watch".
The event now supplies everything that is needed.
+2002-06-17 Keith Seitz <keiths@redhat.com>
+
+ * gdbmi.texinfo: Update command examples with real MI behavior.
+
2002-05-20 Keith Seitz <keiths@redhat.com>
* mi-main.c (captured_mi_execute_command): Add uiout parameter.
enum mips_abi
{
- MIPS_ABI_UNKNOWN,
+ MIPS_ABI_UNKNOWN = 0,
MIPS_ABI_N32,
MIPS_ABI_O32,
MIPS_ABI_O64,
MIPS_ABI_EABI32,
- MIPS_ABI_EABI64
+ MIPS_ABI_EABI64,
+ MIPS_ABI_LAST
};
+static const char *mips_abi_string;
+
+static const char *mips_abi_strings[] = {
+ "auto",
+ "n32",
+ "o32",
+ "o64",
+ "eabi32",
+ "eabi64",
+ NULL
+};
+
struct frame_extra_info
{
mips_extra_func_info_t proc_desc;
#endif
static int mips_fpu_type_auto = 1;
static enum mips_fpu_type mips_fpu_type = MIPS_DEFAULT_FPU_TYPE;
-#define MIPS_FPU_TYPE mips_fpu_type
-
-/* Do not use "TARGET_IS_MIPS64" to test the size of floating point registers */
-#ifndef FP_REGISTER_DOUBLE
-#define FP_REGISTER_DOUBLE (REGISTER_VIRTUAL_SIZE(FP0_REGNUM) == 8)
-#endif
static int mips_debug = 0;
/* mips options */
enum mips_abi mips_abi;
- const char *mips_abi_string;
+ enum mips_abi found_abi;
enum mips_fpu_type mips_fpu_type;
int mips_last_arg_regnum;
int mips_last_fp_arg_regnum;
enum gdb_osabi osabi;
};
-#if GDB_MULTI_ARCH
-#undef MIPS_EABI
#define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
|| gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI64)
-#endif
-#if GDB_MULTI_ARCH
-#undef MIPS_LAST_FP_ARG_REGNUM
#define MIPS_LAST_FP_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_fp_arg_regnum)
-#endif
-#if GDB_MULTI_ARCH
-#undef MIPS_LAST_ARG_REGNUM
#define MIPS_LAST_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_arg_regnum)
-#endif
-#if GDB_MULTI_ARCH
-#undef MIPS_FPU_TYPE
#define MIPS_FPU_TYPE (gdbarch_tdep (current_gdbarch)->mips_fpu_type)
-#endif
/* Return the currently configured (or set) saved register size. */
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_SAVED_REGSIZE
#define MIPS_DEFAULT_SAVED_REGSIZE (gdbarch_tdep (current_gdbarch)->mips_default_saved_regsize)
-#elif !defined (MIPS_DEFAULT_SAVED_REGSIZE)
-#define MIPS_DEFAULT_SAVED_REGSIZE MIPS_REGSIZE
-#endif
static const char *mips_saved_regsize_string = size_auto;
form double-precision values). Do not use "TARGET_IS_MIPS64" to
determine if the ABI is using double-precision registers. See also
MIPS_FPU_TYPE. */
-#if GDB_MULTI_ARCH
-#undef FP_REGISTER_DOUBLE
#define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
-#endif
/* Does the caller allocate a ``home'' for each register used in the
function call? The N32 ABI and MIPS_EABI do not, the others do. */
-#if GDB_MULTI_ARCH
-#undef MIPS_REGS_HAVE_HOME_P
#define MIPS_REGS_HAVE_HOME_P (gdbarch_tdep (current_gdbarch)->mips_regs_have_home_p)
-#elif !defined (MIPS_REGS_HAVE_HOME_P)
-#define MIPS_REGS_HAVE_HOME_P (!MIPS_EABI)
-#endif
/* The amount of space reserved on the stack for registers. This is
different to MIPS_SAVED_REGSIZE as it determines the alignment of
data allocated after the registers have run out. */
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_STACK_ARGSIZE
#define MIPS_DEFAULT_STACK_ARGSIZE (gdbarch_tdep (current_gdbarch)->mips_default_stack_argsize)
-#elif !defined (MIPS_DEFAULT_STACK_ARGSIZE)
-#define MIPS_DEFAULT_STACK_ARGSIZE (MIPS_DEFAULT_SAVED_REGSIZE)
-#endif
#define MIPS_STACK_ARGSIZE (mips_stack_argsize ())
return 4;
}
-#if GDB_MULTI_ARCH
-#undef GDB_TARGET_IS_MIPS64
#define GDB_TARGET_IS_MIPS64 (gdbarch_tdep (current_gdbarch)->gdb_target_is_mips64 + 0)
-#endif
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_MASK_ADDRESS_P
#define MIPS_DEFAULT_MASK_ADDRESS_P (gdbarch_tdep (current_gdbarch)->default_mask_address_p)
-#elif !defined (MIPS_DEFAULT_MASK_ADDRESS_P)
-#define MIPS_DEFAULT_MASK_ADDRESS_P (0)
-#endif
#define VM_MIN_ADDRESS (CORE_ADDR)0x400000
char *mips_generic_reg_names[] = MIPS_REGISTER_NAMES;
char **mips_processor_reg_names = mips_generic_reg_names;
-char *
+const char *
mips_register_name (int i)
{
return mips_processor_reg_names[i];
#define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
#define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
#define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
+/* FIXME drow/2002-06-10: If a pointer on the host is bigger than a long,
+ this will corrupt pdr.iline. Fortunately we don't use it. */
#define PROC_SYMBOL(proc) (*(struct symbol**)&(proc)->pdr.isym)
#define _PROC_MAGIC_ 0x0F0F0F0F
#define PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym == _PROC_MAGIC_)
}
/* Should the upper word of 64-bit addresses be zeroed? */
-enum cmd_auto_boolean mask_address_var = CMD_AUTO_BOOLEAN_AUTO;
+enum auto_boolean mask_address_var = AUTO_BOOLEAN_AUTO;
static int
mips_mask_address_p (void)
{
switch (mask_address_var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
return 1;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
return 0;
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
return MIPS_DEFAULT_MASK_ADDRESS_P;
default:
internal_error (__FILE__, __LINE__,
}
static void
-show_mask_address (char *cmd, int from_tty)
+show_mask_address (char *cmd, int from_tty, struct cmd_list_element *c)
{
switch (mask_address_var)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
printf_filtered ("The 32 bit mips address mask is enabled\n");
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
printf_filtered ("The 32 bit mips address mask is disabled\n");
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
printf_filtered ("The 32 bit address mask is set automatically. Currently %s\n",
mips_mask_address_p () ? "enabled" : "disabled");
break;
return &temp_proc_desc;
}
+struct mips_objfile_private
+{
+ bfd_size_type size;
+ char *contents;
+};
+
+/* Global used to communicate between non_heuristic_proc_desc and
+ compare_pdr_entries within qsort (). */
+static bfd *the_bfd;
+
+static int
+compare_pdr_entries (const void *a, const void *b)
+{
+ CORE_ADDR lhs = bfd_get_32 (the_bfd, (bfd_byte *) a);
+ CORE_ADDR rhs = bfd_get_32 (the_bfd, (bfd_byte *) b);
+
+ if (lhs < rhs)
+ return -1;
+ else if (lhs == rhs)
+ return 0;
+ else
+ return 1;
+}
+
static mips_extra_func_info_t
non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
{
mips_extra_func_info_t proc_desc;
struct block *b = block_for_pc (pc);
struct symbol *sym;
+ struct obj_section *sec;
+ struct mips_objfile_private *priv;
+
+ if (PC_IN_CALL_DUMMY (pc, 0, 0))
+ return NULL;
find_pc_partial_function (pc, NULL, &startaddr, NULL);
if (addrptr)
*addrptr = startaddr;
- if (b == NULL || PC_IN_CALL_DUMMY (pc, 0, 0))
- sym = NULL;
- else
+
+ priv = NULL;
+
+ sec = find_pc_section (pc);
+ if (sec != NULL)
{
- if (startaddr > BLOCK_START (b))
- /* This is the "pathological" case referred to in a comment in
- print_frame_info. It might be better to move this check into
- symbol reading. */
- sym = NULL;
- else
- sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, 0, NULL);
+ priv = (struct mips_objfile_private *) sec->objfile->obj_private;
+
+ /* Search the ".pdr" section generated by GAS. This includes most of
+ the information normally found in ECOFF PDRs. */
+
+ the_bfd = sec->objfile->obfd;
+ if (priv == NULL
+ && (the_bfd->format == bfd_object
+ && bfd_get_flavour (the_bfd) == bfd_target_elf_flavour
+ && elf_elfheader (the_bfd)->e_ident[EI_CLASS] == ELFCLASS64))
+ {
+ /* Right now GAS only outputs the address as a four-byte sequence.
+ This means that we should not bother with this method on 64-bit
+ targets (until that is fixed). */
+
+ priv = obstack_alloc (& sec->objfile->psymbol_obstack,
+ sizeof (struct mips_objfile_private));
+ priv->size = 0;
+ sec->objfile->obj_private = priv;
+ }
+ else if (priv == NULL)
+ {
+ asection *bfdsec;
+
+ priv = obstack_alloc (& sec->objfile->psymbol_obstack,
+ sizeof (struct mips_objfile_private));
+
+ bfdsec = bfd_get_section_by_name (sec->objfile->obfd, ".pdr");
+ if (bfdsec != NULL)
+ {
+ priv->size = bfd_section_size (sec->objfile->obfd, bfdsec);
+ priv->contents = obstack_alloc (& sec->objfile->psymbol_obstack,
+ priv->size);
+ bfd_get_section_contents (sec->objfile->obfd, bfdsec,
+ priv->contents, 0, priv->size);
+
+ /* In general, the .pdr section is sorted. However, in the
+ presence of multiple code sections (and other corner cases)
+ it can become unsorted. Sort it so that we can use a faster
+ binary search. */
+ qsort (priv->contents, priv->size / 32, 32, compare_pdr_entries);
+ }
+ else
+ priv->size = 0;
+
+ sec->objfile->obj_private = priv;
+ }
+ the_bfd = NULL;
+
+ if (priv->size != 0)
+ {
+ int low, mid, high;
+ char *ptr;
+
+ low = 0;
+ high = priv->size / 32;
+
+ do
+ {
+ CORE_ADDR pdr_pc;
+
+ mid = (low + high) / 2;
+
+ ptr = priv->contents + mid * 32;
+ pdr_pc = bfd_get_signed_32 (sec->objfile->obfd, ptr);
+ pdr_pc += ANOFFSET (sec->objfile->section_offsets,
+ SECT_OFF_TEXT (sec->objfile));
+ if (pdr_pc == startaddr)
+ break;
+ if (pdr_pc > startaddr)
+ high = mid;
+ else
+ low = mid + 1;
+ }
+ while (low != high);
+
+ if (low != high)
+ {
+ struct symbol *sym = find_pc_function (pc);
+
+ /* Fill in what we need of the proc_desc. */
+ proc_desc = (mips_extra_func_info_t)
+ obstack_alloc (&sec->objfile->psymbol_obstack,
+ sizeof (struct mips_extra_func_info));
+ PROC_LOW_ADDR (proc_desc) = startaddr;
+
+ /* Only used for dummy frames. */
+ PROC_HIGH_ADDR (proc_desc) = 0;
+
+ PROC_FRAME_OFFSET (proc_desc)
+ = bfd_get_32 (sec->objfile->obfd, ptr + 20);
+ PROC_FRAME_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+ ptr + 24);
+ PROC_FRAME_ADJUST (proc_desc) = 0;
+ PROC_REG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+ ptr + 4);
+ PROC_FREG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+ ptr + 12);
+ PROC_REG_OFFSET (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+ ptr + 8);
+ PROC_FREG_OFFSET (proc_desc)
+ = bfd_get_32 (sec->objfile->obfd, ptr + 16);
+ PROC_PC_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+ ptr + 28);
+ proc_desc->pdr.isym = (long) sym;
+
+ return proc_desc;
+ }
+ }
+ }
+
+ if (b == NULL)
+ return NULL;
+
+ if (startaddr > BLOCK_START (b))
+ {
+ /* This is the "pathological" case referred to in a comment in
+ print_frame_info. It might be better to move this check into
+ symbol reading. */
+ return NULL;
}
+ sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, 0, NULL);
+
/* If we never found a PDR for this function in symbol reading, then
examine prologues to find the information. */
if (sym)
{
mips_fpu_type = MIPS_FPU_SINGLE;
mips_fpu_type_auto = 0;
- if (GDB_MULTI_ARCH)
- {
- gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_SINGLE;
- }
+ gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_SINGLE;
}
static void
{
mips_fpu_type = MIPS_FPU_DOUBLE;
mips_fpu_type_auto = 0;
- if (GDB_MULTI_ARCH)
- {
- gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_DOUBLE;
- }
+ gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_DOUBLE;
}
static void
{
mips_fpu_type = MIPS_FPU_NONE;
mips_fpu_type_auto = 0;
- if (GDB_MULTI_ARCH)
- {
- gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_NONE;
- }
+ gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_NONE;
}
static void
TYPE_LENGTH (builtin_type_void_data_ptr));
}
+static void
+mips_find_abi_section (bfd *abfd, asection *sect, void *obj)
+{
+ enum mips_abi *abip = (enum mips_abi *) obj;
+ const char *name = bfd_get_section_name (abfd, sect);
+
+ if (*abip != MIPS_ABI_UNKNOWN)
+ return;
+
+ if (strncmp (name, ".mdebug.", 8) != 0)
+ return;
+
+ if (strcmp (name, ".mdebug.abi32") == 0)
+ *abip = MIPS_ABI_O32;
+ else if (strcmp (name, ".mdebug.abiN32") == 0)
+ *abip = MIPS_ABI_N32;
+ else if (strcmp (name, ".mdebug.abiO64") == 0)
+ *abip = MIPS_ABI_O64;
+ else if (strcmp (name, ".mdebug.eabi32") == 0)
+ *abip = MIPS_ABI_EABI32;
+ else if (strcmp (name, ".mdebug.eabi64") == 0)
+ *abip = MIPS_ABI_EABI64;
+ else
+ warning ("unsupported ABI %s.", name + 8);
+}
+
+static enum mips_abi
+global_mips_abi (void)
+{
+ int i;
+
+ for (i = 0; mips_abi_strings[i] != NULL; i++)
+ if (mips_abi_strings[i] == mips_abi_string)
+ return (enum mips_abi) i;
+
+ internal_error (__FILE__, __LINE__,
+ "unknown ABI string");
+}
+
static struct gdbarch *
mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches)
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
int elf_flags;
- enum mips_abi mips_abi;
+ enum mips_abi mips_abi, found_abi, wanted_abi;
enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
/* Reset the disassembly info, in case it was set to something
break;
}
+ /* GCC creates a pseudo-section whose name describes the ABI. */
+ if (mips_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
+ bfd_map_over_sections (info.abfd, mips_find_abi_section, &mips_abi);
+
+ /* If we have no bfd, then mips_abi will still be MIPS_ABI_UNKNOWN.
+ Use the ABI from the last architecture if there is one. */
+ if (info.abfd == NULL && arches != NULL)
+ mips_abi = gdbarch_tdep (arches->gdbarch)->found_abi;
+
/* Try the architecture for any hint of the corect ABI */
if (mips_abi == MIPS_ABI_UNKNOWN
&& info.bfd_arch_info != NULL
break;
}
}
+
#ifdef MIPS_DEFAULT_ABI
if (mips_abi == MIPS_ABI_UNKNOWN)
mips_abi = MIPS_DEFAULT_ABI;
#endif
+ if (mips_abi == MIPS_ABI_UNKNOWN)
+ mips_abi = MIPS_ABI_O32;
+
+ /* Now that we have found what the ABI for this binary would be,
+ check whether the user is overriding it. */
+ found_abi = mips_abi;
+ wanted_abi = global_mips_abi ();
+ if (wanted_abi != MIPS_ABI_UNKNOWN)
+ mips_abi = wanted_abi;
+
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
fprintf_unfiltered (gdb_stdlog,
"mips_gdbarch_init: mips_abi = %d\n",
mips_abi);
+ fprintf_unfiltered (gdb_stdlog,
+ "mips_gdbarch_init: found_mips_abi = %d\n",
+ found_abi);
}
/* try to find a pre-existing architecture */
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
+ tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
switch (mips_abi)
{
case MIPS_ABI_O32:
- tdep->mips_abi_string = "o32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_O64:
- tdep->mips_abi_string = "o64";
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_EABI32:
- tdep->mips_abi_string = "eabi32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 4;
tdep->mips_fp_register_double = 0;
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_EABI64:
- tdep->mips_abi_string = "eabi64";
tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
set_gdbarch_long_long_bit (gdbarch, 64);
break;
case MIPS_ABI_N32:
- tdep->mips_abi_string = "n32";
tdep->mips_default_saved_regsize = 4;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tm_print_insn_info.mach = bfd_mach_mips8000;
break;
default:
- tdep->mips_abi_string = "default";
- tdep->mips_default_saved_regsize = MIPS_REGSIZE;
- tdep->mips_default_stack_argsize = MIPS_REGSIZE;
- tdep->mips_fp_register_double = (REGISTER_VIRTUAL_SIZE (FP0_REGNUM) == 8);
- tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
- tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
- tdep->mips_regs_have_home_p = 1;
- tdep->gdb_target_is_mips64 = 0;
- tdep->default_mask_address_p = 0;
- set_gdbarch_long_bit (gdbarch, 32);
- set_gdbarch_ptr_bit (gdbarch, 32);
- set_gdbarch_long_long_bit (gdbarch, 64);
- break;
+ internal_error (__FILE__, __LINE__,
+ "unknown ABI in switch");
}
/* FIXME: jlarmour/2000-04-07: There *is* a flag EF_MIPS_32BIT_MODE
return gdbarch;
}
+static void
+mips_abi_update (char *ignore_args, int from_tty,
+ struct cmd_list_element *c)
+{
+ struct gdbarch_info info;
+
+ /* Force the architecture to update, and (if it's a MIPS architecture)
+ mips_gdbarch_init will take care of the rest. */
+ gdbarch_info_init (&info);
+ gdbarch_update_p (info);
+}
+
static void
mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
{
fprintf_unfiltered (file,
"mips_dump_tdep: tdep->mips_abi = %d (%s)\n",
tdep->mips_abi,
- tdep->mips_abi_string);
+ mips_abi_strings[tdep->mips_abi]);
fprintf_unfiltered (file,
"mips_dump_tdep: mips_mask_address_p() %d (default %d)\n",
mips_mask_address_p (),
static struct cmd_list_element *mipsfpulist = NULL;
struct cmd_list_element *c;
+ mips_abi_string = mips_abi_strings [MIPS_ABI_UNKNOWN];
+ if (MIPS_ABI_LAST + 1
+ != sizeof (mips_abi_strings) / sizeof (mips_abi_strings[0]))
+ internal_error (__FILE__, __LINE__, "mips_abi_strings out of sync");
+
gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
if (!tm_print_insn) /* Someone may have already set it */
tm_print_insn = gdb_print_insn_mips;
&setmipscmdlist),
&showmipscmdlist);
+ /* Allow the user to override the ABI. */
+ c = add_set_enum_cmd
+ ("abi", class_obscure, mips_abi_strings, &mips_abi_string,
+ "Set the ABI used by this program.\n"
+ "This option can be set to one of:\n"
+ " auto - the default ABI associated with the current binary\n"
+ " o32\n"
+ " o64\n"
+ " n32\n"
+ " eabi32\n"
+ " eabi64",
+ &setmipscmdlist);
+ add_show_from_set (c, &showmipscmdlist);
+ set_cmd_sfunc (c, mips_abi_update);
+
/* Let the user turn off floating point and set the fence post for
heuristic_proc_start. */
"Show current use of MIPS floating-point coprocessor target.",
&showlist);
-#if !GDB_MULTI_ARCH
- c = add_set_cmd ("processor", class_support, var_string_noescape,
- (char *) &tmp_mips_processor_type,
- "Set the type of MIPS processor in use.\n\
-Set this to be able to access processor-type-specific registers.\n\
-",
- &setlist);
- set_cmd_cfunc (c, mips_set_processor_type_command);
- c = add_show_from_set (c, &showlist);
- set_cmd_cfunc (c, mips_show_processor_type_command);
-
- tmp_mips_processor_type = xstrdup (DEFAULT_MIPS_TYPE);
- mips_set_processor_type_command (xstrdup (DEFAULT_MIPS_TYPE), 0);
-#endif
-
/* We really would like to have both "0" and "unlimited" work, but
command.c doesn't deal with that. So make it a var_zinteger
because the user can always use "999999" or some such for unlimited. */
/* Allow the user to control whether the upper bits of 64-bit
addresses should be zeroed. */
- c = add_set_auto_boolean_cmd ("mask-address", no_class, &mask_address_var,
- "Set zeroing of upper 32 bits of 64-bit addresses.\n\
-Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to allow GDB to determine\n\
-the correct value.\n",
- &setmipscmdlist);
- add_cmd ("mask-address", no_class, show_mask_address,
- "Show current mask-address value", &showmipscmdlist);
+ add_setshow_auto_boolean_cmd ("mask-address", no_class, &mask_address_var, "\
+Set zeroing of upper 32 bits of 64-bit addresses.\n\
+Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to \n\
+allow GDB to determine the correct value.\n", "\
+Show zeroing of upper 32 bits of 64-bit addresses.",
+ NULL, show_mask_address,
+ &setmipscmdlist, &showmipscmdlist);
/* Allow the user to control the size of 32 bit registers within the
raw remote packet. */
return regs[reg];
}
-static char *
+static const char *
mn10300_generic_register_name (int reg)
{
static char *regs[] =
}
-static char *
+static const char *
am33_register_name (int reg)
{
static char *regs[] =
set_gdbarch_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs);
set_gdbarch_frame_chain (gdbarch, mn10300_frame_chain);
set_gdbarch_frame_saved_pc (gdbarch, mn10300_frame_saved_pc);
- set_gdbarch_extract_return_value (gdbarch, mn10300_extract_return_value);
- set_gdbarch_extract_struct_value_address
+ set_gdbarch_deprecated_extract_return_value (gdbarch, mn10300_extract_return_value);
+ set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, mn10300_extract_struct_value_address);
set_gdbarch_store_return_value (gdbarch, mn10300_store_return_value);
set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return);
static int ns32k_localcount (CORE_ADDR enter_pc);
static void flip_bytes (void *, int);
-static char *
+static const char *
ns32k_register_name_32082 (int regno)
{
static char *register_names[] =
return (register_names[regno]);
}
-static char *
+static const char *
ns32k_register_name_32382 (int regno)
{
static char *register_names[] =
/* Return value info */
set_gdbarch_store_struct_return (gdbarch, ns32k_store_struct_return);
- set_gdbarch_extract_return_value (gdbarch, ns32k_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value);
set_gdbarch_store_return_value (gdbarch, ns32k_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch,
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
ns32k_extract_struct_value_address);
/* Call dummy info */
so that it gets freed automatically when reading a new object
file. */
- PTR obj_private;
+ void *obj_private;
/* Set of relocation offsets to apply to each section.
Currently on the psymbol_obstack (which makes no sense, but I'm
"NetBSD a.out",
"NetBSD ELF",
"Windows CE",
+ "DJGPP",
+ "NetWare",
+ "LynxOS",
"ARM EABI v1",
"ARM EABI v2",
GDB_OSABI_NETBSD_AOUT,
GDB_OSABI_NETBSD_ELF,
GDB_OSABI_WINCE,
+ GDB_OSABI_GO32,
+ GDB_OSABI_NETWARE,
+ GDB_OSABI_LYNXOS,
GDB_OSABI_ARM_EABI_V1,
GDB_OSABI_ARM_EABI_V2,
/* Handle HP ELF shared libraries for GDB, the GNU Debugger.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GDB.
#include "gdb-stabs.h"
#include "gdb_stat.h"
#include "gdbcmd.h"
-#include "assert.h"
#include "language.h"
#include "regcache.h"
typedef struct
{
CORE_ADDR dld_flags_addr;
- long long dld_flags;
+ LONGEST dld_flags;
sec_ptr dyninfo_sect;
boolean have_read_dld_descriptor;
boolean is_valid;
/* Now find the true lowest section in the shared library. */
sec = NULL;
- bfd_map_over_sections (tmp_bfd, find_lowest_section, (PTR) &sec);
+ bfd_map_over_sections (tmp_bfd, find_lowest_section, &sec);
if (sec)
{
sizeof (obj_private_data_t));
obj_private->unwind_info = NULL;
obj_private->so_info = NULL;
- so->objfile->obj_private = (PTR) obj_private;
+ so->objfile->obj_private = obj_private;
}
obj_private = (obj_private_data_t *) so->objfile->obj_private;
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (xfree, (PTR) symbol_table);
+ back_to = make_cleanup (xfree, symbol_table);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
{
sym = *symbol_table++;
- if (STREQ (sym->name, symname))
+ if (strcmp (sym->name, symname) == 0)
{
/* Bfd symbols are section relative. */
symaddr = sym->value + sym->section->vma;
return rs6000_frame_chain (thisframe);
}
-/* FIXME: Move the following to rs6000-tdep.c (or some other file where
- it may be used generically by ports which use either the SysV ABI or
- the EABI */
-
-/* Until November 2001, gcc was not complying to the SYSV ABI for
- returning structures less than or equal to 8 bytes in size. It was
- returning everything in memory. When this was corrected, it wasn't
- fixed for native platforms. */
-int
-ppc_sysv_abi_broken_use_struct_convention (int gcc_p, struct type *value_type)
-{
- if (TYPE_LENGTH (value_type) == 16
- && TYPE_VECTOR (value_type))
- return 0;
-
- return generic_use_struct_convention (gcc_p, value_type);
-}
-
-/* Structures 8 bytes or less long are returned in the r3 & r4
- registers, according to the SYSV ABI. */
-int
-ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
-{
- if (TYPE_LENGTH (value_type) == 16
- && TYPE_VECTOR (value_type))
- return 0;
-
- return (TYPE_LENGTH (value_type) > 8);
-}
-
-/* round2 rounds x up to the nearest multiple of s assuming that s is a
- power of 2 */
-
-#undef round2
-#define round2(x,s) ((((long) (x) - 1) & ~(long)((s)-1)) + (s))
-
-/* Pass the arguments in either registers, or in the stack. Using the
- ppc sysv ABI, the first eight words of the argument list (that might
- be less than eight parameters if some parameters occupy more than one
- word) are passed in r3..r10 registers. float and double parameters are
- passed in fpr's, in addition to that. Rest of the parameters if any
- are passed in user stack.
-
- If the function is returning a structure, then the return address is passed
- in r3, then the first 7 words of the parametes can be passed in registers,
- starting from r4. */
-
-CORE_ADDR
-ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
-{
- int argno;
- /* Next available general register for non-float, non-vector arguments. */
- int greg;
- /* Next available floating point register for float arguments. */
- int freg;
- /* Next available vector register for vector arguments. */
- int vreg;
- int argstkspace;
- int structstkspace;
- int argoffset;
- int structoffset;
- struct value *arg;
- struct type *type;
- int len;
- char old_sp_buf[4];
- CORE_ADDR saved_sp;
-
- greg = struct_return ? 4 : 3;
- freg = 1;
- vreg = 2;
- argstkspace = 0;
- structstkspace = 0;
-
- /* Figure out how much new stack space is required for arguments
- which don't fit in registers. Unlike the PowerOpen ABI, the
- SysV ABI doesn't reserve any extra space for parameters which
- are put in registers. */
- for (argno = 0; argno < nargs; argno++)
- {
- arg = args[argno];
- type = check_typedef (VALUE_TYPE (arg));
- len = TYPE_LENGTH (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
- {
- if (freg <= 8)
- freg++;
- else
- {
- /* SysV ABI converts floats to doubles when placed in
- memory and requires 8 byte alignment */
- if (argstkspace & 0x4)
- argstkspace += 4;
- argstkspace += 8;
- }
- }
- else if (TYPE_CODE (type) == TYPE_CODE_INT && len == 8) /* long long */
- {
- if (greg > 9)
- {
- greg = 11;
- if (argstkspace & 0x4)
- argstkspace += 4;
- argstkspace += 8;
- }
- else
- {
- if ((greg & 1) == 0)
- greg++;
- greg += 2;
- }
- }
- else if (!TYPE_VECTOR (type))
- {
- if (len > 4
- || TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION)
- {
- /* Rounding to the nearest multiple of 8 may not be necessary,
- but it is safe. Particularly since we don't know the
- field types of the structure */
- structstkspace += round2 (len, 8);
- }
- if (greg <= 10)
- greg++;
- else
- argstkspace += 4;
- }
- else
- {
- if (len == 16
- && TYPE_CODE (type) == TYPE_CODE_ARRAY
- && TYPE_VECTOR (type))
- {
- if (vreg <= 13)
- vreg++;
- else
- {
- /* Vector arguments must be aligned to 16 bytes on
- the stack. */
- argstkspace += round2 (argstkspace, 16);
- argstkspace += 16;
- }
- }
- }
- }
-
- /* Get current SP location */
- saved_sp = read_sp ();
-
- sp -= argstkspace + structstkspace;
-
- /* Allocate space for backchain and callee's saved lr */
- sp -= 8;
-
- /* Make sure that we maintain 16 byte alignment */
- sp &= ~0x0f;
-
- /* Update %sp before proceeding any further */
- write_register (SP_REGNUM, sp);
-
- /* write the backchain */
- store_address (old_sp_buf, 4, saved_sp);
- write_memory (sp, old_sp_buf, 4);
-
- argoffset = 8;
- structoffset = argoffset + argstkspace;
- freg = 1;
- greg = 3;
- vreg = 2;
- /* Fill in r3 with the return structure, if any */
- if (struct_return)
- {
- char val_buf[4];
- store_address (val_buf, 4, struct_addr);
- memcpy (®isters[REGISTER_BYTE (greg)], val_buf, 4);
- greg++;
- }
- /* Now fill in the registers and stack... */
- for (argno = 0; argno < nargs; argno++)
- {
- arg = args[argno];
- type = check_typedef (VALUE_TYPE (arg));
- len = TYPE_LENGTH (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
- {
- if (freg <= 8)
- {
- if (len > 8)
- printf_unfiltered (
- "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (®isters[REGISTER_BYTE (FP0_REGNUM + freg)],
- VALUE_CONTENTS (arg), len);
- freg++;
- }
- else
- {
- /* SysV ABI converts floats to doubles when placed in
- memory and requires 8 byte alignment */
- /* FIXME: Convert floats to doubles */
- if (argoffset & 0x4)
- argoffset += 4;
- write_memory (sp + argoffset, (char *) VALUE_CONTENTS (arg), len);
- argoffset += 8;
- }
- }
- else if (TYPE_CODE (type) == TYPE_CODE_INT && len == 8) /* long long */
- {
- if (greg > 9)
- {
- greg = 11;
- if (argoffset & 0x4)
- argoffset += 4;
- write_memory (sp + argoffset, (char *) VALUE_CONTENTS (arg), len);
- argoffset += 8;
- }
- else
- {
- if ((greg & 1) == 0)
- greg++;
-
- memcpy (®isters[REGISTER_BYTE (greg)],
- VALUE_CONTENTS (arg), 4);
- memcpy (®isters[REGISTER_BYTE (greg + 1)],
- VALUE_CONTENTS (arg) + 4, 4);
- greg += 2;
- }
- }
- else if (!TYPE_VECTOR (type))
- {
- char val_buf[4];
- if (len > 4
- || TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_UNION)
- {
- write_memory (sp + structoffset, VALUE_CONTENTS (arg), len);
- store_address (val_buf, 4, sp + structoffset);
- structoffset += round2 (len, 8);
- }
- else
- {
- memset (val_buf, 0, 4);
- memcpy (val_buf, VALUE_CONTENTS (arg), len);
- }
- if (greg <= 10)
- {
- memcpy (®isters[REGISTER_BYTE (greg)], val_buf, 4);
- greg++;
- }
- else
- {
- write_memory (sp + argoffset, val_buf, 4);
- argoffset += 4;
- }
- }
- else
- {
- if (len == 16
- && TYPE_CODE (type) == TYPE_CODE_ARRAY
- && TYPE_VECTOR (type))
- {
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- char *v_val_buf = alloca (16);
- memset (v_val_buf, 0, 16);
- memcpy (v_val_buf, VALUE_CONTENTS (arg), len);
- if (vreg <= 13)
- {
- memcpy (®isters[REGISTER_BYTE (tdep->ppc_vr0_regnum
- + vreg)],
- v_val_buf, 16);
- vreg++;
- }
- else
- {
- write_memory (sp + argoffset, v_val_buf, 16);
- argoffset += 16;
- }
- }
- }
- }
-
- target_store_registers (-1);
- return sp;
-}
-
/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint
in much the same fashion as memory_remove_breakpoint in mem-break.c,
but is careful not to write back the previous contents if the code
return lmp;
}
+
+static void
+ppc_linux_init_abi (struct gdbarch_info info,
+ struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ /* Until November 2001, gcc was not complying to the SYSV ABI for
+ returning structures less than or equal to 8 bytes in size. It was
+ returning everything in memory. When this was corrected, it wasn't
+ fixed for native platforms. */
+ set_gdbarch_use_struct_convention (gdbarch,
+ ppc_sysv_abi_broken_use_struct_convention);
+
+ if (tdep->wordsize == 4)
+ {
+ /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
+ *_push_arguments(). The same remarks hold for the methods below. */
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ ppc_linux_frameless_function_invocation);
+ set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
+ set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
+
+ set_gdbarch_frame_init_saved_regs (gdbarch,
+ ppc_linux_frame_init_saved_regs);
+ set_gdbarch_init_extra_frame_info (gdbarch,
+ ppc_linux_init_extra_frame_info);
+
+ set_gdbarch_memory_remove_breakpoint (gdbarch,
+ ppc_linux_memory_remove_breakpoint);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
+ }
+}
+
+void
+_initialize_ppc_linux_tdep (void)
+{
+ gdbarch_register_osabi (bfd_arch_powerpc, GDB_OSABI_LINUX,
+ ppc_linux_init_abi);
+}
#ifndef PPC_TDEP_H
#define PPC_TDEP_H
+#include "osabi.h"
+
struct frame_info;
struct value;
struct gdbarch_tdep
{
int wordsize; /* size in bytes of fixed-point word */
- int osabi; /* OS / ABI from ELF header */
+ enum gdb_osabi osabi; /* OS / ABI from ELF header */
int *regoff; /* byte offsets in register arrays */
const struct reg *regs; /* from current variant */
int ppc_gp0_regnum; /* GPR register 0 */
#include "defs.h"
#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
#include "ppc-tdep.h"
#include "ppcnbsd-tdep.h"
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- /* Until November 2001, gcc was not complying to the SYSV ABI for
- returning structures less than or equal to 8 bytes in size. It was
- returning everything in memory. When this was corrected, it wasn't
- fixed for native platforms. */
- set_gdbarch_use_struct_convention (gdbarch,
- ppc_sysv_abi_broken_use_struct_convention);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
/* The following line is equivalent to: */
/* setlinebuf (angelDebugLogFile); */
setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
-#if defined(__CYGWIN32__) || defined(__CYGWIN__)
+#if defined(__CYGWIN__)
setmode(fileno(angelDebugLogFile), O_TEXT);
#endif
}
# define offsetof(T, member) ((char *)&(((T *)0)->member) - (char *)0)
#endif
-/* If under Cygwin, provide backwards compatibility with older
- Cygwin compilers that don't define the current cpp define. */
-#ifdef __CYGWIN32__
-#ifndef __CYGWIN__
-#define __CYGWIN__
-#endif
-#endif
-
/* A temporary sop to older compilers */
#if defined (__NetBSD__) || defined (unix)
# ifndef __unix /* (good for long-term portability?) */
#endif
#if defined(_WIN32)
# define COMPILING_ON_WIN32 1
-# if !defined(__CYGWIN32__)
+# if !defined(__CYGWIN__)
# define COMPILING_ON_WINDOWS 1
# endif
#endif
- ((time_was->tv_sec * 1000000) + time_was->tv_usec) );
}
-#if !defined(__unix) && !defined(__CYGWIN32__)
+#if !defined(__unix) && !defined(__CYGWIN__)
static void gettimeofday( struct timeval *time_now, void *dummy )
{
time_t t = clock();
#ifndef angsd_hostchan_h
#define angsd_hostchan_h
-/* If under Cygwin, provide backwards compatibility with older
- Cygwin compilers that don't define the current cpp define. */
-#ifdef __CYGWIN32__
-#ifndef __CYGWIN__
-#define __CYGWIN__
-#endif
-#endif
-
/* A temporary sop to older compilers */
#if defined (__NetBSD__) || defined (unix)
# ifndef __unix /* (good for long-term portability?) */
#endif
/* struct timeval */
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
# include <sys/time.h>
#else
# include "winsock.h"
serial_reset();
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
Unix_ioctlNonBlocking();
#endif
serpar_reset();
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
Unix_ioctlNonBlocking();
#endif
#define PARPORT2 "/dev/par1"
#endif
-#if defined(_WIN32) || defined (__CYGWIN32__)
+#if defined(_WIN32) || defined (__CYGWIN__)
#define SERIAL_PREFIX "com"
#define SERPORT1 "com1"
#define SERPORT2 "com2"
extern int Unix_OpenSerial(const char *name)
{
-#if defined(BSD) || defined(__CYGWIN32__)
+#if defined(BSD) || defined(__CYGWIN__)
serpfd = open(name, O_RDWR);
#else
serpfd = open(name, O_RDWR | O_NONBLOCK);
"Withough an argument, it will display current state.\n",
&maintenancelist);
- add_show_from_set
- (add_set_boolean_cmd
- ("rdiromatzero", no_class, &rom_at_zero,
- "Set target has ROM at addr 0.\n"
- "A true value disables vector catching, false enables vector catching.\n"
- "This is evaluated at the time the 'target rdi' command is executed\n",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_boolean_cmd
- ("rdiheartbeat", no_class, &rdi_heartbeat,
- "Set enable for ADP heartbeat packets.\n"
- "I don't know why you would want this. If you enable them,\n"
- "it will confuse ARM and EPI JTAG interface boxes as well\n"
- "as the Angel Monitor.\n",
- &setlist),
- &showlist);
+ add_setshow_boolean_cmd
+ ("rdiromatzero", no_class, &rom_at_zero,
+ "Set target has ROM at addr 0.\n"
+ "A true value disables vector catching, false enables vector catching.\n"
+ "This is evaluated at the time the 'target rdi' command is executed\n",
+ "Show if target has ROM at addr 0.\n",
+ NULL, NULL,
+ &setlist, &showlist);
+
+ add_setshow_boolean_cmd
+ ("rdiheartbeat", no_class, &rdi_heartbeat,
+ "Set enable for ADP heartbeat packets.\n"
+ "I don't know why you would want this. If you enable them,\n"
+ "it will confuse ARM and EPI JTAG interface boxes as well\n"
+ "as the Angel Monitor.\n",
+ "Show enable for ADP heartbeat packets.\n",
+ NULL, NULL,
+ &setlist, &showlist);
}
/* A little dummy to make linking with the library succeed. */
#include "defs.h"
#include "inferior.h"
#include "value.h"
-#include "callback.h"
+#include "gdb/callback.h"
#include "command.h"
#include <ctype.h>
#include <fcntl.h>
#include "terminal.h"
#include "target.h"
#include "gdbcore.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "remote-utils.h"
#include "command.h"
#include "regcache.h"
+#include "gdb_assert.h"
+#include "sim-regno.h"
/* Prototypes */
}
}
+int
+one2one_register_sim_regno (int regnum)
+{
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+ return regnum;
+}
+
static void
gdbsim_fetch_register (int regno)
{
- static int warn_user = 1;
if (regno == -1)
{
for (regno = 0; regno < NUM_REGS; regno++)
gdbsim_fetch_register (regno);
+ return;
}
- else if (REGISTER_NAME (regno) != NULL
- && *REGISTER_NAME (regno) != '\0')
+
+ switch (REGISTER_SIM_REGNO (regno))
{
- char buf[MAX_REGISTER_RAW_SIZE];
- int nr_bytes;
- if (REGISTER_SIM_REGNO (regno) >= 0)
+ case LEGACY_SIM_REGNO_IGNORE:
+ break;
+ case SIM_REGNO_DOES_NOT_EXIST:
+ {
+ /* For moment treat a `does not exist' register the same way
+ as an ``unavailable'' register. */
+ char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+ int nr_bytes;
+ memset (buf, 0, MAX_REGISTER_RAW_SIZE);
+ supply_register (regno, buf);
+ set_register_cached (regno, -1);
+ break;
+ }
+ default:
+ {
+ static int warn_user = 1;
+ char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+ int nr_bytes;
+ gdb_assert (regno >= 0 && regno < NUM_REGS);
+ memset (buf, 0, MAX_REGISTER_RAW_SIZE);
nr_bytes = sim_fetch_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
buf, REGISTER_RAW_SIZE (regno));
- else
- nr_bytes = 0;
- if (nr_bytes == 0)
- /* register not applicable, supply zero's */
- memset (buf, 0, MAX_REGISTER_RAW_SIZE);
- else if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno)
- && warn_user)
- {
- fprintf_unfiltered (gdb_stderr,
- "Size of register %s (%d/%d) incorrect (%d instead of %d))",
- REGISTER_NAME (regno),
- regno, REGISTER_SIM_REGNO (regno),
- nr_bytes, REGISTER_RAW_SIZE (regno));
- warn_user = 0;
- }
- supply_register (regno, buf);
- if (sr_get_debug ())
- {
- printf_filtered ("gdbsim_fetch_register: %d", regno);
- /* FIXME: We could print something more intelligible. */
- dump_mem (buf, REGISTER_RAW_SIZE (regno));
- }
+ if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno) && warn_user)
+ {
+ fprintf_unfiltered (gdb_stderr,
+ "Size of register %s (%d/%d) incorrect (%d instead of %d))",
+ REGISTER_NAME (regno),
+ regno, REGISTER_SIM_REGNO (regno),
+ nr_bytes, REGISTER_RAW_SIZE (regno));
+ warn_user = 0;
+ }
+ /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
+ indicatingthat GDB and the SIM have different ideas about
+ which registers are fetchable. */
+ /* Else if (nr_bytes < 0): an old simulator, that doesn't
+ think to return the register size. Just assume all is ok. */
+ supply_register (regno, buf);
+ if (sr_get_debug ())
+ {
+ printf_filtered ("gdbsim_fetch_register: %d", regno);
+ /* FIXME: We could print something more intelligible. */
+ dump_mem (buf, REGISTER_RAW_SIZE (regno));
+ }
+ break;
+ }
}
}
{
for (regno = 0; regno < NUM_REGS; regno++)
gdbsim_store_register (regno);
+ return;
}
- else if (REGISTER_NAME (regno) != NULL
- && *REGISTER_NAME (regno) != '\0'
- && REGISTER_SIM_REGNO (regno) >= 0)
+ else if (REGISTER_SIM_REGNO (regno) >= 0)
{
char tmp[MAX_REGISTER_RAW_SIZE];
int nr_bytes;
if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
internal_error (__FILE__, __LINE__,
"Register size different to expected");
+ /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
+ indicatingthat GDB and the SIM have different ideas about
+ which registers are fetchable. */
if (sr_get_debug ())
{
printf_filtered ("gdbsim_store_register: %d", regno);
+++ /dev/null
-/* Am29k-dependent portions of the RPC protocol
-
- Contributed by Wind River Systems.
-
- This file is part of GDB.
-
- 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 <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX /* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* Generic register read/write routines in remote-vx.c. */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
- REGNO is the register to read, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_read_register (int regno)
-{
- char am29k_greg_packet[AM29K_GREG_PLEN];
- char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
- /* Get general-purpose registers. When copying values into
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- net_read_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_GETREGS);
-
- /* Now copy the register values into registers[].
- Note that this code depends on the ordering of the REGNUMs
- as defined in "tm-29k.h". */
-
- bcopy (&am29k_greg_packet[AM29K_R_GR96],
- ®isters[REGISTER_BYTE (GR96_REGNUM)], 160 * AM29K_GREG_SIZE);
- bcopy (&am29k_greg_packet[AM29K_R_VAB],
- ®isters[REGISTER_BYTE (VAB_REGNUM)], 15 * AM29K_GREG_SIZE);
- registers[REGISTER_BYTE (INTE_REGNUM)] = am29k_greg_packet[AM29K_R_INTE];
- bcopy (&am29k_greg_packet[AM29K_R_RSP],
- ®isters[REGISTER_BYTE (GR1_REGNUM)], 5 * AM29K_GREG_SIZE);
-
- /* PAD For now, don't care about exop register */
-
- memset (®isters[REGISTER_BYTE (EXO_REGNUM)], '\0', AM29K_GREG_SIZE);
-
- /* If the target has floating point registers, fetch them.
- Otherwise, zero the floating point register values in
- registers[] for good measure, even though we might not
- need to. */
-
- if (target_has_fp)
- {
- net_read_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
- PTRACE_GETFPREGS);
- registers[REGISTER_BYTE (FPE_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPE];
- registers[REGISTER_BYTE (FPS_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPS];
-
- /* PAD For now, don't care about registers (?) AI0 to q */
-
- memset (®isters[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
- }
- else
- {
- memset (®isters[REGISTER_BYTE (FPE_REGNUM)], '\0', AM29K_FPREG_SIZE);
- memset (®isters[REGISTER_BYTE (FPS_REGNUM)], '\0', AM29K_FPREG_SIZE);
-
- /* PAD For now, don't care about registers (?) AI0 to q */
-
- memset (®isters[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
- }
-
- /* Mark the register cache valid. */
-
- registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
- REGNO is the register to store, or -1 for all; currently,
- it is ignored. FIXME look at regno to improve efficiency. */
-
-void
-vx_write_register (int regno)
-{
- char am29k_greg_packet[AM29K_GREG_PLEN];
- char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
- /* Store general purpose registers. When copying values from
- registers [], don't assume that a location in registers []
- is properly aligned for the target data type. */
-
- bcopy (®isters[REGISTER_BYTE (GR96_REGNUM)],
- &am29k_greg_packet[AM29K_R_GR96], 160 * AM29K_GREG_SIZE);
- bcopy (®isters[REGISTER_BYTE (VAB_REGNUM)],
- &am29k_greg_packet[AM29K_R_VAB], 15 * AM29K_GREG_SIZE);
- am29k_greg_packet[AM29K_R_INTE] = registers[REGISTER_BYTE (INTE_REGNUM)];
- bcopy (®isters[REGISTER_BYTE (GR1_REGNUM)],
- &am29k_greg_packet[AM29K_R_RSP], 5 * AM29K_GREG_SIZE);
-
- net_write_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_SETREGS);
-
- /* Store floating point registers if the target has them. */
-
- if (target_has_fp)
- {
- am29k_fpreg_packet[AM29K_R_FPE] = registers[REGISTER_BYTE (FPE_REGNUM)];
- am29k_fpreg_packet[AM29K_R_FPS] = registers[REGISTER_BYTE (FPS_REGNUM)];
-
- net_write_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
- PTRACE_SETFPREGS);
- }
-}
-
-/* VxWorks zeroes fp when the task is initialized; we use this
- to terminate the frame chain. Chain means here the nominal address of
- a frame, that is, the return address (lr0) address in the stack. To
- obtain the frame pointer (lr1) contents, we must add 4 bytes.
- Note : may be we should modify init_frame_info() to get the frame pointer
- and store it into the frame_info struct rather than reading its
- contents when FRAME_CHAIN_VALID is invoked. THISFRAME is unused. */
-
-int
-vx29k_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- int fp_contents;
-
- read_memory ((CORE_ADDR) (chain + 4), (char *) &fp_contents, 4);
- return (fp_contents != 0);
-}
{
char *name;
char *title;
- enum cmd_auto_boolean detect;
+ enum auto_boolean detect;
enum packet_support support;
};
{
switch (config->detect)
{
- case CMD_AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_TRUE:
config->support = PACKET_ENABLE;
break;
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_FALSE:
config->support = PACKET_DISABLE;
break;
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
config->support = PACKET_SUPPORT_UNKNOWN;
break;
}
}
switch (config->detect)
{
- case CMD_AUTO_BOOLEAN_AUTO:
+ case AUTO_BOOLEAN_AUTO:
printf_filtered ("Support for remote protocol `%s' (%s) packet is auto-detected, currently %s.\n",
config->name, config->title, support);
break;
- case CMD_AUTO_BOOLEAN_TRUE:
- case CMD_AUTO_BOOLEAN_FALSE:
+ case AUTO_BOOLEAN_TRUE:
+ case AUTO_BOOLEAN_FALSE:
printf_filtered ("Support for remote protocol `%s' (%s) packet is currently %s.\n",
config->name, config->title, support);
break;
add_packet_config_cmd (struct packet_config *config,
char *name,
char *title,
- void (*set_func) (char *args, int from_tty,
- struct cmd_list_element *
- c),
- void (*show_func) (char *name,
- int from_tty),
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
struct cmd_list_element **set_remote_list,
struct cmd_list_element **show_remote_list,
int legacy)
char *cmd_name;
config->name = name;
config->title = title;
- config->detect = CMD_AUTO_BOOLEAN_AUTO;
+ config->detect = AUTO_BOOLEAN_AUTO;
config->support = PACKET_SUPPORT_UNKNOWN;
xasprintf (&set_doc, "Set use of remote protocol `%s' (%s) packet",
name, title);
name, title);
/* set/show TITLE-packet {auto,on,off} */
xasprintf (&cmd_name, "%s-packet", title);
- set_cmd = add_set_auto_boolean_cmd (cmd_name, class_obscure,
- &config->detect, set_doc,
- set_remote_list);
- set_cmd_sfunc (set_cmd, set_func);
- show_cmd = add_cmd (cmd_name, class_obscure, show_func, show_doc,
- show_remote_list);
+ add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
+ &config->detect, set_doc, show_doc,
+ set_func, show_func,
+ set_remote_list, show_remote_list);
/* set/show remote NAME-packet {auto,on,off} -- legacy */
if (legacy)
{
switch (config->support)
{
case PACKET_ENABLE:
- if (config->detect == CMD_AUTO_BOOLEAN_AUTO)
+ if (config->detect == AUTO_BOOLEAN_AUTO)
/* If the stub previously indicated that the packet was
supported then there is a protocol error.. */
error ("Protocol error: %s (%s) conflicting enabled responses.",
}
static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty)
+show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_qSymbol);
}
}
static void
-show_remote_protocol_e_packet_cmd (char *args, int from_tty)
+show_remote_protocol_e_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_e);
}
}
static void
-show_remote_protocol_E_packet_cmd (char *args, int from_tty)
+show_remote_protocol_E_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_E);
}
}
static void
-show_remote_protocol_P_packet_cmd (char *args, int from_tty)
+show_remote_protocol_P_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_P);
}
}
static void
-show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
}
}
static void
-show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
}
}
static void
-show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
}
}
static void
-show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
}
}
static void
-show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
}
/* For compatibility with older distributions. Provide a ``set remote
Z-packet ...'' command that updates all the Z packet types. */
-static enum cmd_auto_boolean remote_Z_packet_detect;
+static enum auto_boolean remote_Z_packet_detect;
static void
set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
}
static void
-show_remote_protocol_Z_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
int i;
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
}
static void
-show_remote_protocol_binary_download_cmd (char *args,
- int from_tty)
+show_remote_protocol_binary_download_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
{
show_packet_config_cmd (&remote_protocol_binary_download);
}
static void
show_remote_cmd (char *args, int from_tty)
{
-
- show_remote_protocol_Z_packet_cmd (args, from_tty);
- show_remote_protocol_e_packet_cmd (args, from_tty);
- show_remote_protocol_E_packet_cmd (args, from_tty);
- show_remote_protocol_P_packet_cmd (args, from_tty);
- show_remote_protocol_qSymbol_packet_cmd (args, from_tty);
- show_remote_protocol_binary_download_cmd (args, from_tty);
+ /* FIXME: cagney/2002-06-15: This function should iterate over
+ remote_show_cmdlist for a list of sub commands to show. */
+ show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_e_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_E_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
+ show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
}
static void
terminating `#' character and checksum.",
&maintenancelist);
- add_show_from_set
- (add_set_boolean_cmd ("remotebreak", no_class, &remote_break,
- "Set whether to send break if interrupted.\n",
- &setlist),
- &showlist);
+ add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break,
+ "Set whether to send break if interrupted.\n",
+ "Show whether to send break if interrupted.\n",
+ NULL, NULL,
+ &setlist, &showlist);
/* Install commands for configuring memory read/write packets. */
0);
/* Disable by default. The ``e'' packet has nasty interactions with
the threading code - it relies on global state. */
- remote_protocol_e.detect = CMD_AUTO_BOOLEAN_FALSE;
+ remote_protocol_e.detect = AUTO_BOOLEAN_FALSE;
update_packet_config (&remote_protocol_e);
add_packet_config_cmd (&remote_protocol_E,
0);
/* Disable by default. The ``e'' packet has nasty interactions with
the threading code - it relies on global state. */
- remote_protocol_E.detect = CMD_AUTO_BOOLEAN_FALSE;
+ remote_protocol_E.detect = AUTO_BOOLEAN_FALSE;
update_packet_config (&remote_protocol_E);
add_packet_config_cmd (&remote_protocol_P,
0);
/* Keep the old ``set remote Z-packet ...'' working. */
- tmpcmd = add_set_auto_boolean_cmd ("Z-packet", class_obscure,
- &remote_Z_packet_detect,
- "\
-Set use of remote protocol `Z' packets", &remote_set_cmdlist);
- set_cmd_sfunc (tmpcmd, set_remote_protocol_Z_packet_cmd);
- add_cmd ("Z-packet", class_obscure, show_remote_protocol_Z_packet_cmd,
- "Show use of remote protocol `Z' packets ",
- &remote_show_cmdlist);
+ add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
+ &remote_Z_packet_detect, "\
+Set use of remote protocol `Z' packets",
+ "Show use of remote protocol `Z' packets ",
+ set_remote_protocol_Z_packet_cmd,
+ show_remote_protocol_Z_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist);
}
/* Return the name of register number N, or null if no such register exists
in the current architecture. */
-static char *
+static const char *
rs6000_register_name (int n)
{
struct gdbarch_tdep *tdep = TDEP;
return NULL;
}
-
-
-
-\f
-static void
-process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
-{
- int *os_ident_ptr = obj;
- const char *name;
- unsigned int sectsize;
-
- name = bfd_get_section_name (abfd, sect);
- sectsize = bfd_section_size (abfd, sect);
- if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0)
- {
- unsigned int name_length, data_length, note_type;
- char *note = alloca (sectsize);
-
- bfd_get_section_contents (abfd, sect, note,
- (file_ptr) 0, (bfd_size_type) sectsize);
-
- name_length = bfd_h_get_32 (abfd, note);
- data_length = bfd_h_get_32 (abfd, note + 4);
- note_type = bfd_h_get_32 (abfd, note + 8);
-
- if (name_length == 4 && data_length == 16 && note_type == 1
- && strcmp (note + 12, "GNU") == 0)
- {
- int os_number = bfd_h_get_32 (abfd, note + 16);
-
- /* The case numbers are from abi-tags in glibc */
- switch (os_number)
- {
- case 0 :
- *os_ident_ptr = ELFOSABI_LINUX;
- break;
- case 1 :
- *os_ident_ptr = ELFOSABI_HURD;
- break;
- case 2 :
- *os_ident_ptr = ELFOSABI_SOLARIS;
- break;
- default :
- internal_error (__FILE__, __LINE__,
- "process_note_abi_sections: unknown OS number %d",
- os_number);
- break;
- }
- }
- }
-}
-
-/* Return one of the ELFOSABI_ constants for BFDs representing ELF
- executables. If it's not an ELF executable or if the OS/ABI couldn't
- be determined, simply return -1. */
-
-static int
-get_elfosabi (bfd *abfd)
-{
- int elfosabi = -1;
-
- if (abfd != NULL && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- {
- elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
-
- /* When elfosabi is 0 (ELFOSABI_NONE), this is supposed to indicate
- that we're on a SYSV system. However, GNU/Linux uses a note section
- to record OS/ABI info, but leaves e_ident[EI_OSABI] zero. So we
- have to check the note sections too. */
- if (elfosabi == 0)
- {
- bfd_map_over_sections (abfd,
- process_note_abi_tag_sections,
- &elfosabi);
- }
- }
-
- return elfosabi;
-}
-
\f
-
/* Initialize the current architecture based on INFO. If possible, re-use an
architecture from ARCHES, which is a list of architectures already created
during this debugging session.
enum bfd_architecture arch;
unsigned long mach;
bfd abfd;
- int osabi, sysv_abi;
+ int sysv_abi;
+ enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
gdbarch_print_insn_ftype *print_insn;
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
- osabi = get_elfosabi (info.abfd);
+ if (info.abfd)
+ osabi = gdbarch_lookup_osabi (info.abfd);
/* Check word size. If INFO is from a binary file, infer it from
that, else choose a likely default. */
set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
- set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value);
/* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
is correct for the SysV ABI when the wordsize is 8, but I'm also
set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
/* Not sure on this. FIXMEmgo */
set_gdbarch_frame_args_skip (gdbarch, 8);
- /* Until November 2001, gcc was not complying to the SYSV ABI for
- returning structures less than or equal to 8 bytes in size. It was
- returning everything in memory. When this was corrected, it wasn't
- fixed for native platforms. */
if (sysv_abi)
- {
- if (osabi == ELFOSABI_LINUX
- || osabi == ELFOSABI_NETBSD
- || osabi == ELFOSABI_FREEBSD)
- set_gdbarch_use_struct_convention (gdbarch,
- ppc_sysv_abi_broken_use_struct_convention);
- else
- set_gdbarch_use_struct_convention (gdbarch,
- ppc_sysv_abi_use_struct_convention);
- }
+ set_gdbarch_use_struct_convention (gdbarch,
+ ppc_sysv_abi_use_struct_convention);
else
- {
- set_gdbarch_use_struct_convention (gdbarch,
- generic_use_struct_convention);
- }
+ set_gdbarch_use_struct_convention (gdbarch,
+ generic_use_struct_convention);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
- /* Note: kevinb/2002-04-12: See note above regarding *_push_arguments().
- The same remarks hold for the methods below. */
- if (osabi == ELFOSABI_LINUX && wordsize == 4)
- {
- set_gdbarch_frameless_function_invocation (gdbarch,
- ppc_linux_frameless_function_invocation);
- set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
- set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
-
- set_gdbarch_frame_init_saved_regs (gdbarch,
- ppc_linux_frame_init_saved_regs);
- set_gdbarch_init_extra_frame_info (gdbarch,
- ppc_linux_init_extra_frame_info);
-
- set_gdbarch_memory_remove_breakpoint (gdbarch,
- ppc_linux_memory_remove_breakpoint);
- set_solib_svr4_fetch_link_map_offsets
- (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
- }
- else
- {
- set_gdbarch_frameless_function_invocation (gdbarch,
- rs6000_frameless_function_invocation);
- set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
- set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
- set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
- set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
- }
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ rs6000_frameless_function_invocation);
+ set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
+ set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+
+ set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
+ set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
+
if (!sysv_abi)
{
/* Handle RS/6000 function pointers (which are really function
now that the C compiler delays popping them. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ /* Hook in ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch, osabi);
+
return gdbarch;
}
+static void
+rs6000_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ if (tdep == NULL)
+ return;
+
+ fprintf_unfiltered (file, "rs6000_dump_tdep: OS ABI = %s\n",
+ gdbarch_osabi_name (tdep->osabi));
+}
+
static struct cmd_list_element *info_powerpc_cmdlist = NULL;
static void
void
_initialize_rs6000_tdep (void)
{
- register_gdbarch_init (bfd_arch_rs6000, rs6000_gdbarch_init);
- register_gdbarch_init (bfd_arch_powerpc, rs6000_gdbarch_init);
+ gdbarch_register (bfd_arch_rs6000, rs6000_gdbarch_init, rs6000_dump_tdep);
+ gdbarch_register (bfd_arch_powerpc, rs6000_gdbarch_init, rs6000_dump_tdep);
/* Add root prefix command for "info powerpc" commands */
add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
add_cmd ("altivec", class_info, rs6000_altivec_registers_info,
"Display the contents of the AltiVec registers.",
&info_powerpc_cmdlist);
-
}
-char *
+const char *
s390_register_name (int reg_nr)
{
static char *register_names[] = {
/* We can't do this */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_store_struct_return (gdbarch, s390_store_struct_return);
- set_gdbarch_extract_return_value (gdbarch, s390_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
set_gdbarch_store_return_value (gdbarch, s390_store_return_value);
/* Amount PC must be decremented by after a breakpoint.
This is often the number of bytes in BREAKPOINT
set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
- set_gdbarch_extract_struct_value_address
+ set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, generic_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
e7000pc_noop, /* wait for output to drain */
};
-void
-_initialize_ser_e7000pc (void)
-{
- serial_add_interface (&e7000pc_ops);
-}
-#else
+#endif /*_WIN32 or __GO32__*/
void
_initialize_ser_e7000pc (void)
{
-
+#if defined __GO32__ || defined _WIN32
+ serial_add_interface (&e7000pc_ops);
+#endif
}
-#endif
int f_offset;
};
-static char *
+static const char *
sh_generic_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3e_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh_dsp_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh3_dsp_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh4_register_name (int reg_nr)
{
static char *register_names[] =
return register_names[reg_nr];
}
-static char *
+static const char *
sh_sh64_register_name (int reg_nr)
{
static char *register_names[] =
set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
- set_gdbarch_extract_return_value (gdbarch, sh_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
set_gdbarch_store_struct_return (gdbarch, sh_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
set_gdbarch_pop_frame (gdbarch, sh_pop_frame);
set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh);
skip_prologue_hard_way = sh_skip_prologue_hard_way;
set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
- set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
tdep->FPUL_REGNUM = 23;
tdep->FPSCR_REGNUM = 24;
sh_store_return_value = sh3e_sh4_store_return_value;
sh_register_virtual_type = sh_sh4_register_virtual_type;
set_gdbarch_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
- set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
set_gdbarch_register_raw_size (gdbarch, sh_sh4_register_raw_size);
set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
set_gdbarch_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
set_gdbarch_frame_chain (gdbarch, sh64_frame_chain);
set_gdbarch_get_saved_register (gdbarch, sh64_get_saved_register);
- set_gdbarch_extract_return_value (gdbarch, sh64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh64_push_arguments);
/*set_gdbarch_store_struct_return (gdbarch, sh64_store_struct_return);*/
- set_gdbarch_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
set_gdbarch_pop_frame (gdbarch, sh64_pop_frame);
set_gdbarch_elf_make_msymbol_special (gdbarch,
if (33 <= hostsig && hostsig <= 63)
return (enum target_signal)
(hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
- else if (hostsig == 64)
- return TARGET_SIGNAL_REALTIME_64;
+ else if (hostsig == 32)
+ return TARGET_SIGNAL_REALTIME_32;
+ else if (64 <= hostsig && hostsig <= 127)
+ return (enum target_signal)
+ (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
else
error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
}
if (retsig >= SIGRTMIN && retsig <= SIGRTMAX)
return retsig;
}
- else if (oursig == TARGET_SIGNAL_REALTIME_64)
- return 64;
+ else if (oursig == TARGET_SIGNAL_REALTIME_32)
+ {
+ /* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
+ TARGET_SIGNAL_REALTIME_33. It is 32 by definition. */
+ return 32;
+ }
+ else if (oursig >= TARGET_SIGNAL_REALTIME_64
+ && oursig <= TARGET_SIGNAL_REALTIME_127)
+ {
+ /* This block of signals is continuous, and
+ TARGET_SIGNAL_REALTIME_64 is 64 by definition. */
+ int retsig =
+ (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
+ return retsig;
+ }
#endif
*oursig_ok = 0;
return 0;
set_gdbarch_data (gdbarch, fetch_link_map_offsets_gdbarch_data, flmo);
}
-/* Initialize the architecture specific link_map_offsets fetcher.
- This is called after <arch>_gdbarch_init() has set up its struct
- gdbarch for the new architecture, so care must be taken to use the
- value set by set_solib_svr4_fetch_link_map_offsets(), above. We
- do, however, attempt to provide a reasonable alternative (for
- native targets anyway) if the <arch>_gdbarch_init() fails to call
+/* Initialize the architecture-specific link_map_offsets fetcher.
+ This is called after <arch>_gdbarch_init() has set up its `struct
+ gdbarch' for the new architecture, and is only called if the
+ link_map_offsets fetcher isn't already initialized (which is
+ usually done by calling set_solib_svr4_fetch_link_map_offsets()
+ above in <arch>_gdbarch_init()). Therefore we attempt to provide a
+ reasonable alternative (for native targets anyway) if the
+ <arch>_gdbarch_init() fails to call
set_solib_svr4_fetch_link_map_offsets(). */
static void *
init_fetch_link_map_offsets (struct gdbarch *gdbarch)
{
- struct link_map_offsets *(*flmo) =
- gdbarch_data (gdbarch, fetch_link_map_offsets_gdbarch_data);
-
- if (flmo == NULL)
- return legacy_fetch_link_map_offsets;
- else
- return flmo;
+ return legacy_fetch_link_map_offsets;
}
static struct target_so_ops svr4_so_ops;
/* Handle HP SOM shared libraries for GDB, the GNU Debugger.
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free
+ Software Foundation, Inc.
This file is part of GDB.
#include "gdb-stabs.h"
#include "gdb_stat.h"
#include "gdbcmd.h"
-#include "assert.h"
#include "language.h"
#include "regcache.h"
sizeof (obj_private_data_t));
obj_private->unwind_info = NULL;
obj_private->so_info = NULL;
- so->objfile->obj_private = (PTR) obj_private;
+ so->objfile->obj_private = obj_private;
}
obj_private = (obj_private_data_t *) so->objfile->obj_private;
printf_filtered ("Source language is %s.\n", language_str (s->language));
printf_filtered ("Compiled with %s debugging format.\n", s->debugformat);
+ printf_filtered ("%s preprocessor macro info.\n",
+ s->macro_table ? "Includes" : "Does not include");
}
\f
#include "bfd.h"
#include "gdb_string.h"
#include "regcache.h"
+#include "osabi.h"
#ifdef USE_PROC_FS
#include <sys/procfs.h>
int reg_save_offset;
int call_dummy_call_offset;
int print_insn_mach;
+
+ enum gdb_osabi osabi;
};
/* Now make GDB_TARGET_IS_SPARC64 a runtime test. */
static struct gdbarch * sparc_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches);
+static void sparc_dump_tdep (struct gdbarch *, struct ui_file *);
void
_initialize_sparc_tdep (void)
{
/* Hook us into the gdbarch mechanism. */
- register_gdbarch_init (bfd_arch_sparc, sparc_gdbarch_init);
+ gdbarch_register (bfd_arch_sparc, sparc_gdbarch_init, sparc_dump_tdep);
tm_print_insn = gdb_print_insn_sparc;
tm_print_insn_info.mach = TM_PRINT_INSN_MACH; /* Selects sparc/sparclite */
/* MULTI_ARCH support */
-static char *
+static const char *
sparc32_register_name (int regno)
{
static char *register_names[] =
return register_names[regno];
}
-static char *
+static const char *
sparc64_register_name (int regno)
{
static char *register_names[] =
return register_names[regno];
}
-static char *
+static const char *
sparclite_register_name (int regno)
{
static char *register_names[] =
return register_names[regno];
}
-static char *
+static const char *
sparclet_register_name (int regno)
{
static char *register_names[] =
{
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
+ enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
static LONGEST call_dummy_32[] =
{ 0xbc100001, 0x9de38000, 0xbc100002, 0xbe100003,
};
static LONGEST call_dummy_nil[] = {0};
+ /* Try to determine the OS ABI of the object we are loading. */
+
+ if (info.abfd != NULL)
+ {
+ osabi = gdbarch_lookup_osabi (info.abfd);
+ if (osabi == GDB_OSABI_UNKNOWN)
+ {
+ /* If it's an ELF file, assume it's Solaris. */
+ if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+ osabi = GDB_OSABI_SOLARIS;
+ }
+ }
+
/* First see if there is already a gdbarch that can satisfy the request. */
- arches = gdbarch_list_lookup_by_info (arches, &info);
- if (arches != NULL)
- return arches->gdbarch;
+ for (arches = gdbarch_list_lookup_by_info (arches, &info);
+ arches != NULL;
+ arches = gdbarch_list_lookup_by_info (arches->next, &info))
+ {
+ /* Make sure the ABI selection matches. */
+ tdep = gdbarch_tdep (arches->gdbarch);
+ if (tdep && tdep->osabi == osabi)
+ return arches->gdbarch;
+ }
/* None found: is the request for a sparc architecture? */
if (info.bfd_arch_info->arch != bfd_arch_sparc)
tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
+ tdep->osabi = osabi;
+
/* First set settings that are common for all sparc architectures. */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_extract_struct_value_address (gdbarch,
- sparc_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
set_gdbarch_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy);
set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_fp_regnum (gdbarch, SPARC_FP_REGNUM);
switch (info.bfd_arch_info->mach)
{
case bfd_mach_sparc:
- set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
tdep->print_insn_mach = bfd_mach_sparc;
break;
case bfd_mach_sparc_sparclet:
- set_gdbarch_extract_return_value (gdbarch,
- sparclet_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
tdep->print_insn_mach = bfd_mach_sparc_sparclet;
break;
case bfd_mach_sparc_sparclite:
- set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
tdep->print_insn_mach = bfd_mach_sparc_sparclite;
break;
case bfd_mach_sparc_v8plus:
- set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
break;
case bfd_mach_sparc_v8plusa:
- set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
tdep->print_insn_mach = bfd_mach_sparc;
break;
case bfd_mach_sparc_sparclite_le:
- set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 80);
set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
tdep->print_insn_mach = bfd_mach_sparc_sparclite;
break;
case bfd_mach_sparc_v9:
- set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
tdep->print_insn_mach = bfd_mach_sparc_v9a;
break;
case bfd_mach_sparc_v9a:
- set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
break;
}
+ /* Hook in OS ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch, osabi);
+
return gdbarch;
}
+static void
+sparc_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ if (tdep == NULL)
+ return;
+
+ fprintf_unfiltered (file, "sparc_dump_tdep: OS ABI = %s\n",
+ gdbarch_osabi_name (tdep->osabi));
+}
#include "regcache.h"
#include <sys/types.h>
-#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
+#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN__)
#define HAVE_SOCKETS
#include <sys/time.h>
#include <sys/socket.h>
static struct type *read_array_type (char **, struct type *,
struct objfile *);
-static struct type **read_args (char **, int, struct objfile *);
+static struct field *read_args (char **, int, struct objfile *, int *, int *);
static int
read_cpp_abbrev (struct field_info *, char **, struct type *,
{
struct type *domain = read_type (pp, objfile);
struct type *return_type;
- struct type **args;
+ struct field *args;
+ int nargs, varargs;
if (**pp != ',')
/* Invalid member type data format. */
++(*pp);
return_type = read_type (pp, objfile);
- args = read_args (pp, ';', objfile);
+ args = read_args (pp, ';', objfile, &nargs, &varargs);
type = dbx_alloc_type (typenums, objfile);
- smash_to_method_type (type, domain, return_type, args);
+ smash_to_method_type (type, domain, return_type, args,
+ nargs, varargs);
}
break;
and terminated with END. Return the list of types read in, or (struct type
**)-1 if there is an error. */
-static struct type **
-read_args (char **pp, int end, struct objfile *objfile)
+static struct field *
+read_args (char **pp, int end, struct objfile *objfile, int *nargsp,
+ int *varargsp)
{
/* FIXME! Remove this arbitrary limit! */
- struct type *types[1024], **rval; /* allow for fns of 1023 parameters */
- int n = 0;
+ struct type *types[1024]; /* allow for fns of 1023 parameters */
+ int n = 0, i;
+ struct field *rval;
while (**pp != end)
{
if (**pp != ',')
/* Invalid argument list: no ','. */
- return (struct type **) -1;
+ return (struct field *) -1;
(*pp)++;
STABS_CONTINUE (pp, objfile);
types[n++] = read_type (pp, objfile);
}
(*pp)++; /* get past `end' (the ':' character) */
- if (n == 1)
- {
- rval = (struct type **) xmalloc (2 * sizeof (struct type *));
- }
- else if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
- {
- rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *));
- memset (rval + n, 0, sizeof (struct type *));
- }
+ if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
+ *varargsp = 1;
else
{
- rval = (struct type **) xmalloc (n * sizeof (struct type *));
+ n--;
+ *varargsp = 0;
}
- memcpy (rval, types, n * sizeof (struct type *));
+
+ rval = (struct field *) xmalloc (n * sizeof (struct field));
+ memset (rval, 0, n * sizeof (struct field));
+ for (i = 0; i < n; i++)
+ rval[i].type = types[i];
+ *nargsp = n;
return rval;
}
\f
}
}
- FRAME_INIT_SAVED_REGS (fi);
- if (fi->saved_regs != NULL)
- {
- /* The sp is special; what's returned isn't the save address, but
- actually the value of the previous frame's sp. */
- printf_filtered (" Previous frame's sp is ");
- print_address_numeric (fi->saved_regs[SP_REGNUM], 1, gdb_stdout);
- printf_filtered ("\n");
- count = 0;
- numregs = NUM_REGS + NUM_PSEUDO_REGS;
- for (i = 0; i < numregs; i++)
- if (fi->saved_regs[i] && i != SP_REGNUM)
+ if (fi->saved_regs == NULL)
+ FRAME_INIT_SAVED_REGS (fi);
+ /* Print as much information as possible on the location of all the
+ registers. */
+ {
+ enum lval_type lval;
+ int optimized;
+ CORE_ADDR addr;
+ int realnum;
+ int count;
+ int i;
+ int need_nl = 1;
+
+ /* The sp is special; what's displayed isn't the save address, but
+ the value of the previous frame's sp. This is a legacy thing,
+ at one stage the frame cached the previous frame's SP instead
+ of its address, hence it was easiest to just display the cached
+ value. */
+ if (SP_REGNUM >= 0)
+ {
+ /* Find out the location of the saved stack pointer with out
+ actually evaluating it. */
+ frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
+ &realnum, NULL);
+ if (!optimized && lval == not_lval)
{
- if (count == 0)
- puts_filtered (" Saved registers:\n ");
- else
- puts_filtered (",");
- wrap_here (" ");
- printf_filtered (" %s at ", REGISTER_NAME (i));
- print_address_numeric (fi->saved_regs[i], 1, gdb_stdout);
- count++;
+ void *value = alloca (MAX_REGISTER_RAW_SIZE);
+ CORE_ADDR sp;
+ frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
+ &realnum, value);
+ sp = extract_address (value, REGISTER_RAW_SIZE (SP_REGNUM));
+ printf_filtered (" Previous frame's sp is ");
+ print_address_numeric (sp, 1, gdb_stdout);
+ printf_filtered ("\n");
+ need_nl = 0;
}
- if (count)
- puts_filtered ("\n");
- }
- else
- {
- /* We could get some information about saved registers by
- calling get_saved_register on each register. Which info goes
- with which frame is necessarily lost, however, and I suspect
- that the users don't care whether they get the info. */
+ else if (!optimized && lval == lval_memory)
+ {
+ printf_filtered (" Previous frame's sp at ");
+ print_address_numeric (addr, 1, gdb_stdout);
+ printf_filtered ("\n");
+ need_nl = 0;
+ }
+ else if (!optimized && lval == lval_register)
+ {
+ printf_filtered (" Previous frame's sp in %s\n",
+ REGISTER_NAME (realnum));
+ need_nl = 0;
+ }
+ /* else keep quiet. */
+ }
+
+ count = 0;
+ numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ for (i = 0; i < numregs; i++)
+ if (i != SP_REGNUM)
+ {
+ /* Find out the location of the saved register without
+ fetching the corresponding value. */
+ frame_register_unwind (fi, i, &optimized, &lval, &addr, &realnum,
+ NULL);
+ /* For moment, only display registers that were saved on the
+ stack. */
+ if (!optimized && lval == lval_memory)
+ {
+ if (count == 0)
+ puts_filtered (" Saved registers:\n ");
+ else
+ puts_filtered (",");
+ wrap_here (" ");
+ printf_filtered (" %s at ", REGISTER_NAME (i));
+ print_address_numeric (addr, 1, gdb_stdout);
+ count++;
+ }
+ }
+ if (count || need_nl)
puts_filtered ("\n");
- }
+ }
}
#if 0
}
}
\f
-
-/* Store the selected frame and its level into *FRAMEP and *LEVELP.
- If there is no selected frame, *FRAMEP is set to NULL. */
-
-void
-record_selected_frame (CORE_ADDR *frameaddrp, int *levelp)
-{
- *frameaddrp = selected_frame ? selected_frame->frame : 0;
- *levelp = frame_relative_level (selected_frame);
-}
-
/* Return the symbol-block in which the selected frame is executing.
Can return zero under various legitimate circumstances.
When non-zero, target debugging is enabled.", &setdebuglist),
&showdebuglist);
- add_show_from_set
- (add_set_boolean_cmd
- ("trust-readonly-sections", class_support,
- &trust_readonly,
- "Set mode for reading from readonly sections.\n\
+ add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
+ &trust_readonly, "\
+Set mode for reading from readonly sections.\n\
When this mode is on, memory reads from readonly sections (such as .text)\n\
will be read from the object file instead of from the target. This will\n\
-result in significant performance improvement for remote targets.",
- &setlist),
- &showlist);
+result in significant performance improvement for remote targets.", "\
+Set mode for reading from readonly sections.\n",
+ NULL, NULL,
+ &setlist, &showlist);
add_com ("monitor", class_obscure, do_monitor_command,
"Send a command to the remote monitor (remote targets only).");
out what version of MI is running. Use this to determine the proper
output of setting a breakpoint.
+2002-06-11 Jim Blandy <jimb@redhat.com>
+
+ * lib/gdb.exp (get_debug_format): Tolerate message saying whether
+ preprocessor macro information is present.
+
+ * macscp.exp, macscp1.c, macscp2.h, macscp3.h, macscp4.h: New
+ tests.
+
+2002-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/overlays.exp: Record addresses of overlay
+ functions in TCL variables rather than in GDB variables,
+ to avoid having GDB convert them to pointers (with loss
+ of information).
+
+ * gdb.base/d10v.ld: Merge in several years worth of
+ default linker script changes.
+ * gdb.base/long_long.exp: Add check for sizeof (long double).
+
+2002-06-06 Michal Ludvig <mludvig@suse.cz>
+
+ * gdb.asm/asm-source.exp: Add x86-64 target.
+ * gdb.asm/x86_64.inc: New.
+
+2002-05-30 Michael Chastain <mec@shout.net>
+
+ From Benjamin Kosnik <bkoz@redhat.com>:
+ * gdb.c++/m-static.cc: New file.
+ * gdb.c++/m-static.exp: New file.
+
+2002-05-28 Michael Snyder <msnyder@redhat.com>
+
+ * gdb.base/call-ar-st.exp: Allow for reduced floating point
+ precision.
+
2002-05-27 Michael Chastain <mec@shout.net>
-From Benjamin Kosnik <bkoz@redhat.com>
+ From Benjamin Kosnik <bkoz@redhat.com>:
* gdb.c++/m-data.cc: New file.
* gdb.c++/m-data.exp: New file.
2002-05-27 Michael Chastain <mec@shout.net>
-From Benjamin Kosnik <bkoz@redhat.com>
+ From Benjamin Kosnik <bkoz@redhat.com>:
* gdb.c++/try_catch.cc: New file.
* gdb.c++/try_catch.exp: New file.
if [istarget "s390-*-*"] then {
set asm-arch s390
}
+if [istarget "x86_64-*-*"] then {
+ set asm-arch x86_64
+ set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+}
if [istarget "i\[3456\]86-*-*"] then {
set asm-arch i386
}
"\[ \t\r\n\]+array_d :"
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
- "\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
+ "\[ \t\r\n\]+23.456\[0-9\]* 46.913\[0-9\]* 70.370\[0-9\]* 93.826\[0-9\]* 117.283\[0-9\]* 140.740\[0-9\]* 164.196\[0-9\]* 187.653\[0-9\]"
"\[ \t\r\n\]+"
}
}
"\[ \t\r\n\]+array_d :"
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
- "\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
+ "\[ \t\r\n\]+23.456\[0-9\]* 46.913\[0-9\]* 70.370\[0-9\]* 93.826\[0-9\]* 117.283\[0-9\]* 140.740\[0-9\]* 164.196\[0-9\]* 187.653\[0-9\]*"
"\[ \t\r\n\]+"
".*array_f :"
".*student id :\[\t \]+.*YELLOW"
"array_d :"
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
- "\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
+ "\[ \t\r\n\]+23.456\[0-9\]* 46.913\[0-9\]* 70.370\[0-9\]* 93.826\[0-9\]* 117.283\[0-9\]* 140.740\[0-9\]* 164.196\[0-9\]* 187.653\[0-9\]*"
"\[ \t\r\n\]+"
}
}
"\[ \t\r\n\]+array_d :"
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
- "\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
+ "\[ \t\r\n\]+23.456\[0-9\]* 46.913\[0-9\]* 70.370\[0-9\]* 93.826\[0-9\]* 117.283\[0-9\]* 140.740\[0-9\]* 164.196\[0-9\]* 187.653\[0-9\]*"
"\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
}
} else {
![gdb_skip_stdio_test "print print_ten_doubles(...)"]} {
send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
gdb_expect_list "print print_ten_doubles" ".*$gdb_prompt $" {
- "\[\t\r\n \]+Two Doubles : 123.456000.*123.456000"
- "\[\t\r\n \]+Two Doubles : -0.120000.*-1.230000"
- "\[\t\r\n \]+Two Doubles : 343434.800000.*89.098000"
- "\[\t\r\n \]+Two Doubles : 3.140000.*-5678.123450"
- "\[\t\r\n \]+Two Doubles : -0.111111.*216.970650"
+ "\[\t\r\n \]+Two Doubles : 123.45\[0-9\]*.*123.45\[0-9\]*"
+ "\[\t\r\n \]+Two Doubles : -0.1200\[0-9\]*.*-1.2300\[0-9\]*"
+ "\[\t\r\n \]+Two Doubles : 343434.\[0-9\]*.*89.09\[0-9\]*"
+ "\[\t\r\n \]+Two Doubles : 3.1400\[0-9\]*.*-5678.123\[0-9\]*"
+ "\[\t\r\n \]+Two Doubles : -0.1111\[0-9\]*.*216.97\[0-9\]*"
}
}
"elf32-d10v")
OUTPUT_ARCH(d10v)
ENTRY(_start)
- SEARCH_DIR(/usr/cygnus/d10v-961230/H-sparc-sun-sunos4.1//lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
+
+MEMORY
+{
+ UNIFIED : org = 0, len = 0x1000000
+ INSN : org = 0x1014000, len = 0x40000
+ DATA : org = 0x2000004, len = 0x7FFC
+ STACK : org = 0x200BFFE, len = 4
+}
+
SECTIONS
{
/* Overlay sections: */
- .ovly0 0x01010000 : AT (0x12010000) { foo.o(.text) }
- .ovly1 0x01010000 : AT (0x12011000) { bar.o(.text) }
- .ovly2 0x01011000 : AT (0x12012000) { baz.o(.text) }
- .ovly3 0x01011000 : AT (0x12013000) { grbx.o(.text) }
- .data00 0x00001000 : AT (0x12014000) { foo.o(.data) }
- .data01 0x00001000 : AT (0x12015000) { bar.o(.data) }
- .data02 0x00002000 : AT (0x12016000) { baz.o(.data) }
- .data03 0x00002000 : AT (0x12017000) { grbx.o(.data) }
- /* Read-only sections, merged into data segment: */
- . = 0x00000004;
- .interp : { *(.interp) }
- .hash : { *(.hash) }
- .dynsym : { *(.dynsym) }
- .dynstr : { *(.dynstr) }
- .rel.text : { *(.rel.text) }
- .rela.text : { *(.rela.text) }
- .rel.data : { *(.rel.data) }
- .rela.data : { *(.rela.data) }
- .rel.rodata : { *(.rel.rodata) }
- .rela.rodata : { *(.rela.rodata) }
- .rel.got : { *(.rel.got) }
- .rela.got : { *(.rela.got) }
- .rel.ctors : { *(.rel.ctors) }
- .rela.ctors : { *(.rela.ctors) }
- .rel.dtors : { *(.rel.dtors) }
- .rela.dtors : { *(.rela.dtors) }
- .rel.init : { *(.rel.init) }
- .rela.init : { *(.rela.init) }
- .rel.fini : { *(.rel.fini) }
- .rela.fini : { *(.rela.fini) }
- .rel.bss : { *(.rel.bss) }
- .rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
- .plt : { *(.plt) }
- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
- .rodata1 : { *(.rodata1) }
- /* Adjust the address for the data segment. */
- . = ALIGN(4);
+ .ovly0 0x1001000 : AT (0x8000) { foo.o(.text) }
+ .ovly1 0x1001000 : AT (0x9000) { bar.o(.text) }
+ .ovly2 0x1002000 : AT (0xa000) { baz.o(.text) }
+ .ovly3 0x1002000 : AT (0xb000) { grbx.o(.text) }
+ .data00 0x2001000 : AT (0xc000) { foo.o(.data) }
+ .data01 0x2001000 : AT (0xd000) { bar.o(.data) }
+ .data02 0x2002000 : AT (0xe000) { baz.o(.data) }
+ .data03 0x2002000 : AT (0xf000) { grbx.o(.data) }
+
+ .text :
+ {
+ KEEP (*(.init))
+ KEEP (*(.init.*))
+ KEEP (*(.fini))
+ KEEP (*(.fini.*))
+ *(.text)
+ *(.text.*)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ *(.gnu.linkonce.t*)
+ _etext = .;
+ PROVIDE (etext = .);
+ } >INSN =0
+ .rodata : {
+ *(.rodata)
+ *(.gnu.linkonce.r*)
+ *(.rodata.*)
+ } >DATA
+ .rodata1 : {
+ *(.rodata1)
+ *(.rodata1.*)
+ } >DATA
+
.data :
{
*(.data)
+ *(.data.*)
*(.gnu.linkonce.d*)
_ovly_table = .;
LONG(ABSOLUTE(ADDR(.ovly0)));
_novlys = .;
LONG((_novlys - _ovly_table) / 16);
CONSTRUCTORS
- }
- .data1 : { *(.data1) }
+ } >DATA
+ .data1 : {
+ *(.data1)
+ *(.data1.*)
+ } >DATA
.ctors :
{
- *(.ctors)
- }
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ } >DATA
.dtors :
{
- *(.dtors)
- }
- .got : { *(.got.plt) *(.got) }
- .dynamic : { *(.dynamic) }
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ } >DATA
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata : { *(.sdata) }
+ .sdata : {
+ *(.sdata)
+ *(.sdata.*)
+ } >DATA
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
- .sbss : { *(.sbss) *(.scommon) }
+ .sbss : { *(.sbss) *(.scommon) } >DATA
.bss :
{
*(.dynbss)
+ *(.dynbss.*)
*(.bss)
+ *(.bss.*)
*(COMMON)
- }
+ } >DATA
+
_end = . ;
PROVIDE (end = .);
+
+ .stack : { _stack = .; *(.stack) } >STACK
+
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
+
.comment 0 : { *(.comment) }
+
/* DWARF debug sections.
- Symbols in the .debug DWARF section are relative to the beginning of the
- section so we begin .debug at 0. It's not clear yet what needs to happen
- for the others. */
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ /* DWARF 1 */
.debug 0 : { *(.debug) }
- .debug_info 0 : { *(.debug_info) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- .line 0 : { *(.line) }
- /* These must appear regardless of . */
- /* Hmmm, there's got to be a better way. This sets the stack to the
- top of the simulator memory (i.e. top of 64K data space). */
- .stack 0x00007FFE : { _stack = .; *(.stack) }
- .text 0x1000000 :
- {
- *(.init)
- *(.fini)
- *(.text)
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
- } =0
- _etext = .;
- PROVIDE (etext = .);
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
}
default { }
}
+set sizeof_long_double 8
+send_gdb "print sizeof(long double)\n"
+gdb_expect {
+ -re ".* = 4.*$gdb_prompt $" { set sizeof_long_double 4 }
+ -re ".*$gdb_prompt $" { }
+ default { }
+}
+
gdb_test "n 4" ".*38.*" "get to known place"
# Check the hack for long long prints.
}
gdb_test "p/c oct" ".*'w'.*"
-if { $sizeof_double == 8 } {
-
-# ARM floating point numbers are not strictly little endian or big endian,
-# but a hybrid. They are in little endian format with the two words
-# swapped in big endian format.
+if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
+ # ARM floating point numbers are not strictly little endian or big endian,
+ # but a hybrid. They are in little endian format with the two words
+ # swapped in big endian format.
if { [istarget "arm*-*-*"] || \
[istarget "xscale*-*-*"] || \
gdb_test "x/c &oct" ".*-89 .*"
# FIXME GDB's output is correct, but this longer match fails.
# gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
- if { $sizeof_double == 8 } {
+ if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
} else {
gdb_test "x/f &oct" ".*-2.42716126e-15.*"
-# Copyright 1997, 1998 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 2002 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
}
# couple of convenience variables
-set fptrcast [string_to_regexp "(int (*)(int))"]
+set fptrcast [string_to_regexp "{int (int)}"]
set iptrcast [string_to_regexp "(int *)"]
+set hexx "0x\[0-9abcdefABCDEF\]+"
gdb_test "overlay manual" ""
gdb_test "overlay list" "No sections are mapped." "List with none mapped"
# capture the LMA addresses of [foo bar baz grbx foox barx bazx grbxx]
-gdb_test "print \$foo_lma = &foo" \
- ".* $fptrcast 0x.* <\\*foo\\*>" "foo load addr"
-gdb_test "print \$bar_lma = &bar" \
- ".* $fptrcast 0x.* <\\*bar\\*>" "bar load addr"
-gdb_test "print \$baz_lma = &baz" \
- ".* $fptrcast 0x.* <\\*baz\\*>" "baz load addr"
-gdb_test "print \$grbx_lma = &grbx" \
- ".* $fptrcast 0x.* <\\*grbx\\*>" "grbx load addr"
+proc get_func_address { func func_sym msg } {
+ global gdb_prompt
+ global fptrcast
+ global hexx
+
+ set func_addr 0
+ send_gdb "print $func\n"
+ gdb_expect {
+ -re "\\$\[0-9\]+ = $fptrcast (${hexx}) <$func_sym>.*$gdb_prompt $" {
+ set func_addr $expect_out(1,string)
+ pass "get $msg"
+ }
+ -re ".*$gdb_prompt $" {
+ fail "get $msg"
+ }
+ default {
+ fail "get $msg (timeout)"
+ }
+ }
+ return $func_addr
+}
+
+set foo_lma [get_func_address "foo" "\\*foo\\*" "foo load address"]
+set bar_lma [get_func_address "bar" "\\*bar\\*" "bar load address"]
+set baz_lma [get_func_address "baz" "\\*baz\\*" "baz load address"]
+set grbx_lma [get_func_address "grbx" "\\*grbx\\*" "grbx load address"]
+
gdb_test "print \$foox_lma = &foox" \
".* $iptrcast 0x.*" "foox load addr"
gdb_test "print \$barx_lma = &barx" \
gdb_test "overlay map .ovly0" ""
gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "List ovly0"
-gdb_test "print \$foo_vma = &foo" \
- ".* $fptrcast 0x.* <foo>" "foo runtime addr"
+set foo_vma [get_func_address "foo" "foo" "foo runtime address"]
gdb_test "overlay map .ovly1" ""
gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "List ovly1"
-gdb_test "print \$bar_vma = &bar" \
- ".* $fptrcast 0x.* <bar>" "bar runtime addr"
+set bar_vma [get_func_address "bar" "bar" "bar runtime address"]
gdb_test "overlay map .ovly2" ""
gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "List ovly2"
-gdb_test "print \$baz_vma = &baz" \
- ".* $fptrcast 0x.* <baz>" "baz runtime addr"
+set baz_vma [get_func_address "baz" "baz" "baz runtime address"]
gdb_test "overlay map .ovly3" ""
gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "List ovly3"
-gdb_test "print \$grbx_vma = &grbx" \
- ".* $fptrcast 0x.* <grbx>" "grbx runtime addr"
+set grbx_vma [get_func_address "grbx" "grbx" "grbx runtime address"]
gdb_test "overlay map .data00" ""
gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "List data00"
# Verify that LMA != VMA
-gdb_test "print \$foo_lma != \$foo_vma" ".* = 1" "foo's LMA != VMA"
-gdb_test "print \$bar_lma != \$bar_vma" ".* = 1" "bar's LMA != VMA"
-gdb_test "print \$baz_lma != \$baz_vma" ".* = 1" "baz's LMA != VMA"
-gdb_test "print \$grbx_lma != \$grbx_vma" ".* = 1" "grbx's LMA != VMA"
+gdb_test "print $foo_lma != $foo_vma" ".* = 1" "foo's LMA != VMA"
+gdb_test "print $bar_lma != $bar_vma" ".* = 1" "bar's LMA != VMA"
+gdb_test "print $baz_lma != $baz_vma" ".* = 1" "baz's LMA != VMA"
+gdb_test "print $grbx_lma != $grbx_vma" ".* = 1" "grbx's LMA != VMA"
gdb_test "print \$foox_lma != \$foox_vma" ".* = 1" "foox's LMA != VMA"
gdb_test "print \$barx_lma != \$barx_vma" ".* = 1" "barx's LMA != VMA"
gdb_test "print \$bazx_lma != \$bazx_vma" ".* = 1" "bazx's LMA != VMA"
set debug_format "unknown"
send_gdb "info source\n"
gdb_expect 10 {
- -re "Compiled with (.*) debugging format.\r\n$gdb_prompt $" {
+ -re "Compiled with (.*) debugging format.\r\n.*$gdb_prompt $" {
set debug_format $expect_out(1,string)
verbose "debug format is $debug_format"
return 1;
E_ALL_REGS_SIZE = (E_NUM_REGS) * v850_reg_size
};
+/* Size of return datatype which fits into all return registers. */
+enum
+{
+ E_MAX_RETTYPE_SIZE_IN_REGS = 2 * v850_reg_size
+};
+
static LONGEST call_dummy_nil[] = {0};
static char *v850_generic_reg_names[] =
/* Function: v850_register_name
Returns the name of the v850/v850e register N. */
-static char *
+static const char *
v850_register_name (int regnum)
{
if (regnum < 0 || regnum >= E_NUM_REGS)
return builtin_type_int32;
}
+static int
+v850_type_is_scalar (struct type *t)
+{
+ return (TYPE_CODE (t) != TYPE_CODE_STRUCT
+ && TYPE_CODE (t) != TYPE_CODE_UNION
+ && TYPE_CODE (t) != TYPE_CODE_ARRAY);
+}
+
/* Should call_function allocate stack space for a struct return? */
-int
+static int
v850_use_struct_convention (int gcc_p, struct type *type)
{
- return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 4);
+ /* According to ABI:
+ * return TYPE_LENGTH (type) > 8);
+ */
+
+ /* Current implementation in gcc: */
+
+ int i;
+ struct type *fld_type, *tgt_type;
+
+ /* 1. The value is greater than 8 bytes -> returned by copying */
+ if (TYPE_LENGTH (type) > 8)
+ return 1;
+
+ /* 2. The value is a single basic type -> returned in register */
+ if (v850_type_is_scalar (type))
+ return 0;
+
+ /* The value is a structure or union with a single element
+ * and that element is either a single basic type or an array of
+ * a single basic type whoes size is greater than or equal to 4
+ * -> returned in register */
+ if ((TYPE_CODE (type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (type) == TYPE_CODE_UNION)
+ && TYPE_NFIELDS (type) == 1)
+ {
+ fld_type = TYPE_FIELD_TYPE (type, 0);
+ if (v850_type_is_scalar (fld_type) && TYPE_LENGTH (fld_type) >= 4)
+ return 0;
+
+ if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
+ {
+ tgt_type = TYPE_TARGET_TYPE (fld_type);
+ if (v850_type_is_scalar (tgt_type) && TYPE_LENGTH (tgt_type) >= 4)
+ return 0;
+ }
+ }
+
+ /* The value is a structure whose first element is an integer or
+ * a float, and which contains no arrays of more than two elements
+ * -> returned in register */
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+ && v850_type_is_scalar (TYPE_FIELD_TYPE (type, 0))
+ && TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == 4)
+ {
+ for (i = 1; i < TYPE_NFIELDS (type); ++i)
+ {
+ fld_type = TYPE_FIELD_TYPE (type, 0);
+ if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
+ {
+ tgt_type = TYPE_TARGET_TYPE (fld_type);
+ if (TYPE_LENGTH (fld_type) >= 0 && TYPE_LENGTH (tgt_type) >= 0
+ && TYPE_LENGTH (fld_type) / TYPE_LENGTH (tgt_type) > 2)
+ return 1;
+ }
+ }
+ return 0;
+ }
+
+ /* The value is a union which contains at least one field which
+ * would be returned in registers according to these rules
+ * -> returned in register */
+ if (TYPE_CODE (type) == TYPE_CODE_UNION)
+ {
+ for (i = 0; i < TYPE_NFIELDS (type); ++i)
+ {
+ fld_type = TYPE_FIELD_TYPE (type, 0);
+ if (!v850_use_struct_convention (0, fld_type))
+ return 0;
+ }
+ }
+
+ return 1;
}
\f
/* First, just for safety, make sure stack is aligned */
sp &= ~3;
+ /* The offset onto the stack at which we will start copying parameters
+ (after the registers are used up) begins at 16 rather than at zero.
+ I don't really know why, that's just the way it seems to work. */
+ stack_offset = 16;
+
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
len += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
- sp -= len; /* possibly over-allocating, but it works... */
+ sp -= len + stack_offset; /* possibly over-allocating, but it works... */
/* (you might think we could allocate 16 bytes */
/* less, but the ABI seems to use it all! ) */
- argreg = E_ARG0_REGNUM;
+ argreg = E_ARG0_REGNUM;
/* the struct_return pointer occupies the first parameter-passing reg */
if (struct_return)
- write_register (argreg++, struct_addr);
-
- stack_offset = 16;
- /* The offset onto the stack at which we will start copying parameters
- (after the registers are used up) begins at 16 rather than at zero.
- I don't really know why, that's just the way it seems to work. */
+ argreg++;
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
char *val;
char valbuf[v850_register_raw_size (E_ARG0_REGNUM)];
- if (TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_STRUCT
- && TYPE_LENGTH (VALUE_TYPE (*args)) > 8)
+ if (!v850_type_is_scalar (VALUE_TYPE (*args))
+ && TYPE_LENGTH (VALUE_TYPE (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
{
store_address (valbuf, 4, VALUE_ADDRESS (*args));
len = 4;
static void
v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
- memcpy (valbuf, regbuf + v850_register_byte (E_V0_REGNUM),
- TYPE_LENGTH (type));
+ CORE_ADDR return_buffer;
+
+ if (!v850_use_struct_convention (0, type))
+ {
+ /* Scalar return values of <= 8 bytes are returned in
+ E_V0_REGNUM to E_V1_REGNUM. */
+ memcpy (valbuf,
+ ®buf[REGISTER_BYTE (E_V0_REGNUM)],
+ TYPE_LENGTH (type));
+ }
+ else
+ {
+ /* Aggregates and return values > 8 bytes are returned in memory,
+ pointed to by R6. */
+ return_buffer =
+ extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
+ REGISTER_RAW_SIZE (E_V0_REGNUM));
+
+ read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
+ }
}
const static unsigned char *
static void
v850_store_return_value (struct type *type, char *valbuf)
{
- write_register_bytes(v850_register_byte (E_V0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ CORE_ADDR return_buffer;
+
+ if (!v850_use_struct_convention (0, type))
+ write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
+ else
+ {
+ return_buffer = read_register (E_V0_REGNUM);
+ write_memory (return_buffer, valbuf, TYPE_LENGTH (type));
+ }
}
static void
}
static void
-v850_store_struct_return (CORE_ADDR a, CORE_ADDR b)
+v850_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
+ write_register (E_ARG0_REGNUM, addr);
}
static CORE_ADDR
set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, v850_push_return_address);
- set_gdbarch_extract_return_value (gdbarch, v850_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
set_gdbarch_pop_frame (gdbarch, v850_pop_frame);
set_gdbarch_store_struct_return (gdbarch, v850_store_struct_return);
set_gdbarch_store_return_value (gdbarch, v850_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
extern int overload_debug;
/* Local functions. */
-static int typecmp (int staticp, struct type *t1[], struct value *t2[]);
+static int typecmp (int staticp, int varargs, int nargs,
+ struct field t1[], struct value *t2[]);
static CORE_ADDR find_function_addr (struct value *, struct type **);
static struct value *value_arg_coerce (struct value *, struct type *, int);
to do. "long long" variables are rare enough that
BUILTIN_TYPE_LONGEST would seem to be a mistake. */
if (TYPE_CODE (base_type) == TYPE_CODE_INT)
- return value_at (builtin_type_int,
- (CORE_ADDR) value_as_long (arg1),
- VALUE_BFD_SECTION (arg1));
+ return value_at_lazy (builtin_type_int,
+ (CORE_ADDR) value_as_long (arg1),
+ VALUE_BFD_SECTION (arg1));
else if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
{
struct type *enc_type;
sp = old_sp; /* It really is used, for some ifdef's... */
#endif
- if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
- {
- i = 0;
- while (TYPE_CODE (TYPE_ARG_TYPES (ftype)[i]) != TYPE_CODE_VOID)
- i++;
- n_method_args = i;
- if (nargs < i)
- error ("too few arguments in method call");
- }
- else if (nargs < TYPE_NFIELDS (ftype))
+ if (nargs < TYPE_NFIELDS (ftype))
error ("too few arguments in function call");
for (i = nargs - 1; i >= 0; i--)
{
- /* Assume that methods are always prototyped, unless they are off the
- end (which we should only be allowing if there is a ``...'').
- FIXME. */
- if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
- {
- if (i < n_method_args)
- args[i] = value_arg_coerce (args[i], TYPE_ARG_TYPES (ftype)[i], 1);
- else
- args[i] = value_arg_coerce (args[i], NULL, 0);
- }
+ int prototyped;
- /* If we're off the end of the known arguments, do the standard
- promotions. FIXME: if we had a prototype, this should only
- be allowed if ... were present. */
- if (i >= TYPE_NFIELDS (ftype))
- args[i] = value_arg_coerce (args[i], NULL, 0);
+ /* FIXME drow/2002-05-31: Should just always mark methods as
+ prototyped. Can we respect TYPE_VARARGS? Probably not. */
+ if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
+ prototyped = 1;
+ else
+ prototyped = TYPE_PROTOTYPED (ftype);
+ if (i < TYPE_NFIELDS (ftype))
+ args[i] = value_arg_coerce (args[i], TYPE_FIELD_TYPE (ftype, i),
+ prototyped);
else
- {
- param_type = TYPE_FIELD_TYPE (ftype, i);
- args[i] = value_arg_coerce (args[i], param_type, TYPE_PROTOTYPED (ftype));
- }
+ args[i] = value_arg_coerce (args[i], NULL, 0);
/*elz: this code is to handle the case in which the function to be called
has a pointer to function as parameter and the corresponding actual argument
In cc this is not a problem. */
if (using_gcc == 0)
- if (param_type)
+ if (param_type && TYPE_CODE (ftype) != TYPE_CODE_METHOD)
/* if this parameter is a pointer to function */
if (TYPE_CODE (param_type) == TYPE_CODE_PTR)
if (TYPE_CODE (TYPE_TARGET_TYPE (param_type)) == TYPE_CODE_FUNC)
}
\f
/* See if we can pass arguments in T2 to a function which takes arguments
- of types T1. Both t1 and t2 are NULL-terminated vectors. If some
- arguments need coercion of some sort, then the coerced values are written
- into T2. Return value is 0 if the arguments could be matched, or the
- position at which they differ if not.
+ of types T1. T1 is a list of NARGS arguments, and T2 is a NULL-terminated
+ vector. If some arguments need coercion of some sort, then the coerced
+ values are written into T2. Return value is 0 if the arguments could be
+ matched, or the position at which they differ if not.
STATICP is nonzero if the T1 argument list came from a
- static member function.
+ static member function. T2 will still include the ``this'' pointer,
+ but it will be skipped.
For non-static member functions, we ignore the first argument,
which is the type of the instance variable. This is because we want
requested operation is type secure, shouldn't we? FIXME. */
static int
-typecmp (int staticp, struct type *t1[], struct value *t2[])
+typecmp (int staticp, int varargs, int nargs,
+ struct field t1[], struct value *t2[])
{
int i;
if (t2 == 0)
- return 1;
- if (staticp && t1 == 0)
- return t2[1] != 0;
- if (t1 == 0)
- return 1;
- if (t1[!staticp] == 0)
- return 0;
- if (TYPE_CODE (t1[0]) == TYPE_CODE_VOID)
- return 0;
+ internal_error (__FILE__, __LINE__, "typecmp: no argument list");
+
/* Skip ``this'' argument if applicable. T2 will always include THIS. */
if (staticp)
- t2++;
- for (i = !staticp; t1[i] && TYPE_CODE (t1[i]) != TYPE_CODE_VOID; i++)
+ t2 ++;
+
+ for (i = 0;
+ (i < nargs) && TYPE_CODE (t1[i].type) != TYPE_CODE_VOID;
+ i++)
{
struct type *tt1, *tt2;
+
if (!t2[i])
return i + 1;
- tt1 = check_typedef (t1[i]);
+
+ tt1 = check_typedef (t1[i].type);
tt2 = check_typedef (VALUE_TYPE (t2[i]));
+
if (TYPE_CODE (tt1) == TYPE_CODE_REF
/* We should be doing hairy argument matching, as below. */
&& (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (tt1))) == TYPE_CODE (tt2)))
/* We should be doing much hairier argument matching (see section 13.2
of the ARM), but as a quick kludge, just check for the same type
code. */
- if (TYPE_CODE (t1[i]) != TYPE_CODE (VALUE_TYPE (t2[i])))
+ if (TYPE_CODE (t1[i].type) != TYPE_CODE (VALUE_TYPE (t2[i])))
return i + 1;
}
- if (!t1[i])
+ if (varargs || t2[i] == NULL)
return 0;
- return t2[i] ? i + 1 : 0;
+ return i + 1;
}
/* Helper function used by value_struct_elt to recurse through baseclasses.
if (TYPE_FN_FIELD_STUB (f, j))
check_stub_method (type, i, j);
if (!typecmp (TYPE_FN_FIELD_STATIC_P (f, j),
+ TYPE_VARARGS (TYPE_FN_FIELD_TYPE (f, j)),
+ TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (f, j)),
TYPE_FN_FIELD_ARGS (f, j), args))
{
if (TYPE_FN_FIELD_VIRTUAL_P (f, j))
{
if (TYPE_FN_FIELD_STATIC_P (fns_ptr, ix))
static_offset = 1;
- nparms=0;
-
- if (TYPE_FN_FIELD_ARGS(fns_ptr,ix))
- {
- while (TYPE_CODE(TYPE_FN_FIELD_ARGS(fns_ptr,ix)[nparms]) != TYPE_CODE_VOID)
- nparms++;
- }
+ nparms = TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (fns_ptr, ix));
}
else
{
parm_types = (struct type **) xmalloc (nparms * (sizeof (struct type *)));
for (jj = 0; jj < nparms; jj++)
parm_types[jj] = (method
- ? (TYPE_FN_FIELD_ARGS (fns_ptr, ix)[jj])
+ ? (TYPE_FN_FIELD_ARGS (fns_ptr, ix)[jj].type)
: TYPE_FIELD_TYPE (SYMBOL_TYPE (oload_syms[ix]), jj));
/* Compare parameter types to supplied argument types. Skip THIS for
struct value *val;
CORE_ADDR addr;
+#if 0
/* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
if (struct_return)
error ("Function return value unknown.");
return value_at (valtype, addr, NULL);
}
+#endif
+
+ /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
+ if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+ if (struct_return)
+ {
+ addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (retbuf);
+ if (!addr)
+ error ("Function return value unknown.");
+ return value_at (valtype, addr, NULL);
+ }
val = allocate_value (valtype);
CHECK_TYPEDEF (valtype);
+#define EXTRACT_RETURN_VALUE DEPRECATED_EXTRACT_RETURN_VALUE
EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
return val;
child->name = name;
child->index = index;
child->value = value_of_child (parent, index);
- if ((!CPLUS_FAKE_CHILD(child) && child->value == NULL) || parent->error)
+ if ((!CPLUS_FAKE_CHILD (child) && child->value == NULL) || parent->error)
child->error = 1;
child->parent = parent;
child->root = parent->root;
if (value != NULL && VALUE_LAZY (value))
{
/* If we fail to fetch the value of the child, return
- NULL so that callers notice that we're leaving an
- error message. */
+ NULL so that callers notice that we're leaving an
+ error message. */
if (!gdb_value_fetch_lazy (value))
value = NULL;
}
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+ "vstructure");
break;
case TYPE_CODE_PTR:
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+ gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+ "vstructure");
break;
default:
{
if (VALUE_LAZY (var->value))
gdb_value_fetch_lazy (var->value);
- val_print (VALUE_TYPE (var->value), VALUE_CONTENTS_RAW (var->value), 0,
- VALUE_ADDRESS (var->value),
- stb, format_code[(int) var->format], 1, 0, 0);
+ val_print (VALUE_TYPE (var->value),
+ VALUE_CONTENTS_RAW (var->value), 0,
+ VALUE_ADDRESS (var->value), stb,
+ format_code[(int) var->format], 1, 0, 0);
thevalue = ui_file_xstrdup (stb, &dummy);
do_cleanups (old_chain);
}
/* FIXME: This assumes that type orders
inherited, public, private, protected */
i = index + TYPE_N_BASECLASSES (type);
- if (STREQ (parent->name, "private") || STREQ (parent->name, "protected"))
+ if (STREQ (parent->name, "private")
+ || STREQ (parent->name, "protected"))
i += children[v_public];
if (STREQ (parent->name, "protected"))
i += children[v_private];
static gdbarch_get_saved_register_ftype vax_get_saved_register;
static gdbarch_store_struct_return_ftype vax_store_struct_return;
-static gdbarch_extract_return_value_ftype vax_extract_return_value;
+static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
static gdbarch_store_return_value_ftype vax_store_return_value;
-static gdbarch_extract_struct_value_address_ftype
+static gdbarch_deprecated_extract_struct_value_address_ftype
vax_extract_struct_value_address;
static gdbarch_push_dummy_frame_ftype vax_push_dummy_frame;
static unsigned char *print_insn_arg ();
\f
-static char *
+static const char *
vax_register_name (int regno)
{
static char *register_names[] =
/* Return value info */
set_gdbarch_store_struct_return (gdbarch, vax_store_struct_return);
- set_gdbarch_extract_return_value (gdbarch, vax_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value);
set_gdbarch_store_return_value (gdbarch, vax_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch,
- vax_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
/* Call dummy info */
set_gdbarch_push_dummy_frame (gdbarch, vax_push_dummy_frame);
-2002-05-28-cvs
+2002-06-19-cvs
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
-#include "i387-tdep.h"
#include "gdb_assert.h"
#include "x86-64-tdep.h"
/* Transfering floating-point registers between GDB, inferiors and cores. */
-/* Fill GDB's register array with the floating-point register values in
- *FPREGSETP. */
+static void *
+x86_64_fxsave_offset (elf_fpregset_t * fxsave, int regnum)
+{
+ char *reg_name;
+ int reg_index;
+
+ gdb_assert (x86_64_num_gregs - 1 < regnum && regnum < x86_64_num_regs);
+
+ reg_name = x86_64_register_nr2name (regnum);
+
+ if (reg_name[0] == 's' && reg_name[1] == 't')
+ {
+ reg_index = reg_name[2] - '0';
+ return &fxsave->st_space[reg_index * 2];
+ }
+
+ if (reg_name[0] == 'x' && reg_name[1] == 'm' && reg_name[2] == 'm')
+ {
+ reg_index = reg_name[3] - '0';
+ return &fxsave->xmm_space[reg_index * 4];
+ }
+
+ if (strcmp (reg_name, "mxcsr") == 0)
+ return &fxsave->mxcsr;
+
+ return NULL;
+}
+
+/* Fill GDB's register array with the floating-point and SSE register
+ values in *FXSAVE. This function masks off any of the reserved
+ bits in *FXSAVE. */
void
-supply_fpregset (elf_fpregset_t * fpregsetp)
+supply_fpregset (elf_fpregset_t * fxsave)
{
- i387_supply_fxsave ((char *) fpregsetp);
+ int i, reg_st0, reg_mxcsr;
+
+ reg_st0 = x86_64_register_name2nr ("st0");
+ reg_mxcsr = x86_64_register_name2nr ("mxcsr");
+
+ gdb_assert (reg_st0 > 0 && reg_mxcsr > reg_st0);
+
+ for (i = reg_st0; i <= reg_mxcsr; i++)
+ supply_register (i, x86_64_fxsave_offset (fxsave, i));
}
-/* Fill register REGNO (if it is a floating-point register) in
- *FPREGSETP with the value in GDB's register array. If REGNO is -1,
- do this for all registers. */
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
+ this for all registers. This function doesn't touch any of the
+ reserved bits in *FXSAVE. */
void
-fill_fpregset (elf_fpregset_t * fpregsetp, int regno)
+fill_fpregset (elf_fpregset_t * fxsave, int regnum)
{
- i387_fill_fxsave ((char *) fpregsetp, regno);
+ int i, last_regnum = MXCSR_REGNUM;
+ void *ptr;
+
+ if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
+ last_regnum = FOP_REGNUM;
+
+ for (i = FP0_REGNUM; i <= last_regnum; i++)
+ if (regnum == -1 || regnum == i)
+ {
+ ptr = x86_64_fxsave_offset (fxsave, i);
+ if (ptr)
+ regcache_collect (i, ptr);
+ }
}
/* Fetch all floating-point registers from process/thread TID and store
{
int num = classify_argument (TYPE_FIELDS (type)[j].type,
subclasses,
- (TYPE_FIELDS (type)[j].loc.bitpos
- + bit_offset) % 256);
+ (TYPE_FIELDS (type)[j].loc.
+ bitpos + bit_offset) % 256);
if (!num)
return 0;
for (i = 0; i < num; i++)
{
int pos =
- (TYPE_FIELDS (type)[j].loc.bitpos + bit_offset) / 8 / 8;
+ (TYPE_FIELDS (type)[j].loc.bitpos +
+ bit_offset) / 8 / 8;
classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]);
}
}
case TYPE_CODE_VOID:
return 0;
- default: /* Avoid warning. */
+ default: /* Avoid warning. */
break;
}
internal_error (__FILE__, __LINE__,
}
\f
-static char *
-x86_64_register_name (int reg_nr)
+char *
+x86_64_register_nr2name (int reg_nr)
{
if (reg_nr < 0 || reg_nr >= X86_64_NUM_REGS)
return NULL;
return x86_64_register_info_table[reg_nr].name;
}
+
+int
+x86_64_register_name2nr (const char *name)
+{
+ int reg_nr;
+
+ for (reg_nr = 0; reg_nr < X86_64_NUM_REGS; reg_nr++)
+ if (strcmp (name, x86_64_register_info_table[reg_nr].name) == 0)
+ return reg_nr;
+ return -1;
+}
\f
CORE_ADDR
x86_64_skip_prologue (CORE_ADDR pc)
{
- int i, firstline, currline;
+ int i;
struct symtab_and_line v_sal;
struct symbol *v_function;
- CORE_ADDR salendaddr = 0, endaddr = 0;
+ CORE_ADDR endaddr;
/* We will handle only functions beginning with:
55 pushq %rbp
/* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
for (i = 0; i < PROLOG_BUFSIZE; i++)
if (prolog_expect[i] != prolog_buf[i])
- return pc; /* ... no, it doesn't. Nothing to skip. */
+ return pc; /* ... no, it doesn't. Nothing to skip. */
/* OK, we have found the prologue and want PC of the first
non-prologue instruction. */
if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
return pc;
- firstline = v_sal.line;
- currline = firstline;
- salendaddr = v_sal.end;
endaddr = v_function->ginfo.value.block->endaddr;
for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
- if (v_sal.symtab->linetable->item[i].line > firstline
- && v_sal.symtab->linetable->item[i].pc >= salendaddr
+ if (v_sal.symtab->linetable->item[i].pc >= pc
&& v_sal.symtab->linetable->item[i].pc < endaddr)
{
pc = v_sal.symtab->linetable->item[i].pc;
- currline = v_sal.symtab->linetable->item[i].line;
break;
}
set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
- set_gdbarch_register_name (gdbarch, x86_64_register_name);
+ set_gdbarch_register_name (gdbarch, x86_64_register_nr2name);
set_gdbarch_register_size (gdbarch, 8);
set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
set_gdbarch_max_register_raw_size (gdbarch, 16);
/* Return number of args passed to a frame, no way to tell. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* Don't use default structure extract routine */
- set_gdbarch_extract_struct_value_address (gdbarch, 0);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
/* If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
and EXTRACT_RETURN_VALUE to store/fetch the functions return value. It is
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
- set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value);
/* Write into the appropriate registers a function return value stored
extern int x86_64_num_regs;
extern int x86_64_num_gregs;
+int x86_64_register_name2nr (const char *name);
+char *x86_64_register_nr2name (int reg_nr);
+
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
/* Function: xstormy16_register_name
Returns the name of the standard Xstormy16 register N. */
-static char *
+static const char *
xstormy16_register_name (int regnum)
{
static char *register_names[] = {
set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_push_return_address (gdbarch, xstormy16_push_return_address);
- set_gdbarch_extract_return_value (gdbarch, xstormy16_extract_return_value);
+ set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);
set_gdbarch_pop_frame (gdbarch, xstormy16_pop_frame);
set_gdbarch_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_store_return_value (gdbarch, xstormy16_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch,
- xstormy16_extract_struct_value_address);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,
xstormy16_use_struct_convention);
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
{
if ((regno & 1) == 0 && regno < 16)
{
- unsigned short l[2];
+ unsigned char l[4];
- frame_register_read (selected_frame, regno, (char *) (l + 0));
- frame_register_read (selected_frame, regno + 1, (char *) (l + 1));
+ frame_register_read (selected_frame, regno, l + 0);
+ frame_register_read (selected_frame, regno + 1, l + 2);
printf_unfiltered ("\t");
- printf_unfiltered ("%04x%04x", l[0], l[1]);
+ printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
}
if ((regno & 3) == 0 && regno < 16)
{
- unsigned short l[4];
+ unsigned char l[8];
- frame_register_read (selected_frame, regno, (char *) (l + 0));
- frame_register_read (selected_frame, regno + 1, (char *) (l + 1));
- frame_register_read (selected_frame, regno + 2, (char *) (l + 2));
- frame_register_read (selected_frame, regno + 3, (char *) (l + 3));
+ frame_register_read (selected_frame, regno, l + 0);
+ frame_register_read (selected_frame, regno + 1, l + 2);
+ frame_register_read (selected_frame, regno + 2, l + 4);
+ frame_register_read (selected_frame, regno + 3, l + 6);
printf_unfiltered ("\t");
- printf_unfiltered ("%04x%04x%04x%04x", l[0], l[1], l[2], l[3]);
+ printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
+ l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7]);
}
if (regno == 15)
{
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore:
+ * dis-asm.h (print_insn_frv): New prototype.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * remote-sim.h: Move to directory gdb/.
+ * callback.h: Move to directory gdb/.
+
+2002-06-07 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * bfdlink.h (struct bfd_link_info): Change type of
+ pei386_auto_import field to int so that -1 can mean enabled by
+ default and 1 can mean enabled by command line switch.
+
+2002-06-06 DJ Delorie <dj@redhat.com>
+
+ * hashtab.h (htab): Rearrange new members for backward
+ compatibility.
+ (htab_create): Don't use a macro that requires other headers.
+
+2002-06-05 Geoffrey Keating <geoffk@redhat.com>
+
+ * hashtab.h (htab_create): Restore prototype for backward
+ compatibility.
+ (htab_try_create): Likewise.
+
+2002-05-22 Geoffrey Keating <geoffk@redhat.com>
+
+ * hashtab.h (struct htab): Update for change to length specifier.
+
+2002-05-10 Geoffrey Keating <geoffk@redhat.com>
+
+ * hashtab.h (GTY): Define if undefined.
+ (htab_alloc): New typedef.
+ (htab_free): New typedef.
+ (struct htab): Support gengtype; allow user-specified memory
+ allocation.
+ (htab_create_alloc): New.
+ (htab_create): Replace with #define.
+ (htab_try_create): Delete.
+
+2002-05-31 Michal Ludvig <mludvig@suse.cz>
+
+ * elf/dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed
+ to DW_CFA_lo_user, DW_CFA_hi_user respectively.
+
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
* dis-asm.h: Prototype print_insn_dlx.
Free Software Foundation, Inc.
Written by Steve Chamberlain and 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. */
#ifndef BFDLINK_H
#define BFDLINK_H
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
- /* True if auto-import thunks for DATA items in pei386 DLLs
- should be generated/linked against. */
- boolean pei386_auto_import;
+ /* Non-zero if auto-import thunks for DATA items in pei386 DLLs
+ should be generated/linked against. Set to 1 if this feature
+ is explicitly requested by the user, -1 if enabled by default. */
+ int pei386_auto_import;
/* True if non-PLT relocs should be merged into one reloc section
and sorted so that relocs against the same symbol come together. */
+++ /dev/null
-/* Remote target system call callback support.
- Copyright 1997 Free Software Foundation, Inc.
- Contributed by Cygnus Solutions.
-
-This file is part of GDB.
-
-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. */
-
-/* This interface isn't intended to be specific to any particular kind
- of remote (hardware, simulator, whatever). As such, support for it
- (e.g. sim/common/callback.c) should *not* live in the simulator source
- tree, nor should it live in the gdb source tree. */
-
-/* There are various ways to handle system calls:
-
- 1) Have a simulator intercept the appropriate trap instruction and
- directly perform the system call on behalf of the target program.
- This is the typical way of handling system calls for embedded targets.
- [Handling system calls for embedded targets isn't that much of an
- oxymoron as running compiler testsuites make use of the capability.]
-
- This method of system call handling is done when STATE_ENVIRONMENT
- is ENVIRONMENT_USER.
-
- 2) Have a simulator emulate the hardware as much as possible.
- If the program running on the real hardware communicates with some sort
- of target manager, one would want to be able to run this program on the
- simulator as well.
-
- This method of system call handling is done when STATE_ENVIRONMENT
- is ENVIRONMENT_OPERATING.
-*/
-
-#ifndef CALLBACK_H
-#define CALLBACK_H
-
-/* ??? The reason why we check for va_start here should be documented. */
-
-#ifndef va_start
-#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-\f
-/* Mapping of host/target values. */
-/* ??? For debugging purposes, one might want to add a string of the
- name of the symbol. */
-
-typedef struct {
- int host_val;
- int target_val;
-} CB_TARGET_DEFS_MAP;
-
-#define MAX_CALLBACK_FDS 10
-
-/* Forward decl for stat/fstat. */
-struct stat;
-
-typedef struct host_callback_struct host_callback;
-
-struct host_callback_struct
-{
- int (*close) PARAMS ((host_callback *,int));
- int (*get_errno) PARAMS ((host_callback *));
- int (*isatty) PARAMS ((host_callback *, int));
- int (*lseek) PARAMS ((host_callback *, int, long , int));
- int (*open) PARAMS ((host_callback *, const char*, int mode));
- int (*read) PARAMS ((host_callback *,int, char *, int));
- int (*read_stdin) PARAMS (( host_callback *, char *, int));
- int (*rename) PARAMS ((host_callback *, const char *, const char *));
- int (*system) PARAMS ((host_callback *, const char *));
- long (*time) PARAMS ((host_callback *, long *));
- int (*unlink) PARAMS ((host_callback *, const char *));
- int (*write) PARAMS ((host_callback *,int, const char *, int));
- int (*write_stdout) PARAMS ((host_callback *, const char *, int));
- void (*flush_stdout) PARAMS ((host_callback *));
- int (*write_stderr) PARAMS ((host_callback *, const char *, int));
- void (*flush_stderr) PARAMS ((host_callback *));
- int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
- int (*fstat) PARAMS ((host_callback *, int, struct stat *));
-
- /* When present, call to the client to give it the oportunity to
- poll any io devices for a request to quit (indicated by a nonzero
- return value). */
- int (*poll_quit) PARAMS ((host_callback *));
-
- /* Used when the target has gone away, so we can close open
- handles and free memory etc etc. */
- int (*shutdown) PARAMS ((host_callback *));
- int (*init) PARAMS ((host_callback *));
-
- /* depreciated, use vprintf_filtered - Talk to the user on a console. */
- void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
-
- /* Talk to the user on a console. */
- void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
- /* Same as vprintf_filtered but to stderr. */
- void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
- /* Print an error message and "exit".
- In the case of gdb "exiting" means doing a longjmp back to the main
- command loop. */
- void (*error) PARAMS ((host_callback *, const char *, ...));
-
- int last_errno; /* host format */
-
- int fdmap[MAX_CALLBACK_FDS];
- char fdopen[MAX_CALLBACK_FDS];
- char alwaysopen[MAX_CALLBACK_FDS];
-
- /* System call numbers. */
- CB_TARGET_DEFS_MAP *syscall_map;
- /* Errno values. */
- CB_TARGET_DEFS_MAP *errno_map;
- /* Flags to the open system call. */
- CB_TARGET_DEFS_MAP *open_map;
- /* Signal numbers. */
- CB_TARGET_DEFS_MAP *signal_map;
- /* Layout of `stat' struct.
- The format is a series of "name,length" pairs separated by colons.
- Empty space is indicated with a `name' of "space".
- All padding must be explicitly mentioned.
- Lengths are in bytes. If this needs to be extended to bits,
- use "name.bits".
- Example: "st_dev,4:st_ino,4:st_mode,4:..." */
- const char *stat_map;
-
- /* Marker for those wanting to do sanity checks.
- This should remain the last member of this struct to help catch
- miscompilation errors. */
-#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
- int magic;
-};
-
-extern host_callback default_callback;
-\f
-/* Canonical versions of system call numbers.
- It's not intended to willy-nilly throw every system call ever heard
- of in here. Only include those that have an important use.
- ??? One can certainly start a discussion over the ones that are currently
- here, but that will always be true. */
-
-/* These are used by the ANSI C support of libc. */
-#define CB_SYS_exit 1
-#define CB_SYS_open 2
-#define CB_SYS_close 3
-#define CB_SYS_read 4
-#define CB_SYS_write 5
-#define CB_SYS_lseek 6
-#define CB_SYS_unlink 7
-#define CB_SYS_getpid 8
-#define CB_SYS_kill 9
-#define CB_SYS_fstat 10
-/*#define CB_SYS_sbrk 11 - not currently a system call, but reserved. */
-
-/* ARGV support. */
-#define CB_SYS_argvlen 12
-#define CB_SYS_argv 13
-
-/* These are extras added for one reason or another. */
-#define CB_SYS_chdir 14
-#define CB_SYS_stat 15
-#define CB_SYS_chmod 16
-#define CB_SYS_utime 17
-#define CB_SYS_time 18
-\f
-/* Struct use to pass and return information necessary to perform a
- system call. */
-/* FIXME: Need to consider target word size. */
-
-typedef struct cb_syscall {
- /* The target's value of what system call to perform. */
- int func;
- /* The arguments to the syscall. */
- long arg1, arg2, arg3, arg4;
-
- /* The result. */
- long result;
- /* Some system calls have two results. */
- long result2;
- /* The target's errno value, or 0 if success.
- This is converted to the target's value with host_to_target_errno. */
- int errcode;
-
- /* Working space to be used by memory read/write callbacks. */
- PTR p1;
- PTR p2;
- long x1,x2;
-
- /* Callbacks for reading/writing memory (e.g. for read/write syscalls).
- ??? long or unsigned long might be better to use for the `count'
- argument here. We mimic sim_{read,write} for now. Be careful to
- test any changes with -Wall -Werror, mixed signed comparisons
- will get you. */
- int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
- unsigned long /*taddr*/, char * /*buf*/,
- int /*bytes*/));
- int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
- unsigned long /*taddr*/, const char * /*buf*/,
- int /*bytes*/));
-
- /* For sanity checking, should be last entry. */
- int magic;
-} CB_SYSCALL;
-
-/* Magic number sanity checker. */
-#define CB_SYSCALL_MAGIC 0x12344321
-
-/* Macro to initialize CB_SYSCALL. Called first, before filling in
- any fields. */
-#define CB_SYSCALL_INIT(sc) \
-do { \
- memset ((sc), 0, sizeof (*(sc))); \
- (sc)->magic = CB_SYSCALL_MAGIC; \
-} while (0)
-\f
-/* Return codes for various interface routines. */
-
-typedef enum {
- CB_RC_OK = 0,
- /* generic error */
- CB_RC_ERR,
- /* either file not found or no read access */
- CB_RC_ACCESS,
- CB_RC_NO_MEM
-} CB_RC;
-
-/* Read in target values for system call numbers, errno values, signals. */
-CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
-
-/* Translate target to host syscall function numbers. */
-int cb_target_to_host_syscall PARAMS ((host_callback *, int));
-
-/* Translate host to target errno value. */
-int cb_host_to_target_errno PARAMS ((host_callback *, int));
-
-/* Translate target to host open flags. */
-int cb_target_to_host_open PARAMS ((host_callback *, int));
-
-/* Translate target signal number to host. */
-int cb_target_to_host_signal PARAMS ((host_callback *, int));
-
-/* Translate host signal number to target. */
-int cb_host_to_target_signal PARAMS ((host_callback *, int));
-
-/* Translate host stat struct to target.
- If stat struct ptr is NULL, just compute target stat struct size.
- Result is size of target stat struct or 0 if error. */
-int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
-
-/* Perform a system call. */
-CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
-
-#endif
extern int print_insn_xstormy16 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 disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore, Michael Meissner, Dave Brolley:
+ * common.h (EM_CYGNUS_FRV): New macro.
+ * frv.h: New file.
+
+2002-06-06 Lars Brinkhoff <lars@nocrew.org>
+
+ * common.h: Change registry@sco.com to registry@caldera.com.
+ (EM_PDP10, EM_PDP11): Define.
+
+2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl)
+ (_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New
+ prototypes.
+
+2002-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF,
+ LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New.
+
+2002-05-30 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64,
+ R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI,
+ R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64,
+ R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New.
+
+2002-05-29 Matt Thomas <matt@3am-software.com>
+
+ * vax.h: New file
+
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
* common.h (EM_DLX): Define.
STO_ALPHA_STD_GPLOAD. */
RELOC_NUMBER (R_ALPHA_BRSGP, 28)
+ /* Thread-Local Storage. */
+ RELOC_NUMBER (R_ALPHA_TLSGD, 29)
+ RELOC_NUMBER (R_ALPHA_TLSLDM, 30)
+ RELOC_NUMBER (R_ALPHA_DTPMOD64, 31)
+ RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32)
+ RELOC_NUMBER (R_ALPHA_DTPREL64, 33)
+ RELOC_NUMBER (R_ALPHA_DTPRELHI, 34)
+ RELOC_NUMBER (R_ALPHA_DTPRELLO, 35)
+ RELOC_NUMBER (R_ALPHA_DTPREL16, 36)
+ RELOC_NUMBER (R_ALPHA_GOTTPREL, 37)
+ RELOC_NUMBER (R_ALPHA_TPREL64, 38)
+ RELOC_NUMBER (R_ALPHA_TPRELHI, 39)
+ RELOC_NUMBER (R_ALPHA_TPRELLO, 40)
+ RELOC_NUMBER (R_ALPHA_TPREL16, 41)
+
END_RELOC_NUMBERS (R_ALPHA_max)
+#define LITUSE_ALPHA_ADDR 0
+#define LITUSE_ALPHA_BASE 1
+#define LITUSE_ALPHA_BYTOFF 2
+#define LITUSE_ALPHA_JSR 3
+#define LITUSE_ALPHA_TLSGD 4
+#define LITUSE_ALPHA_TLSLDM 5
+
#endif /* _ELF_ALPHA_H */
#define ET_HIPROC 0xFFFF /* Processor-specific */
/* Values for e_machine, which identifies the architecture. These numbers
- are officially assigned by registry@sco.com. See below for a list of
+ are officially assigned by registry@caldera.com. See below for a list of
ad-hoc numbers used during initial development. */
#define EM_NONE 0 /* No machine */
#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
#define EM_FX66 66 /* Siemens FX66 microcontroller */
#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
will have a collision. Instead, pick a random number.
Normally, each entity or maintainer responsible for a machine with an
- unofficial e_machine number should eventually ask registry@sco.com for
+ unofficial e_machine number should eventually ask registry@caldera.com for
an officially blessed number to be added to the list above. */
#define EM_PJ_OLD 99 /* picoJava */
#define EM_XSTORMY16 0xad45
+/* FRV magic number - no EABI available??. */
+#define EM_CYGNUS_FRV 0x5441
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */
#define DW_CIE_VERSION 1
#define DW_CFA_extended 0
-#define DW_CFA_low_user 0x1c
-#define DW_CFA_high_user 0x3f
+#define DW_CFA_lo_user 0x1c
+#define DW_CFA_hi_user 0x3f
#define DW_CHILDREN_no 0x00
#define DW_CHILDREN_yes 0x01
FIXME: This seems redundant now that we export the interface above. */
extern boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
+extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
+
/* We put this in elf_section_data (section)->tdata. */
struct sh64_section_data
{
+2002-06-15 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-arm.h (enum sim_arm_regs): Rename sim_arm_regnum.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-arm.h: New file.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * callback.h: Copy to here from directory above.
+ * remote-sim.h: Copy to here from directory above.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * sim-d10v.h (sim_d10v_regs): Expand to include all registers.
+ Update copyright.
+
2002-05-23 Andrew Cagney <ac131313@redhat.com>
* sim-d10v.h: New file. Moved from include/sim-d10v.h.
/* This file defines the interface between the d10v simulator and gdb.
- Copyright 1999 Free Software Foundation, Inc.
+
+ Copyright 1999, 2002 Free Software Foundation, Inc.
This file is part of GDB.
/* The simulator makes use of the following register information. */
+enum sim_d10v_regs
+{
+ SIM_D10V_R0_REGNUM,
+ SIM_D10V_R1_REGNUM,
+ SIM_D10V_R2_REGNUM,
+ SIM_D10V_R3_REGNUM,
+ SIM_D10V_R4_REGNUM,
+ SIM_D10V_R5_REGNUM,
+ SIM_D10V_R6_REGNUM,
+ SIM_D10V_R7_REGNUM,
+ SIM_D10V_R8_REGNUM,
+ SIM_D10V_R9_REGNUM,
+ SIM_D10V_R10_REGNUM,
+ SIM_D10V_R11_REGNUM,
+ SIM_D10V_R12_REGNUM,
+ SIM_D10V_R13_REGNUM,
+ SIM_D10V_R14_REGNUM,
+ SIM_D10V_R15_REGNUM,
+ SIM_D10V_CR0_REGNUM,
+ SIM_D10V_CR1_REGNUM,
+ SIM_D10V_CR2_REGNUM,
+ SIM_D10V_CR3_REGNUM,
+ SIM_D10V_CR4_REGNUM,
+ SIM_D10V_CR5_REGNUM,
+ SIM_D10V_CR6_REGNUM,
+ SIM_D10V_CR7_REGNUM,
+ SIM_D10V_CR8_REGNUM,
+ SIM_D10V_CR9_REGNUM,
+ SIM_D10V_CR10_REGNUM,
+ SIM_D10V_CR11_REGNUM,
+ SIM_D10V_CR12_REGNUM,
+ SIM_D10V_CR13_REGNUM,
+ SIM_D10V_CR14_REGNUM,
+ SIM_D10V_CR15_REGNUM,
+ SIM_D10V_A0_REGNUM,
+ SIM_D10V_A1_REGNUM,
+ SIM_D10V_SPI_REGNUM,
+ SIM_D10V_SPU_REGNUM,
+ SIM_D10V_IMAP0_REGNUM,
+ SIM_D10V_IMAP1_REGNUM,
+ SIM_D10V_DMAP0_REGNUM,
+ SIM_D10V_DMAP1_REGNUM,
+ SIM_D10V_DMAP2_REGNUM,
+ SIM_D10V_DMAP3_REGNUM,
+ SIM_D10V_TS2_DMAP_REGNUM
+};
+
enum
- {
- SIM_D10V_R0_REGNUM = 0,
- SIM_D10V_CR0_REGNUM = 16,
- SIM_D10V_A0_REGNUM = 32,
- SIM_D10V_SPI_REGNUM = 34,
- SIM_D10V_SPU_REGNUM = 35,
- SIM_D10V_IMAP0_REGNUM = 36,
- SIM_D10V_DMAP0_REGNUM = 38,
- SIM_D10V_TS2_DMAP_REGNUM = 40
- };
-
-enum
- {
- SIM_D10V_NR_R_REGS = 16,
- SIM_D10V_NR_A_REGS = 2,
- SIM_D10V_NR_IMAP_REGS = 2,
- SIM_D10V_NR_DMAP_REGS = 4,
- SIM_D10V_NR_CR_REGS = 16
- };
+{
+ SIM_D10V_NR_R_REGS = 16,
+ SIM_D10V_NR_A_REGS = 2,
+ SIM_D10V_NR_IMAP_REGS = 2,
+ SIM_D10V_NR_DMAP_REGS = 4,
+ SIM_D10V_NR_CR_REGS = 16
+};
#ifdef __cplusplus
}
#include <ansidecl.h>
+#ifndef GTY
+#define GTY(X)
+#endif
+
/* The type for a hash code. */
typedef unsigned int hashval_t;
htab_traverse. Return 1 to continue scan, 0 to stop. */
typedef int (*htab_trav) PARAMS ((void **, void *));
+/* Memory-allocation function, with the same functionality as calloc().
+ Iff it returns NULL, the hash table implementation will pass an error
+ code back to the user, so if your code doesn't handle errors,
+ best if you use xcalloc instead. */
+typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
+
+/* We also need a free() routine. */
+typedef void (*htab_free) PARAMS ((PTR));
+
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
tables. All work with hash table should be executed only through
functions mentioned below. */
-struct htab
+struct htab GTY(())
{
/* Pointer to hash function. */
htab_hash hash_f;
htab_del del_f;
/* Table itself. */
- PTR *entries;
+ PTR * GTY ((use_param (""), length ("%h.size"))) entries;
/* Current size (in entries) of the hash table */
size_t size;
of collisions fixed for time of work with the hash table. */
unsigned int collisions;
- /* This is non-zero if we are allowed to return NULL for function calls
- that allocate memory. */
- int return_allocation_failure;
+ /* Pointers to allocate/free functions. */
+ htab_alloc alloc_f;
+ htab_free free_f;
};
typedef struct htab *htab_t;
/* The prototypes of the package functions. */
-extern htab_t htab_create PARAMS ((size_t, htab_hash,
- htab_eq, htab_del));
+extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
+ htab_eq, htab_del,
+ htab_alloc, htab_free));
+
+/* Backward-compatibility functions. */
+extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-/* This function is like htab_create, but may return NULL if memory
- allocation fails, and also signals that htab_find_slot_with_hash and
- htab_find_slot are allowed to return NULL when inserting. */
-extern htab_t htab_try_create PARAMS ((size_t, htab_hash,
- htab_eq, htab_del));
extern void htab_delete PARAMS ((htab_t));
extern void htab_empty PARAMS ((htab_t));
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * a29k.h: Replace CONST with const.
+ (CONST): Don't define.
+ * convex.h: Replace CONST with const.
+ (CONST): Don't define.
+ * dlx.h: Replace CONST with const.
+ * or32.h (CONST): Don't define.
+
+2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
+
+ * mips.h (OP_SH_ALN, OP_MASK_ALN, OP_SH_VSEL, OP_MASK_VSEL)
+ (MDMX_FMTSEL_IMM_QH, MDMX_FMTSEL_IMM_OB, MDMX_FMTSEL_VEC_QH)
+ (MDMX_FMTSEL_VEC_OB, INSN_READ_MDMX_ACC, INSN_WRITE_MDMX_ACC)
+ (INSN_MDMX): New constants, for MDMX support.
+ (opcode character list): Add "O", "Q", "X", "Y", and "Z" for MDMX.
+
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
* dlx.h: New file.
/* Table of opcodes for the AMD 29000 family.
- Copyright 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 2002 Free Software Foundation, Inc.
This file is part of GDB and GAS.
char *args;
};
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
-static CONST struct a29k_opcode a29k_opcodes[] =
+static const struct a29k_opcode a29k_opcodes[] =
{
{ "add", 0x14000000, "c,a,b" },
if we've run off the end of the table. */
};
-CONST unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
+const unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
/* Information for instruction disassembly on the Convex.
- Copyright 1989, 1993 Free Software Foundation, Inc.
+ Copyright 1989, 1993, 2002 Free Software Foundation, Inc.
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
#define xxx 0
#define rrr 1
#define rr 2
#define CPUID 20
#define TID 21
-CONST char *op[] = {
+const char *op[] = {
"",
"v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7",
"s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7",
"tid",
};
-CONST struct formstr format0[] = {
+const struct formstr format0[] = {
{0,0,rrr,V,S,S}, /* mov */
{0,0,rrr,S,S,V}, /* mov */
{1,1,rrr,V,V,V}, /* merg.t */
{4,8,rrr,V,S,V}, /* div.l */
};
-CONST struct formstr format1[] = {
+const struct formstr format1[] = {
{11,0,xxx,0,0,0}, /* exit */
{12,0,a3,0,0,0}, /* jmp */
{13,2,a3,0,0,0}, /* jmpi.f */
{21,8,a2r,V,0,0}, /* st.l */
};
-CONST struct formstr format2[] = {
+const struct formstr format2[] = {
{28,5,rr,A,A,0}, /* cvtw.b */
{28,6,rr,A,A,0}, /* cvtw.h */
{29,7,rr,A,A,0}, /* cvtb.w */
{4,8,rr,S,S,0}, /* div.l */
};
-CONST struct formstr format3[] = {
+const struct formstr format3[] = {
{32,3,rr,V,V,0}, /* cvtd.s */
{31,4,rr,V,V,0}, /* cvts.d */
{33,4,rr,V,V,0}, /* cvtl.d */
{43,8,rr,S,S,0}, /* neg.l */
};
-CONST struct formstr format4[] = {
+const struct formstr format4[] = {
{46,0,nops,0,0,0}, /* nop */
{47,0,pcrel,0,0,0}, /* br */
{48,2,pcrel,0,0,0}, /* bri.f */
{50,1,pcrel,0,0,0}, /* brs.t */
};
-CONST struct formstr format5[] = {
+const struct formstr format5[] = {
{51,5,rr,V,V,0}, /* ldvi.b */
{51,6,rr,V,V,0}, /* ldvi.h */
{51,7,rr,V,V,0}, /* ldvi.w */
{52,8,rxr,S,V,0}, /* stvi.l */
};
-CONST struct formstr format6[] = {
+const struct formstr format6[] = {
{53,0,r,A,0,0}, /* ldsdr */
{54,0,r,A,0,0}, /* ldkdr */
{55,3,r,S,0,0}, /* ln.s */
{83,4,r,S,0,0}, /* atan.d */
};
-CONST struct formstr format7[] = {
+const struct formstr format7[] = {
{84,5,r,V,0,0}, /* sum.b */
{84,6,r,V,0,0}, /* sum.h */
{84,7,r,V,0,0}, /* sum.w */
{0,0,0,0,0,0},
};
-CONST struct formstr formatx[] = {
+const struct formstr formatx[] = {
{0,0,0,0,0,0},
};
-CONST struct formstr format1a[] = {
+const struct formstr format1a[] = {
{91,0,imr,A,0,0}, /* halt */
{92,0,a4,0,0,0}, /* sysc */
{18,6,imr,A,0,0}, /* ld.h */
{41,7,imr,A,0,0}, /* lt.w */
};
-CONST struct formstr format1b[] = {
+const struct formstr format1b[] = {
{18,4,imr,S,0,0}, /* ld.d */
{18,10,imr,S,0,0}, /* ld.u */
{18,8,imr,S,0,0}, /* ld.l */
{41,7,imr,S,0,0}, /* lt.w */
};
-CONST struct formstr e0_format0[] = {
+const struct formstr e0_format0[] = {
{10,3,rrr,S,V,V}, /* sub.s */
{10,4,rrr,S,V,V}, /* sub.d */
{4,3,rrr,S,V,V}, /* div.s */
{4,16,rrr,V,S,V}, /* div.l.f */
};
-CONST struct formstr e0_format1[] = {
+const struct formstr e0_format1[] = {
{0,0,0,0,0,0},
{94,0,a3,0,0,0}, /* tst */
{95,0,a3,0,0,0}, /* lck */
{21,16,a2r,V,0,0}, /* st.l.f */
};
-CONST struct formstr e0_format2[] = {
+const struct formstr e0_format2[] = {
{28,5,rr,V,V,0}, /* cvtw.b */
{28,6,rr,V,V,0}, /* cvtw.h */
{29,7,rr,V,V,0}, /* cvtb.w */
{0,0,0,0,0,0},
};
-CONST struct formstr e0_format3[] = {
+const struct formstr e0_format3[] = {
{32,11,rr,V,V,0}, /* cvtd.s.f */
{31,12,rr,V,V,0}, /* cvts.d.f */
{33,12,rr,V,V,0}, /* cvtl.d.f */
{0,0,0,0,0,0},
};
-CONST struct formstr e0_format4[] = {
+const struct formstr e0_format4[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
};
-CONST struct formstr e0_format5[] = {
+const struct formstr e0_format5[] = {
{51,13,rr,V,V,0}, /* ldvi.b.f */
{51,14,rr,V,V,0}, /* ldvi.h.f */
{51,15,rr,V,V,0}, /* ldvi.w.f */
{52,16,rxr,S,V,0}, /* stvi.l.f */
};
-CONST struct formstr e0_format6[] = {
+const struct formstr e0_format6[] = {
{0,0,rxl,S,CIR,0}, /* mov */
{0,0,lr,CIR,S,0}, /* mov */
{0,0,lr,TOC,S,0}, /* mov */
{0,0,0,0,0,0},
};
-CONST struct formstr e0_format7[] = {
+const struct formstr e0_format7[] = {
{84,13,r,V,0,0}, /* sum.b.f */
{84,14,r,V,0,0}, /* sum.h.f */
{84,15,r,V,0,0}, /* sum.w.f */
{0,0,0,0,0,0},
};
-CONST struct formstr e1_format0[] = {
+const struct formstr e1_format0[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{4,23,rrr,V,S,V}, /* div.l.t */
};
-CONST struct formstr e1_format1[] = {
+const struct formstr e1_format1[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{21,23,a2r,V,0,0}, /* st.l.t */
};
-CONST struct formstr e1_format2[] = {
+const struct formstr e1_format2[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
};
-CONST struct formstr e1_format3[] = {
+const struct formstr e1_format3[] = {
{32,18,rr,V,V,0}, /* cvtd.s.t */
{31,19,rr,V,V,0}, /* cvts.d.t */
{33,19,rr,V,V,0}, /* cvtl.d.t */
{0,0,0,0,0,0},
};
-CONST struct formstr e1_format4[] = {
+const struct formstr e1_format4[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
};
-CONST struct formstr e1_format5[] = {
+const struct formstr e1_format5[] = {
{51,20,rr,V,V,0}, /* ldvi.b.t */
{51,21,rr,V,V,0}, /* ldvi.h.t */
{51,22,rr,V,V,0}, /* ldvi.w.t */
{52,23,rxr,S,V,0}, /* stvi.l.t */
};
-CONST struct formstr e1_format6[] = {
+const struct formstr e1_format6[] = {
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
{0,0,0,0,0,0},
};
-CONST struct formstr e1_format7[] = {
+const struct formstr e1_format7[] = {
{84,20,r,V,0,0}, /* sum.b.t */
{84,21,r,V,0,0}, /* sum.h.t */
{84,22,r,V,0,0}, /* sum.w.t */
char *args;
};
-static CONST struct dlx_opcode dlx_opcodes[] =
+static const struct dlx_opcode dlx_opcodes[] =
{
/* Arithmetic and Logic R-TYPE instructions. */
{ "nop", (ALUOP|NOPF), "N" }, /* NOP */
#define OP_MASK_SEL 0x7 /* The sel field of mfcZ and mtcZ. */
#define OP_SH_CODE19 6 /* 19 bit wait code. */
#define OP_MASK_CODE19 0x7ffff
+#define OP_SH_ALN 21
+#define OP_MASK_ALN 0x7
+#define OP_SH_VSEL 21
+#define OP_MASK_VSEL 0x1f
+
+/* Values in the 'VSEL' field. */
+#define MDMX_FMTSEL_IMM_QH 0x1d
+#define MDMX_FMTSEL_IMM_OB 0x1e
+#define MDMX_FMTSEL_VEC_QH 0x15
+#define MDMX_FMTSEL_VEC_OB 0x16
/* This structure holds information for a particular instruction. */
"f" 32 bit floating point constant
"l" 32 bit floating point constant in .lit4
+ MDMX instruction operands (note that while these use the FP register
+ fields, they accept both $fN and $vN names for the registers):
+ "O" MDMX alignment offset (OP_*_ALN)
+ "Q" MDMX vector/scalar/immediate source (OP_*_VSEL and OP_*_FT)
+ "X" MDMX destination register (OP_*_FD)
+ "Y" MDMX source register (OP_*_FS)
+ "Z" MDMX source register (OP_*_FT)
+
Other:
"()" parens surrounding optional value
"," separates operands
Characters used so far, for quick reference when adding more:
"<>(),"
- "ABCDEFGHIJLMNPRSTUVW"
+ "ABCDEFGHIJLMNOPQRSTUVWXYZ"
"abcdfhijklopqrstuvwxz"
*/
#define INSN_MULT 0x40000000
/* Instruction synchronize shared memory. */
#define INSN_SYNC 0x80000000
+/* Instruction reads MDMX accumulator. XXX FIXME: No bits left! */
+#define INSN_READ_MDMX_ACC 0
+/* Instruction writes MDMX accumulator. XXX FIXME: No bits left! */
+#define INSN_WRITE_MDMX_ACC 0
/* Instruction is actually a macro. It should be ignored by the
disassembler, and requires special treatment by the assembler. */
/* MIPS-3D ASE */
#define INSN_MIPS3D 0x00004000
+/* MDMX ASE */
+#define INSN_MDMX 0x00008000
/* Chip specific instructions. These are bitmasks. */
#define PARAMS(x) x
#endif
-#ifndef CONST
-#define CONST const
-#endif
-
#define MAX_GPRS 32
#define PAGE_SIZE 4096
#undef __HALF_WORD_INSN__
+++ /dev/null
-/* This file defines the interface between the simulator and gdb.
- Copyright 1993, 1994, 1996, 1997, 1998, 2000
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-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. */
-
-#if !defined (REMOTE_SIM_H)
-#define REMOTE_SIM_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This file is used when building stand-alone simulators, so isolate this
- file from gdb. */
-
-/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
- gdb does (unsigned int - from defs.h). */
-
-#ifndef CORE_ADDR_TYPE
-typedef unsigned int SIM_ADDR;
-#else
-typedef CORE_ADDR_TYPE SIM_ADDR;
-#endif
-
-
-/* Semi-opaque type used as result of sim_open and passed back to all
- other routines. "desc" is short for "descriptor".
- It is up to each simulator to define `sim_state'. */
-
-typedef struct sim_state *SIM_DESC;
-
-
-/* Values for `kind' arg to sim_open. */
-
-typedef enum {
- SIM_OPEN_STANDALONE, /* simulator used standalone (run.c) */
- SIM_OPEN_DEBUG /* simulator used by debugger (gdb) */
-} SIM_OPEN_KIND;
-
-
-/* Return codes from various functions. */
-
-typedef enum {
- SIM_RC_FAIL = 0,
- SIM_RC_OK = 1,
- SIM_RC_UNKNOWN_BREAKPOINT = 2,
- SIM_RC_INSUFFICIENT_RESOURCES = 3,
- SIM_RC_DUPLICATE_BREAKPOINT = 4
-} SIM_RC;
-
-
-/* The bfd struct, as an opaque type. */
-
-struct _bfd;
-
-
-/* Main simulator entry points. */
-
-
-/* Create a fully initialized simulator instance.
-
- (This function is called when the simulator is selected from the
- gdb command line.)
-
- KIND specifies how the simulator shall be used. Currently there
- are only two kinds: stand-alone and debug.
-
- CALLBACK specifies a standard host callback (defined in callback.h).
-
- ABFD, when non NULL, designates a target program. The program is
- not loaded.
-
- ARGV is a standard ARGV pointer such as that passed from the
- command line. The syntax of the argument list is is assumed to be
- ``SIM-PROG { SIM-OPTION } [ TARGET-PROGRAM { TARGET-OPTION } ]''.
- The trailing TARGET-PROGRAM and args are only valid for a
- stand-alone simulator.
-
- On success, the result is a non NULL descriptor that shall be
- passed to the other sim_foo functions. While the simulator
- configuration can be parameterized by (in decreasing precedence)
- ARGV's SIM-OPTION, ARGV's TARGET-PROGRAM and the ABFD argument, the
- successful creation of the simulator shall not dependent on the
- presence of any of these arguments/options.
-
- Hardware simulator: The created simulator shall be sufficiently
- initialized to handle, with out restrictions any client requests
- (including memory reads/writes, register fetch/stores and a
- resume).
-
- Process simulator: that process is not created until a call to
- sim_create_inferior. FIXME: What should the state of the simulator
- be? */
-
-SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct _bfd *abfd, char **argv));
-
-
-/* Destory a simulator instance.
-
- QUITTING is non-zero if we cannot hang on errors.
-
- This may involve freeing target memory and closing any open files
- and mmap'd areas. You cannot assume sim_kill has already been
- called. */
-
-void sim_close PARAMS ((SIM_DESC sd, int quitting));
-
-
-/* Load program PROG into the simulators memory.
-
- If ABFD is non-NULL, the bfd for the file has already been opened.
- The result is a return code indicating success.
-
- Hardware simulator: Normally, each program section is written into
- memory according to that sections LMA using physical (direct)
- addressing. The exception being systems, such as PPC/CHRP, which
- support more complicated program loaders. A call to this function
- should not effect the state of the processor registers. Multiple
- calls to this function are permitted and have an accumulative
- effect.
-
- Process simulator: Calls to this function may be ignored.
-
- FIXME: Most hardware simulators load the image at the VMA using
- virtual addressing.
-
- FIXME: For some hardware targets, before a loaded program can be
- executed, it requires the manipulation of VM registers and tables.
- Such manipulation should probably (?) occure in
- sim_create_inferior. */
-
-SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct _bfd *abfd, int from_tty));
-
-
-/* Prepare to run the simulated program.
-
- ABFD, if not NULL, provides initial processor state information.
- ARGV and ENV, if non NULL, are NULL terminated lists of pointers.
-
- Hardware simulator: This function shall initialize the processor
- registers to a known value. The program counter and possibly stack
- pointer shall be set using information obtained from ABFD (or
- hardware reset defaults). ARGV and ENV, dependant on the target
- ABI, may be written to memory.
-
- Process simulator: After a call to this function, a new process
- instance shall exist. The TEXT, DATA, BSS and stack regions shall
- all be initialized, ARGV and ENV shall be written to process
- address space (according to the applicable ABI) and the program
- counter and stack pointer set accordingly. */
-
-SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct _bfd *abfd, char **argv, char **env));
-
-
-/* Fetch LENGTH bytes of the simulated program's memory. Start fetch
- at virtual address MEM and store in BUF. Result is number of bytes
- read, or zero if error. */
-
-int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Store LENGTH bytes from BUF into the simulated program's
- memory. Store bytes starting at virtual address MEM. Result is
- number of bytes write, or zero if error. */
-
-int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Fetch register REGNO storing its raw (target endian) value in the
- LENGTH byte buffer BUF. Return the actual size of the register or
- zero if REGNO is not applicable.
-
- Legacy implementations ignore LENGTH and always return -1.
-
- If LENGTH does not match the size of REGNO no data is transfered
- (the actual register size is still returned). */
-
-int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Store register REGNO from the raw (target endian) value in BUF.
- Return the actual size of the register or zero if REGNO is not
- applicable.
-
- Legacy implementations ignore LENGTH and always return -1.
-
- If LENGTH does not match the size of REGNO no data is transfered
- (the actual register size is still returned). */
-
-int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Print whatever statistics the simulator has collected.
-
- VERBOSE is currently unused and must always be zero. */
-
-void sim_info PARAMS ((SIM_DESC sd, int verbose));
-
-
-/* Run (or resume) the simulated program.
-
- STEP, when non-zero indicates that only a single simulator cycle
- should be emulated.
-
- SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
- event (hardware interrupt, signal) to be delivered to the simulated
- program.
-
- Hardware simulator: If the SIGRC value returned by
- sim_stop_reason() is passed back to the simulator via SIGGNAL then
- the hardware simulator shall correctly deliver the hardware event
- indicated by that signal. If a value of zero is passed in then the
- simulation will continue as if there were no outstanding signal.
- The effect of any other SIGGNAL value is is implementation
- dependant.
-
- Process simulator: If SIGRC is non-zero then the corresponding
- signal is delivered to the simulated program and execution is then
- continued. A zero SIGRC value indicates that the program should
- continue as normal. */
-
-void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
-
-
-/* Asynchronous request to stop the simulation.
- A nonzero return indicates that the simulator is able to handle
- the request */
-
-int sim_stop PARAMS ((SIM_DESC sd));
-
-
-/* Fetch the REASON why the program stopped.
-
- SIM_EXITED: The program has terminated. SIGRC indicates the target
- dependant exit status.
-
- SIM_STOPPED: The program has stopped. SIGRC uses the host's signal
- numbering as a way of identifying the reaon: program interrupted by
- user via a sim_stop request (SIGINT); a breakpoint instruction
- (SIGTRAP); a completed single step (SIGTRAP); an internal error
- condition (SIGABRT); an illegal instruction (SIGILL); Access to an
- undefined memory region (SIGSEGV); Mis-aligned memory access
- (SIGBUS). For some signals information in addition to the signal
- number may be retained by the simulator (e.g. offending address),
- that information is not directly accessable via this interface.
-
- SIM_SIGNALLED: The program has been terminated by a signal. The
- simulator has encountered target code that causes the the program
- to exit with signal SIGRC.
-
- SIM_RUNNING, SIM_POLLING: The return of one of these values
- indicates a problem internal to the simulator. */
-
-enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
-
-void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc));
-
-
-/* Passthru for other commands that the simulator might support.
- Simulators should be prepared to deal with any combination of NULL
- or empty CMD. */
-
-void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
-
-/* Call these functions to set and clear breakpoints at ADDR. */
-
-SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
-
-/* These functions are used to enable and disable breakpoints. */
-
-SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
-SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
-\f
-
-/* Provide simulator with a default (global) host_callback_struct.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-/* Set the size of the simulator memory array.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_size PARAMS ((int i));
-
-
-/* Single-step simulator with tracing enabled.
- THIS PROCEDURE IS DEPRECIATED.
- THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
- GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
-
-int sim_trace PARAMS ((SIM_DESC sd));
-
-
-/* Enable tracing.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
-/* Configure the size of the profile buffer.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_set_profile_size PARAMS ((int n));
-
-
-/* Kill the running program.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure will be replaced as part of the introduction of
- multi-cpu simulators. */
-
-void sim_kill PARAMS ((SIM_DESC sd));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined (REMOTE_SIM_H) */
+2002-06-17 Douglas Rupp <rupp@gnat.com>
+
+ * lbasename.c: Add 2002 to copyright.
+ (IS_DIR_SEPARATOR): Remove VMS junk.
+
+2002-06-05 Geoffrey Keating <geoffk@redhat.com>
+
+ * hashtab.c (htab_create): New stub function for backward
+ compatibility.
+ (htab_try_create): Likewise.
+
+2002-06-03 Geoffrey Keating <geoffk@redhat.com>
+
+ * hashtab.c (htab_create): Delete.
+ (htab_try_create): Delete.
+ (htab_create_alloc): New.
+ (htab_delete): Support user-specified memory allocation.
+ (htab_expand): Likewise.
+
+2002-05-22 Roman Lechtchinsky <rl@cs.tu-berlin.de>
+
+ * configure.in: Fix typo in the code checking for sys_errlist.
+ * configure: Regenerated.
+
2002-05-13 Andreas Schwab <schwab@suse.de>
* config.table: Use mh-x86pic also for x86-64.
2002-03-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
- * cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
+ * cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
if it is NULL.
2002-03-27 DJ Delorie <dj@redhat.com>
* xmalloc.c (xmalloc_fail): Clarify error message.
-2002-02-21 Jim Blandy <jimb@redhat.com>
+2002-02-22 Jim Blandy <jimb@redhat.com>
* splay-tree.c (splay_tree_xmalloc_allocate,
splay_tree_xmalloc_deallocate): New functions.
#include "confdefs.h"
int *p;
int main() {
-extern int $v []; p = &$v;
+extern int $v []; p = $v;
; return 0; }
EOF
if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
for v in $vars; do
AC_MSG_CHECKING([for $v])
AC_CACHE_VAL(libiberty_cv_var_$v,
- [AC_TRY_LINK([int *p;], [extern int $v []; p = &$v;],
+ [AC_TRY_LINK([int *p;], [extern int $v []; p = $v;],
[eval "libiberty_cv_var_$v=yes"],
[eval "libiberty_cv_var_$v=no"])])
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
/* This function creates table with length slightly longer than given
source length. Created hash table is initiated as empty (all the
hash table entries are EMPTY_ENTRY). The function returns the
- created hash table. Memory allocation must not fail. */
+ created hash table, or NULL if memory allocation fails. */
htab_t
-htab_create (size, hash_f, eq_f, del_f)
+htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
size_t size;
htab_hash hash_f;
htab_eq eq_f;
htab_del del_f;
+ htab_alloc alloc_f;
+ htab_free free_f;
{
htab_t result;
size = higher_prime_number (size);
- result = (htab_t) xcalloc (1, sizeof (struct htab));
- result->entries = (PTR *) xcalloc (size, sizeof (PTR));
+ result = (htab_t) (*alloc_f) (1, sizeof (struct htab));
+ if (result == NULL)
+ return NULL;
+ result->entries = (PTR *) (*alloc_f) (size, sizeof (PTR));
+ if (result->entries == NULL)
+ {
+ if (free_f != NULL)
+ (*free_f) (result);
+ return NULL;
+ }
result->size = size;
result->hash_f = hash_f;
result->eq_f = eq_f;
result->del_f = del_f;
- result->return_allocation_failure = 0;
+ result->alloc_f = alloc_f;
+ result->free_f = free_f;
return result;
}
-/* This function creates table with length slightly longer than given
- source length. The created hash table is initiated as empty (all the
- hash table entries are EMPTY_ENTRY). The function returns the created
- hash table. Memory allocation may fail; it may return NULL. */
+/* These functions exist solely for backward compatibility. */
+#undef htab_create
htab_t
-htab_try_create (size, hash_f, eq_f, del_f)
+htab_create (size, hash_f, eq_f, del_f)
size_t size;
htab_hash hash_f;
htab_eq eq_f;
htab_del del_f;
{
- htab_t result;
-
- size = higher_prime_number (size);
- result = (htab_t) calloc (1, sizeof (struct htab));
- if (result == NULL)
- return NULL;
-
- result->entries = (PTR *) calloc (size, sizeof (PTR));
- if (result->entries == NULL)
- {
- free (result);
- return NULL;
- }
+ return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
+}
- result->size = size;
- result->hash_f = hash_f;
- result->eq_f = eq_f;
- result->del_f = del_f;
- result->return_allocation_failure = 1;
- return result;
+htab_t
+htab_try_create (size, hash_f, eq_f, del_f)
+ size_t size;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+{
+ return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
}
/* This function frees all memory allocated for given hash table.
&& htab->entries[i] != DELETED_ENTRY)
(*htab->del_f) (htab->entries[i]);
- free (htab->entries);
- free (htab);
+ if (htab->free_f != NULL)
+ {
+ (*htab->free_f) (htab->entries);
+ (*htab->free_f) (htab);
+ }
}
/* This function clears all entries in the given hash table. */
PTR *oentries;
PTR *olimit;
PTR *p;
+ PTR *nentries;
oentries = htab->entries;
olimit = oentries + htab->size;
htab->size = higher_prime_number (htab->size * 2);
- if (htab->return_allocation_failure)
- {
- PTR *nentries = (PTR *) calloc (htab->size, sizeof (PTR *));
- if (nentries == NULL)
- return 0;
- htab->entries = nentries;
- }
- else
- htab->entries = (PTR *) xcalloc (htab->size, sizeof (PTR *));
+ nentries = (PTR *) (*htab->alloc_f) (htab->size, sizeof (PTR *));
+ if (nentries == NULL)
+ return 0;
+ htab->entries = nentries;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
}
while (p < olimit);
- free (oentries);
+ if (htab->free_f != NULL)
+ (*htab->free_f) (oentries);
return 1;
}
/* Libiberty basename. Like basename, but is not overridden by the
system C library.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
# endif
#endif
-/* Define IS_DIR_SEPARATOR. VMS uses '::', ':', '[...]' and '<...>' to
- separate the different components of a file specification. It's a
- bit of a stretch to call ':', ']' and '>' directory separators, so
- just define the test to find the file name component. */
-#ifdef VMS
-# define IS_DIR_SEPARATOR(ch) ((ch) == ':' || (ch) == ']' || (ch) == '>')
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
#else
-# ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-# else
-# define IS_DIR_SEPARATOR(ch) \
+# define IS_DIR_SEPARATOR(ch) \
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-# endif
#endif
const char *
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ * po/POTFILES.in: Add frv-*.[ch].
+ * disassemble.c (ARCH_frv): New macro.
+ (disassembler): Handle bfd_arch_frv.
+ * configure.in: Support frv_bfd_arch.
+ * Makefile.am (HFILES): Add frv-*.h.
+ (CFILES): Add frv-*.c
+ (ALL_MACHINES): Add frv-*.lo.
+ (CLEANFILES): Add stamp-frv.
+ (FRV_DEPS): New variable.
+ (stamp-frv): New target.
+ (frv-asm.lo): New target.
+ (frv-desc.lo): New target.
+ (frv-dis.lo): New target.
+ (frv-ibld.lo): New target.
+ (frv-opc.lo): New target.
+ (frv-*.[ch]): New files.
+
+2002-06-18 Ben Elliston <bje@redhat.com>
+
+ * Makefile.am (CGENDEPS): Remove unnecessary stamp-cgen.
+ * Makefile.in: Regenerate.
+
+2002-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * a29k-dis.c: Replace CONST with const.
+ * h8300-dis.c: Likewise.
+ * m68k-dis.c: Likewise.
+ * or32-dis.c: Likewise.
+ * sparc-dis.c: Likewise.
+
+2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in: Add "sh5*-*" to list of targets which include
+ sh64 support.
+ * configure: Regenerate.
+
+2002-05-31 Chris G. Demetriou <cgd@broadcom.com>
+
+ * mips-opc.c: Clean up a few whitespace issues, and sort a
+ few entries understanding that 'x' follows 'w' in the alphabet.
+
+2002-05-31 Chris G. Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * mips-opc.c: Add support for SB-1 MDMX subset and extensions.
+
+2002-05-31 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * mips-dis.c (print_insn_arg): Add support for 'O', 'Q', 'X', 'Y',
+ and 'Z' formats, for MDMX.
+ (mips_isa_type): Add MDMX instructions to the ISA
+ bit mask for bfd_mach_mipsisa64.
+ * mips-opc.c: Add support for MDMX instructions.
+ (MX): New definition.
+
+ * mips-dis.c: Update copyright years to include 2002.
+
+2002-05-30 Diego Novillo <dnovillo@redhat.com>
+
+ * d10v-opc.c (d10v_opcodes): `btsti' does not modify its
+ arguments.
+
2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
* configure.in: Add DLX configuraton support.
2002-02-20 Tom Rix <trix@redhat.com>
- * ppc-opc.c (powerpc_operands): Add WS feild. Use for tlbre, tlbwe.
+ * ppc-opc.c (powerpc_operands): Add WS field. Use for tlbre, tlbwe.
2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
HFILES = \
arm-opc.h \
fr30-desc.h fr30-opc.h \
+ frv-desc.h frv-opc.h \
h8500-opc.h \
ia64-asmtab.h \
ia64-opc.h \
fr30-dis.c \
fr30-ibld.c \
fr30-opc.c \
+ frv-asm.c \
+ frv-desc.c \
+ frv-dis.c \
+ frv-ibld.c \
+ frv-opc.c \
h8300-dis.c \
h8500-dis.c \
hppa-dis.c \
fr30-dis.lo \
fr30-ibld.lo \
fr30-opc.lo \
+ frv-asm.lo \
+ frv-desc.lo \
+ frv-dis.lo \
+ frv-ibld.lo \
+ frv-opc.lo \
h8300-dis.lo \
h8500-dis.lo \
hppa-dis.lo \
rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h
CLEANFILES = \
- stamp-m32r stamp-fr30 stamp-openrisc \
+ stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
-CGENDEPS = ../cgen/stamp-cgen \
+CGENDEPS = \
$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
if CGEN_MAINT
M32R_DEPS = stamp-m32r
FR30_DEPS = stamp-fr30
+FRV_DEPS = stamp-frv
OPENRISC_DEPS = stamp-openrisc
XSTORMY16_DEPS = stamp-xstormy16
else
M32R_DEPS =
FR30_DEPS =
+FRV_DEPS =
OPENRISC_DEPS =
XSTORMY16_DEPS =
endif
stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(MAKE) run-cgen arch=fr30 prefix=fr30 options= 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=
+
$(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
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/dlx.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.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
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
+frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h opintl.h
HFILES = \
arm-opc.h \
fr30-desc.h fr30-opc.h \
+ frv-desc.h frv-opc.h \
h8500-opc.h \
ia64-asmtab.h \
ia64-opc.h \
fr30-dis.c \
fr30-ibld.c \
fr30-opc.c \
+ frv-asm.c \
+ frv-desc.c \
+ frv-dis.c \
+ frv-ibld.c \
+ frv-opc.c \
h8300-dis.c \
h8500-dis.c \
hppa-dis.c \
fr30-dis.lo \
fr30-ibld.lo \
fr30-opc.lo \
+ frv-asm.lo \
+ frv-desc.lo \
+ frv-dis.lo \
+ frv-ibld.lo \
+ frv-opc.lo \
h8300-dis.lo \
h8500-dis.lo \
hppa-dis.lo \
POTFILES = $(HFILES) $(CFILES)
CLEANFILES = \
- stamp-m32r stamp-fr30 stamp-openrisc \
+ stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
-CGENDEPS = ../cgen/stamp-cgen \
+CGENDEPS = \
$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
@CGEN_MAINT_FALSE@M32R_DEPS =
@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
@CGEN_MAINT_FALSE@FR30_DEPS =
+@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv
+@CGEN_MAINT_FALSE@FRV_DEPS =
@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
@CGEN_MAINT_FALSE@OPENRISC_DEPS =
@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(MAKE) run-cgen arch=fr30 prefix=fr30 options= 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=
+
$(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
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/dlx.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.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
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
+frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h opintl.h
/* Instruction printing code for the AMD 29000
- Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001
+ Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
- struct a29k_opcode CONST * opcode;
+ struct a29k_opcode const * opcode;
{
int status =
fi
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+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
#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>
-#endif
-
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
}
EOF
-if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3503: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3544: checking for $ac_hdr" >&5
+echo "configure:3531: 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 3549 "configure"
+#line 3536 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3541: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3584: checking for $ac_func" >&5
+echo "configure:3571: 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 3589 "configure"
+#line 3576 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3599: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3641: checking for $ac_func" >&5
+echo "configure:3628: 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 3646 "configure"
+#line 3633 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3656: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3703: checking for LC_MESSAGES" >&5
+echo "configure:3690: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3708 "configure"
+#line 3695 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3736: checking whether NLS is requested" >&5
+echo "configure:3723: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3756: checking whether included gettext is requested" >&5
+echo "configure:3743: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3775: checking for libintl.h" >&5
+echo "configure:3762: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3780 "configure"
+#line 3767 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3772: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3802: checking for gettext in libc" >&5
+echo "configure:3789: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3807 "configure"
+#line 3794 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3830: checking for bindtextdomain in -lintl" >&5
+echo "configure:3817: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3838 "configure"
+#line 3825 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3836: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3865: checking for gettext in libintl" >&5
+echo "configure:3852: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3870 "configure"
+#line 3857 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3905: checking for $ac_word" >&5
+echo "configure:3892: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3939: checking for $ac_func" >&5
+echo "configure:3926: 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 3944 "configure"
+#line 3931 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3954: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3994: checking for $ac_word" >&5
+echo "configure:3981: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4030: checking for $ac_word" >&5
+echo "configure:4017: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 4062 "configure"
+#line 4049 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4102: checking for $ac_word" >&5
+echo "configure:4089: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4136: checking for $ac_word" >&5
+echo "configure:4123: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4172: checking for $ac_word" >&5
+echo "configure:4159: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4262: checking for catalogs to be installed" >&5
+echo "configure:4249: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4290: checking for linux/version.h" >&5
+echo "configure:4277: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4295 "configure"
+#line 4282 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4287: \"$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*
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4378: checking for build system executable suffix" >&5
+echo "configure:4365: 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
# 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:4415: checking for a BSD compatible install" >&5
+echo "configure:4402: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4472: checking for $ac_hdr" >&5
+echo "configure:4459: 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 4477 "configure"
+#line 4464 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4469: \"$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*
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
for t in $target $canon_targets; do
case $t in
- all | sh64-* | sh-*-*elf* | shl-*-*elf* | shle-*-*elf* | \
+ all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
sh-*-linux* | shl-*-linux*)
ta="$ta sh64-dis.lo sh64-opc.lo"
archdefs="$archdefs -DINCLUDE_SHMEDIA"
bfd_we32k_arch) ;;
bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
+ bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
"") ;;
*) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
for t in $target $canon_targets; do
case $t in
- all | sh64-* | sh-*-*elf* | shl-*-*elf* | shle-*-*elf* | \
+ all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
sh-*-linux* | shl-*-linux*)
ta="$ta sh64-dis.lo sh64-opc.lo"
archdefs="$archdefs -DINCLUDE_SHMEDIA"
bfd_we32k_arch) ;;
bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
+ bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
"") ;;
*) AC_MSG_ERROR(*** unknown target architecture $arch) ;;
/* d10v-opc.c -- D10V opcode list
- Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Martin Hunt, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
{ "brf0t.s", SHORT_B, 3, MU, BRANCH|PAR|RF0, 0x4b00, 0x7f00, { ANUM8 } },
{ "brf0t.l", LONG_B, 3, MU, SEQ, 0x25800000, 0x3fff0000, { ANUM16 } },
{ "bseti", SHORT_2, 1, IU, PAR, 0x801, 0x7e01, { RDST, UNUM4 } },
- { "btsti", SHORT_2, 1, IU, PAR|WF0, 0xe01, 0x7e01, { RDST, UNUM4 } },
+ { "btsti", SHORT_2, 1, IU, PAR|WF0, 0xe01, 0x7e01, { RSRC2, UNUM4 } },
{ "clrac", SHORT_2, 1, IU, PAR, 0x5601, 0x7eff, { ADST } },
{ "cmp", SHORT_2, 1, EITHER, PAR|WF0, 0x600, 0x7e01, { RSRC2, RSRC } },
{ "cmp", SHORT_2, 1, IU, PAR|WF0, 0x1603, 0x7eef, { ASRC2, ASRC } },
#define ARCH_w65
#define ARCH_xstormy16
#define ARCH_z8k
+#define ARCH_frv
#define INCLUDE_SHMEDIA
#endif
case bfd_arch_vax:
disassemble = print_insn_vax;
break;
+#endif
+#ifdef ARCH_frv
+ case bfd_arch_frv:
+ disassemble = print_insn_frv;
+ break;
#endif
default:
return 0;
/* Disassemble h8300 instructions.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002
+ 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
int mode;
{
/* Find the first entry in the table for this opcode. */
- static CONST char *regnames[] =
+ static const char *regnames[] =
{
"r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
"r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
};
- static CONST char *wregnames[] =
+ static const char *wregnames[] =
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
};
- static CONST char *lregnames[] =
+ static const char *lregnames[] =
{
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
int plen = 0;
static boolean init = 0;
struct h8_opcode *q;
- char CONST **pregnames = mode != 0 ? lregnames : wregnames;
+ char const **pregnames = mode != 0 ? lregnames : wregnames;
int status;
int l;
unsigned char data[20];
print_insn_arg PARAMS ((const char *, unsigned char *, unsigned char *,
bfd_vma, disassemble_info *));
-CONST char * CONST fpcr_names[] = {
+const char * const fpcr_names[] = {
"", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
"%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
};
register int place = d[1];
register unsigned char *p = p0;
int regno;
- register CONST char *regname;
+ register const char *regname;
register unsigned char *p1;
double flval;
int flt_p;
(l >> OP_SH_SEL) & OP_MASK_SEL);
break;
+ case 'O':
+ (*info->fprintf_func) (info->stream, "%d",
+ (l >> OP_SH_ALN) & OP_MASK_ALN);
+ break;
+
+ case 'Q':
+ {
+ unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
+ if ((vsel & 0x10) == 0)
+ {
+ int fmt;
+ vsel &= 0x0f;
+ for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
+ if ((vsel & 1) == 0)
+ break;
+ (*info->fprintf_func) (info->stream, "$v%d[%d]",
+ (l >> OP_SH_FT) & OP_MASK_FT,
+ vsel >> 1);
+ }
+ else if ((vsel & 0x08) == 0)
+ {
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ }
+ else
+ {
+ (*info->fprintf_func) (info->stream, "0x%x",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ }
+ }
+ break;
+
+ case 'X':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FD) & OP_MASK_FD);
+ break;
+
+ case 'Y':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FS) & OP_MASK_FS);
+ break;
+
+ case 'Z':
+ (*info->fprintf_func) (info->stream, "$v%d",
+ (l >> OP_SH_FT) & OP_MASK_FT);
+ break;
+
default:
/* xgettext:c-format */
(*info->fprintf_func) (info->stream,
case bfd_mach_mipsisa32:
*cputype = CPU_MIPS32;
/* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
- Note that MIPS-3D is not applicable to MIPS32. (See _MIPS32
- Architecture For Programmers Volume I: Introduction to the
+ Note that MIPS-3D and MDMX are not applicable to MIPS32. (See
+ _MIPS32 Architecture For Programmers Volume I: Introduction to the
MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
page 1. */
*isa = ISA_MIPS32;
case bfd_mach_mipsisa64:
*cputype = CPU_MIPS64;
/* For stock MIPS64, disassemble all applicable MIPS-specified ASEs. */
- *isa = ISA_MIPS64 | INSN_MIPS3D;
+ *isa = ISA_MIPS64 | INSN_MDMX | INSN_MIPS3D;
break;
default:
Contributed by Ralph Campbell and OSF
Commented and modified by Ian Lance Taylor, Cygnus Support
Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
- MIPS-3D support added by Broadcom Corporation (SiByte).
+ MIPS-3D and MDMX support added by Broadcom Corporation (SiByte).
This file is part of GDB, GAS, and the GNU binutils.
#define IS_M INSN_MULT
+#define WR_MACC INSN_WRITE_MDMX_ACC
+#define RD_MACC INSN_READ_MDMX_ACC
+
#define I1 INSN_ISA1
#define I2 INSN_ISA2
#define I3 INSN_ISA3
/* MIPS64 MIPS-3D ASE support. */
#define M3D INSN_MIPS3D
+/* MIPS64 MDMX ASE support. */
+#define MX INSN_MDMX
+
#define P3 INSN_4650
#define L1 INSN_4010
#define V1 INSN_4100
{"add", "t,r,I", 0, (int) M_ADD_I, INSN_MACRO, I1 },
{"add.s", "D,V,T", 0x46000000, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
{"add.d", "D,V,T", 0x46200000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
+{"add.ob", "X,Y,Q", 0x7800000b, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
{"add.ps", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"add.qh", "X,Y,Q", 0x7820000b, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"adda.ob", "Y,Q", 0x78000037, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"adda.qh", "Y,Q", 0x78200037, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"addi", "t,r,j", 0x20000000, 0xfc000000, WR_t|RD_s, I1 },
{"addiu", "t,r,j", 0x24000000, 0xfc000000, WR_t|RD_s, I1 },
+{"addl.ob", "Y,Q", 0x78000437, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"addl.qh", "Y,Q", 0x78200437, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"addr.ps", "D,S,T", 0x46c00018, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, M3D },
{"addu", "d,v,t", 0x00000021, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"addu", "t,r,I", 0, (int) M_ADDU_I, INSN_MACRO, I1 },
+{"alni.ob", "X,Y,Z,O", 0x78000018, 0xff00003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"alni.qh", "X,Y,Z,O", 0x7800001a, 0xff00003f, WR_D|RD_S|RD_T|FP_D, MX },
{"alnv.ps", "D,V,T,s", 0x4c00001e, 0xfc00003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"alnv.ob", "X,Y,Z,s", 0x78000019, 0xfc00003f, WR_D|RD_S|RD_T|RD_s|FP_D, MX|SB1 },
+{"alnv.qh", "X,Y,Z,s", 0x7800001b, 0xfc00003f, WR_D|RD_S|RD_T|RD_s|FP_D, MX },
{"and", "d,v,t", 0x00000024, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"and", "t,r,I", 0, (int) M_AND_I, INSN_MACRO, I1 },
+{"and.ob", "X,Y,Q", 0x7800000c, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"and.qh", "X,Y,Q", 0x7820000c, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"andi", "t,r,i", 0x30000000, 0xfc000000, WR_t|RD_s, I1 },
/* b is at the top of the table. */
/* bal is at the top of the table. */
{"c.eq.d", "M,S,T", 0x46200032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.eq.s", "S,T", 0x46000032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"c.eq.s", "M,S,T", 0x46000032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
+{"c.eq.ob", "Y,Q", 0x78000001, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX|SB1 },
{"c.eq.ps", "S,T", 0x46c00032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.eq.ps", "M,S,T", 0x46c00032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
+{"c.eq.qh", "Y,Q", 0x78200001, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX },
{"c.ueq.d", "S,T", 0x46200033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
{"c.ueq.d", "M,S,T", 0x46200033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.ueq.s", "S,T", 0x46000033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"c.lt.d", "M,S,T", 0x4620003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.lt.s", "S,T", 0x4600003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"c.lt.s", "M,S,T", 0x4600003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
+{"c.lt.ob", "Y,Q", 0x78000004, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX|SB1 },
{"c.lt.ps", "S,T", 0x46c0003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.lt.ps", "M,S,T", 0x46c0003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
+{"c.lt.qh", "Y,Q", 0x78200004, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX },
{"c.nge.d", "S,T", 0x4620003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
{"c.nge.d", "M,S,T", 0x4620003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.nge.s", "S,T", 0x4600003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"c.le.d", "M,S,T", 0x4620003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.le.s", "S,T", 0x4600003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"c.le.s", "M,S,T", 0x4600003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, I4|I32 },
+{"c.le.ob", "Y,Q", 0x78000005, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX|SB1 },
{"c.le.ps", "S,T", 0x46c0003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I5 },
{"c.le.ps", "M,S,T", 0x46c0003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I5 },
+{"c.le.qh", "Y,Q", 0x78200005, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, MX },
{"c.ngt.d", "S,T", 0x4620003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, I1 },
{"c.ngt.d", "M,S,T", 0x4620003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, I4|I32 },
{"c.ngt.s", "S,T", 0x4600003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, I1 },
{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, G1 },
{"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
{"madd16", "s,t", 0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO, V1 },
+{"max.ob", "X,Y,Q", 0x78000007, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"max.qh", "X,Y,Q", 0x78200007, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"mfpc", "t,P", 0x4000c801, 0xffe0ffc1, LCD|WR_t|RD_C0, M1 },
{"mfps", "t,P", 0x4000c800, 0xffe0ffc1, LCD|WR_t|RD_C0, M1 },
{"mfc0", "t,G", 0x40000000, 0xffe007ff, LCD|WR_t|RD_C0, I1 },
{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, I32 },
{"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, I1 },
{"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, I1 },
+{"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"min.qh", "X,Y,Q", 0x78200006, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"mov.d", "D,S", 0x46200006, 0xffff003f, WR_D|RD_S|FP_D, I1 },
{"mov.s", "D,S", 0x46000006, 0xffff003f, WR_D|RD_S|FP_S, I1 },
{"mov.ps", "D,S", 0x46c00006, 0xffff003f, WR_D|RD_S|FP_D, I5 },
{"movf", "d,s,N", 0x00000001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_D|FP_S, I4|I32},
{"movf.d", "D,S,N", 0x46200011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|I32 },
+{"movf.l", "D,S,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, MX|SB1 },
+{"movf.l", "X,Y,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, MX|SB1 },
{"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|I32 },
{"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I5 },
{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, I4|I32 },
{"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, L1 },
{"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 },
+{"movn.l", "D,S,t", 0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, MX|SB1 },
+{"movn.l", "X,Y,t", 0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, MX|SB1 },
{"movn.s", "D,S,t", 0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 },
{"movn.ps", "D,S,t", 0x46c00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I5 },
{"movt", "d,s,N", 0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC, I4|I32 },
{"movt.d", "D,S,N", 0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I4|I32 },
+{"movt.l", "D,S,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, MX|SB1 },
+{"movt.l", "X,Y,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, MX|SB1 },
{"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, I4|I32 },
{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, I5 },
{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, I4|I32 },
{"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, L1 },
{"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I4|I32 },
+{"movz.l", "D,S,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, MX|SB1 },
+{"movz.l", "X,Y,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, MX|SB1 },
{"movz.s", "D,S,t", 0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, I4|I32 },
{"movz.ps", "D,S,t", 0x46c00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, I5 },
/* move is at the top of the table. */
+{"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4 },
{"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4 },
{"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5 },
{"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, I1 },
{"mul.d", "D,V,T", 0x46200002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
{"mul.s", "D,V,T", 0x46000002, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
+{"mul.ob", "X,Y,Q", 0x78000030, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
{"mul.ps", "D,V,T", 0x46c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"mul.qh", "X,Y,Q", 0x78200030, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"mul", "d,v,t", 0x70000002, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, I32|P3 },
{"mul", "d,v,t", 0, (int) M_MUL, INSN_MACRO, I1 },
{"mul", "d,v,I", 0, (int) M_MUL_I, INSN_MACRO, I1 },
+{"mula.ob", "Y,Q", 0x78000033, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"mula.qh", "Y,Q", 0x78200033, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
+{"mull.ob", "Y,Q", 0x78000433, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"mull.qh", "Y,Q", 0x78200433, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"mulo", "d,v,t", 0, (int) M_MULO, INSN_MACRO, I1 },
{"mulo", "d,v,I", 0, (int) M_MULO_I, INSN_MACRO, I1 },
{"mulou", "d,v,t", 0, (int) M_MULOU, INSN_MACRO, I1 },
{"mulou", "d,v,I", 0, (int) M_MULOU_I, INSN_MACRO, I1 },
{"mulr.ps", "D,S,T", 0x46c0001a, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, M3D },
+{"muls.ob", "Y,Q", 0x78000032, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"muls.qh", "Y,Q", 0x78200032, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
+{"mulsl.ob", "Y,Q", 0x78000432, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"mulsl.qh", "Y,Q", 0x78200432, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"mult", "s,t", 0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1 },
{"mult", "d,s,t", 0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1 },
{"multu", "s,t", 0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1 },
/* nop is at the start of the table. */
{"nor", "d,v,t", 0x00000027, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"nor", "t,r,I", 0, (int) M_NOR_I, INSN_MACRO, I1 },
+{"nor.ob", "X,Y,Q", 0x7800000f, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"nor.qh", "X,Y,Q", 0x7820000f, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"not", "d,v", 0x00000027, 0xfc1f07ff, WR_d|RD_s|RD_t, I1 },/*nor d,s,0*/
{"or", "d,v,t", 0x00000025, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"or", "t,r,I", 0, (int) M_OR_I, INSN_MACRO, I1 },
+{"or.ob", "X,Y,Q", 0x7800000e, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"or.qh", "X,Y,Q", 0x7820000e, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"ori", "t,r,i", 0x34000000, 0xfc000000, WR_t|RD_s, I1 },
-
+{"pabsdiff.ob", "X,Y,Q",0x78000009, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, SB1 },
+{"pabsdiffc.ob", "Y,Q", 0x78000035, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, SB1 },
+{"pavg.ob", "X,Y,Q", 0x78000008, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, SB1 },
+{"pickf.ob", "X,Y,Q", 0x78000002, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"pickf.qh", "X,Y,Q", 0x78200002, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"pickt.ob", "X,Y,Q", 0x78000003, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"pickt.qh", "X,Y,Q", 0x78200003, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"pll.ps", "D,V,T", 0x46c0002c, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
{"plu.ps", "D,V,T", 0x46c0002d, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
-
/* pref and prefx are at the start of the table. */
-
{"pul.ps", "D,V,T", 0x46c0002e, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
{"puu.ps", "D,V,T", 0x46c0002f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
-
+{"rach.ob", "X", 0x7a00003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX|SB1 },
+{"rach.qh", "X", 0x7a20003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX },
+{"racl.ob", "X", 0x7800003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX|SB1 },
+{"racl.qh", "X", 0x7820003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX },
+{"racm.ob", "X", 0x7900003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX|SB1 },
+{"racm.qh", "X", 0x7920003f, 0xfffff83f, WR_D|RD_MACC|FP_D, MX },
{"recip.d", "D,S", 0x46200015, 0xffff003f, WR_D|RD_S|FP_D, I4 },
{"recip.ps","D,S", 0x46c00015, 0xffff003f, WR_D|RD_S|FP_D, SB1 },
{"recip.s", "D,S", 0x46000015, 0xffff003f, WR_D|RD_S|FP_S, I4 },
{"remu", "d,v,t", 0, (int) M_REMU_3, INSN_MACRO, I1 },
{"remu", "d,v,I", 0, (int) M_REMU_3I, INSN_MACRO, I1 },
{"rfe", "", 0x42000010, 0xffffffff, 0, I1|T3 },
+{"rnas.qh", "X,Q", 0x78200025, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
+{"rnau.ob", "X,Q", 0x78000021, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX|SB1 },
+{"rnau.qh", "X,Q", 0x78200021, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
+{"rnes.qh", "X,Q", 0x78200026, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
+{"rneu.ob", "X,Q", 0x78000022, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX|SB1 },
+{"rneu.qh", "X,Q", 0x78200022, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
{"rol", "d,v,t", 0, (int) M_ROL, INSN_MACRO, I1 },
{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, I1 },
{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, I1 },
{"rsqrt2.d", "D,S,T", 0x4620001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, M3D },
{"rsqrt2.ps", "D,S,T", 0x46c0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, M3D },
{"rsqrt2.s", "D,S,T", 0x4600001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, M3D },
+{"rzs.qh", "X,Q", 0x78200024, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
+{"rzu.ob", "X,Q", 0x78000020, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX|SB1 },
+{"rzu.qh", "X,Q", 0x78200020, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX },
{"sb", "t,o(b)", 0xa0000000, 0xfc000000, SM|RD_t|RD_b, I1 },
{"sb", "t,A(b)", 0, (int) M_SB_AB, INSN_MACRO, I1 },
{"sc", "t,o(b)", 0xe0000000, 0xfc000000, SM|RD_t|WR_t|RD_b, I2 },
{"sgtu", "d,v,I", 0, (int) M_SGTU_I, INSN_MACRO, I1 },
{"sh", "t,o(b)", 0xa4000000, 0xfc000000, SM|RD_t|RD_b, I1 },
{"sh", "t,A(b)", 0, (int) M_SH_AB, INSN_MACRO, I1 },
+{"shfl.bfla.qh", "X,Y,Z", 0x7a20001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.mixh.ob", "X,Y,Z", 0x7980001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"shfl.mixh.qh", "X,Y,Z", 0x7820001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.mixl.ob", "X,Y,Z", 0x79c0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"shfl.mixl.qh", "X,Y,Z", 0x78a0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.pach.ob", "X,Y,Z", 0x7900001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"shfl.pach.qh", "X,Y,Z", 0x7920001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.repa.qh", "X,Y,Z", 0x7b20001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.repb.qh", "X,Y,Z", 0x7ba0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"shfl.upsl.ob", "X,Y,Z", 0x78c0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
{"sle", "d,v,t", 0, (int) M_SLE, INSN_MACRO, I1 },
{"sle", "d,v,I", 0, (int) M_SLE_I, INSN_MACRO, I1 },
{"sleu", "d,v,t", 0, (int) M_SLEU, INSN_MACRO, I1 },
{"sllv", "d,t,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
{"sll", "d,w,s", 0x00000004, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* sllv */
{"sll", "d,w,<", 0x00000000, 0xffe0003f, WR_d|RD_t, I1 },
+{"sll.ob", "X,Y,Q", 0x78000010, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"sll.qh", "X,Y,Q", 0x78200010, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"slt", "d,v,t", 0x0000002a, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"slt", "d,v,I", 0, (int) M_SLT_I, INSN_MACRO, I1 },
{"slti", "t,r,j", 0x28000000, 0xfc000000, WR_t|RD_s, I1 },
{"srav", "d,t,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
{"sra", "d,w,s", 0x00000007, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srav */
{"sra", "d,w,<", 0x00000003, 0xffe0003f, WR_d|RD_t, I1 },
+{"sra.qh", "X,Y,Q", 0x78200013, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
{"srlv", "d,t,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 },
{"srl", "d,w,s", 0x00000006, 0xfc0007ff, WR_d|RD_t|RD_s, I1 }, /* srlv */
{"srl", "d,w,<", 0x00000002, 0xffe0003f, WR_d|RD_t, I1 },
+{"srl.ob", "X,Y,Q", 0x78000012, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"srl.qh", "X,Y,Q", 0x78200012, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
/* ssnop is at the start of the table. */
{"standby", "", 0x42000021, 0xffffffff, 0, V1 },
{"sub", "d,v,t", 0x00000022, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"sub", "d,v,I", 0, (int) M_SUB_I, INSN_MACRO, I1 },
{"sub.d", "D,V,T", 0x46200001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I1 },
{"sub.s", "D,V,T", 0x46000001, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, I1 },
+{"sub.ob", "X,Y,Q", 0x7800000a, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
{"sub.ps", "D,V,T", 0x46c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, I5 },
+{"sub.qh", "X,Y,Q", 0x7820000a, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"suba.ob", "Y,Q", 0x78000036, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"suba.qh", "Y,Q", 0x78200036, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
+{"subl.ob", "Y,Q", 0x78000436, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"subl.qh", "Y,Q", 0x78200436, 0xfc2007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"subu", "d,v,t", 0x00000023, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
{"subu", "d,v,I", 0, (int) M_SUBU_I, INSN_MACRO, I1 },
{"suspend", "", 0x42000022, 0xffffffff, 0, V1 },
{"ush", "t,A(b)", 0, (int) M_USH_A, INSN_MACRO, I1 },
{"usw", "t,o(b)", 0, (int) M_USW, INSN_MACRO, I1 },
{"usw", "t,A(b)", 0, (int) M_USW_A, INSN_MACRO, I1 },
-{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
-{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, I1 },
-{"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, I1 },
+{"wach.ob", "Y", 0x7a00003e, 0xffff07ff, WR_MACC|RD_S|FP_D, MX|SB1 },
+{"wach.qh", "Y", 0x7a20003e, 0xffff07ff, WR_MACC|RD_S|FP_D, MX },
+{"wacl.ob", "Y,Z", 0x7800003e, 0xffe007ff, WR_MACC|RD_S|RD_T|FP_D, MX|SB1 },
+{"wacl.qh", "Y,Z", 0x7820003e, 0xffe007ff, WR_MACC|RD_S|RD_T|FP_D, MX },
{"wait", "", 0x42000020, 0xffffffff, TRAP, I3|I32 },
{"wait", "J", 0x42000020, 0xfe00003f, TRAP, I32 },
{"waiti", "", 0x42000020, 0xffffffff, TRAP, L1 },
{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, L1 },
+{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, I1 },
+{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, I1 },
+{"xor.ob", "X,Y,Q", 0x7800000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX|SB1 },
+{"xor.qh", "X,Y,Q", 0x7820000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, MX },
+{"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, I1 },
+
/* No hazard protection on coprocessor instructions--they shouldn't
change the state of the processor and if they do it's up to the
user to put in nops as necessary. These are at the end so that the
/* The four bytes of the instruction. */
unsigned long insn;
find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
- struct or32_opcode CONST * opcode;
+ struct or32_opcode const * opcode;
{
int status =
d30v-opc.c
dis-buf.c
disassemble.c
+dlx-dis.c
fr30-asm.c
fr30-desc.c
fr30-desc.h
fr30-ibld.c
fr30-opc.c
fr30-opc.h
+frv-asm.c
+frv-desc.c
+frv-desc.h
+frv-dis.c
+frv-ibld.c
+frv-opc.c
+frv-opc.h
h8300-dis.c
h8500-dis.c
h8500-opc.h
/* Print SPARC instructions.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000 Free Software Foundation, Inc.
+ 2000, 2002 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
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
{
- CONST struct sparc_opcode *opcode = op->opcode;
+ const struct sparc_opcode *opcode = op->opcode;
if ((opcode->match & insn) == opcode->match
&& (opcode->lose & insn) == 0)
return (opcode->flags & F_DELAYED);
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
{
- CONST struct sparc_opcode *opcode = op->opcode;
+ const struct sparc_opcode *opcode = op->opcode;
/* If the insn isn't supported by the current architecture, skip it. */
if (! (opcode->architecture & current_arch_mask))
(*info->fprintf_func) (stream, opcode->name);
{
- register CONST char *s;
+ register const char *s;
if (opcode->args[0] != ',')
(*info->fprintf_func) (stream, " ");
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (autoconf-changelog autoheader-changelog): Let name,
+ id, date and host to be overriden by NAME, ID, DATE and HOST
+ respectfully. Use ISO dates.
+
+Thu Jun 6 12:34:13 2002 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (ChangeLog): New makefile variable.
+ * README-HACKING: Mention the ChangeLog makefile variable.
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * tic80/: Delete directory.
+
2002-05-16 Stephane Carrez <stcarrez@nerim.fr>
* MAINTAINERS: Update my email address.
# @target_makefile_frag@
###
+# Name of the ChangeLog file.
+ChangeLog = ChangeLog
+
+
RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
fi`
done
autoconf-changelog autoheader-changelog:
- id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
- name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
- host="`hostname`" ; \
- date="`date | sed 's/ [^ ]* \([0-9]*\)$$/ \1/'`" ; \
+ id=$(ID) ; \
+ test x$$id = x && id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
+ name=$(NAME) ; \
+ test x$$name = x && name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
+ host=$(HOST) ; \
+ test x$$host = x && host="`hostname`" ; \
+ date=$(DATE) ; \
+ test x$$date = x && date="`date +%Y-%m-%d`" ; \
echo "$$date $$name $$id@$$host" ; \
for d in * ; \
do \
if [ -d $$d -a -f $$d/configure.in ] ; \
then \
- echo "Creating new-ChangeLog in $$d ..." ; \
+ echo "Creating new-$(ChangeLog) in $$d ..." ; \
( echo "$$date $$name <$$id@$$host>" ; \
echo "" ; \
echo " * configure: Regenerated to track ../common/aclocal.m4 changes." ; \
echo " * config.in: Ditto." ; \
fi ; \
echo "" ; \
- cat $$d/ChangeLog \
- ) > $$d/new-ChangeLog ; \
+ cat $$d/$(ChangeLog) \
+ ) > $$d/new-$(ChangeLog) ; \
fi ; \
done
do \
if [ -d $$d -a -f $$d/configure.in ] ; \
then \
- echo "Moving $$d/new-ChangeLog to $$d/ChangeLog ..." ; \
- mv $$d/new-ChangeLog $$d/ChangeLog ; \
+ echo "Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
+ mv $$d/new-$(ChangeLog) $$d/$(ChangeLog) ; \
fi ; \
done
$ make -f Makefile.in SHELL=/bin/sh autoheader-changelog
$ more */new-ChangeLog
$ make -f Makefile.in SHELL=/bin/sh autoheader-install
+
+To add the entries to an alternative ChangeLog file, use:
+
+ $ make ChangeLog=MyChangeLog ....
+
\f
tconfig.in
==========
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-12 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in: Update copyright.
+ (wrapper.o): Specify dependencies.
+ * wrapper.c: Include "gdb/sim-arm.h".
+ (sim_store_register, sim_fetch_register): Rewrite using `enum
+ arm_sim_regs' and a switch.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * wrapper.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * armos.c: Include "gdb/callback.h".
+
+2002-05-29 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * armcopro.c (XScale_check_memacc): Set the FSR and FAR registers
+ if a Data Abort is detected.
+
2002-05-27 Nick Clifton <nickc@cambridge.redhat.com>
* armvirt.c (GetWord): Only perform access checks if 'check'
# Makefile template for Configure for the arm sim library.
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
# Written by Cygnus Support.
#
# This program is free software; you can redistribute it and/or modify
thumbemu.o: thumbemu.c armdefs.h armemu.h
bag.o: bag.c bag.h
+
+wrapper.o: armdefs.h armemu.h dbg_rdi.h \
+ $(srcdir)/../common/run-sim.h \
+ $(srcdir)/../common/sim-utils.h \
+ $(srcdir)/../../include/gdb/sim-arm.h \
+ $(srcdir)/../../include/gdb/remote-sim.h
/* Check alignment fault enable/disable. */
if ((read_cp15_reg (1, 0, 0) & ARMul_CP15_R1_ALIGN) && (* address & 3))
- ARMul_Abort (state, ARMul_DataAbortV);
+ {
+ /* Set the FSR and FAR.
+ Do not use XScale_set_fsr_far as this checks the DCSR register. */
+ write_cp15_reg (state, 5, 0, 0, ARMul_CP15_R5_MMU_EXCPT);
+ write_cp15_reg (state, 6, 0, 0, * address);
+
+ ARMul_Abort (state, ARMul_DataAbortV);
+ }
if (XScale_debug_moe (state, -1))
return;
/* For RDIError_BreakpointReached. */
#include "dbg_rdi.h"
-#include "callback.h"
+#include "gdb/callback.h"
extern host_callback *sim_callback;
extern unsigned ARMul_OSInit (ARMul_State *);
COPRO=armcopro.o
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
#include <string.h>
#include <bfd.h>
#include <signal.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "armdefs.h"
#include "armemu.h"
#include "dbg_rdi.h"
#include "ansidecl.h"
#include "sim-utils.h"
#include "run-sim.h"
+#include "gdb/sim-arm.h"
host_callback *sim_callback;
{
init ();
- if (rn == 25)
+ switch ((enum sim_arm_regs) rn)
{
+ case SIM_ARM_R0_REGNUM:
+ case SIM_ARM_R1_REGNUM:
+ case SIM_ARM_R2_REGNUM:
+ case SIM_ARM_R3_REGNUM:
+ case SIM_ARM_R4_REGNUM:
+ case SIM_ARM_R5_REGNUM:
+ case SIM_ARM_R6_REGNUM:
+ case SIM_ARM_R7_REGNUM:
+ case SIM_ARM_R8_REGNUM:
+ case SIM_ARM_R9_REGNUM:
+ case SIM_ARM_R10_REGNUM:
+ case SIM_ARM_R11_REGNUM:
+ case SIM_ARM_R12_REGNUM:
+ case SIM_ARM_R13_REGNUM:
+ case SIM_ARM_R14_REGNUM:
+ case SIM_ARM_R15_REGNUM: /* PC */
+ case SIM_ARM_FP0_REGNUM:
+ case SIM_ARM_FP1_REGNUM:
+ case SIM_ARM_FP2_REGNUM:
+ case SIM_ARM_FP3_REGNUM:
+ case SIM_ARM_FP4_REGNUM:
+ case SIM_ARM_FP5_REGNUM:
+ case SIM_ARM_FP6_REGNUM:
+ case SIM_ARM_FP7_REGNUM:
+ case SIM_ARM_FPS_REGNUM:
+ ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
+ break;
+
+ case SIM_ARM_PS_REGNUM:
state->Cpsr = frommem (state, memory);
ARMul_CPSRAltered (state);
+ break;
+
+ default:
+ return 0;
}
- else
- ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
+
return -1;
}
init ();
- if (rn < 16)
- regval = ARMul_GetReg (state, state->Mode, rn);
- else if (rn == 25)
- /* FIXME: use PS_REGNUM from gdb/config/arm/tm-arm.h. */
- regval = ARMul_GetCPSR (state);
- else
- /* FIXME: should report an error. */
- regval = 0;
+ switch ((enum sim_arm_regs) rn)
+ {
+ case SIM_ARM_R0_REGNUM:
+ case SIM_ARM_R1_REGNUM:
+ case SIM_ARM_R2_REGNUM:
+ case SIM_ARM_R3_REGNUM:
+ case SIM_ARM_R4_REGNUM:
+ case SIM_ARM_R5_REGNUM:
+ case SIM_ARM_R6_REGNUM:
+ case SIM_ARM_R7_REGNUM:
+ case SIM_ARM_R8_REGNUM:
+ case SIM_ARM_R9_REGNUM:
+ case SIM_ARM_R10_REGNUM:
+ case SIM_ARM_R11_REGNUM:
+ case SIM_ARM_R12_REGNUM:
+ case SIM_ARM_R13_REGNUM:
+ case SIM_ARM_R14_REGNUM:
+ case SIM_ARM_R15_REGNUM: /* PC */
+ regval = ARMul_GetReg (state, state->Mode, rn);
+ break;
+
+ case SIM_ARM_FP0_REGNUM:
+ case SIM_ARM_FP1_REGNUM:
+ case SIM_ARM_FP2_REGNUM:
+ case SIM_ARM_FP3_REGNUM:
+ case SIM_ARM_FP4_REGNUM:
+ case SIM_ARM_FP5_REGNUM:
+ case SIM_ARM_FP6_REGNUM:
+ case SIM_ARM_FP7_REGNUM:
+ case SIM_ARM_FPS_REGNUM:
+ memset (memory, 0, length);
+ return 0;
+
+ case SIM_ARM_PS_REGNUM:
+ regval = ARMul_GetCPSR (state);
+ break;
+
+ default:
+ return 0;
+ }
while (length)
{
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * hw-events.c (hw_event_queue_schedule): Initialize `dummy'.
+
+ * sim-memopt.c: Include <unistd.h>.
+ (do_memopt_add): Fix printf format.
+ * sim-events.c (sim_events_schedule): Initialize ``dummy''.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Update to match GDB's
+ --enable-gdb-build-warnings.
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * sim-fpu.c (unpack_fpu): Initialize exponent for
+ sim_fpu_class_zero.
+ (i2fpu): Same.
+ (sim_fpu_sqrt): Same.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gentmap.c (gen_targ_map_c): Generate "gdb/callback.h".
+ * sim-basics.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * run.c: Ditto.
+ * sim-load.c: Ditto.
+ * callback.c: Ditto.
+ * syscall.c: Ditto.
+ * Make-common.in (callback_h): Define.
+ (remote_sim_h): Define.
+ (run.o): Update.
+ (callback.o): Update.
+ (syscall.o): Update.
+ (sim-load.o):
+ (nrun.o): Update.
+ (sim-hload.o): Update.
+ (sim-io.o): Update.
+ (sim-reason.o): Update.
+ (sim-reg.o): Update.
+ (sim-resume.o): Update.
+
+2002-05-30 Kazu Hirata <kazu@cs.umass.edu>
+
+ * run.c: Fix formatting.
+
2002-05-20 Nick Clifton <nickc@cambridge.redhat.com>
* run-sim.h: New header. Provide prototypes for functions used
RUNTESTFLAGS =
+callback_h = $(srcroot)/include/gdb/callback.h
+remote_sim_h = $(srcroot)/include/gdb/remote-sim.h
+
all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
libsim.a: $(LIB_OBJS)
$(CC) $(ALL_CFLAGS) -o run$(EXEEXT) \
$(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
-run.o: $(srccom)/run.c config.h tconfig.h \
- $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h
+run.o: $(srccom)/run.c config.h tconfig.h $(remote_sim_h) $(callback_h)
$(CC) -c $(srccom)/run.c $(ALL_CFLAGS)
# FIXME: Ideally, callback.o and friends live in a library outside of
# devo/libremote because this directory would contain more than just
# a library).
-callback.o: $(srccom)/callback.c config.h tconfig.h \
- $(srcroot)/include/callback.h targ-vals.h
+callback.o: $(srccom)/callback.c config.h tconfig.h $(callback_h) targ-vals.h
$(CC) -c $(srccom)/callback.c $(ALL_CFLAGS)
-syscall.o: $(srccom)/syscall.c config.h tconfig.h \
- $(srcroot)/include/callback.h targ-vals.h
+syscall.o: $(srccom)/syscall.c config.h tconfig.h $(callback_h) targ-vals.h
$(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS)
targ-map.o: targ-map.c targ-vals.h
$(SIM_EXTRA_DEPS)
$(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
-sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) \
- $(srcroot)/include/remote-sim.h \
+sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) $(remote_sim_h) \
$(SIM_EXTRA_DEPS)
$(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
-sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) \
- $(srcroot)/include/remote-sim.h \
+sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) $(remote_sim_h) \
$(SIM_EXTRA_DEPS)
$(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
sim-hw.o: $(srccom)/sim-hw.c $(sim_main_headers)
$(CC) -c $(srccom)/sim-hw.c $(ALL_CFLAGS)
-sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) \
- $(srcroot)/include/remote-sim.h \
+sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) $(remote_sim_h) \
$(SIM_EXTRA_DEPS)
$(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS)
cat $(srccom)/$@ >> tmp-$@
$(SHELL) $(srcdir)/../../move-if-change tmp-$@ $@
-sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) \
- $(srcroot)/include/remote-sim.h targ-vals.h
+sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) $(remote_sim_h) \
+ targ-vals.h
$(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
$(sim-options_h) $(sim-io_h)
$(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
-sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) \
- $(srcroot)/include/remote-sim.h
+sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) $(remote_sim_h)
$(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
-sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) \
- $(srcroot)/include/remote-sim.h
+sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) $(remote_sim_h)
$(CC) -c $(srccom)/sim-reg.c $(ALL_CFLAGS)
-sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) \
- $(srcroot)/include/remote-sim.h
+sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) $(remote_sim_h)
$(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
-sim-load.o: $(srccom)/sim-load.c $(srcroot)/include/callback.h
+sim-load.o: $(srccom)/sim-load.c $(callback_h)
$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
$(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS)
-nrun.o: $(srccom)/nrun.c config.h tconfig.h \
- $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h \
+nrun.o: $(srccom)/nrun.c config.h tconfig.h $(remote_sim_h) $(callback_h) \
$(sim_main_headers)
$(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
$(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
$(arch) "$(FLAGS)" ignored "$(isa)" $(mach) ignored ignored
-
+
cgen-cpu: force
$(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
dnl it enables extra GCC specific warnings.
AC_DEFUN(SIM_AC_OPTION_WARNINGS,
[
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
AC_ARG_ENABLE(build-warnings,
-[ --enable-build-warnings[=LIST] Enable build-time compiler warnings],
-[build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi])dnl
+AC_ARG_ENABLE(sim-build-warnings,
+[ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi])dnl
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi],[build_warnings=""])dnl
+ AC_MSG_CHECKING(compiler warning flags)
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS})
+fi
])
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
#include "targ-vals.h"
#ifdef HAVE_UNISTD_H
printf ("#include <errno.h>\n");
printf ("#include <fcntl.h>\n");
printf ("#include \"ansidecl.h\"\n");
- printf ("#include \"callback.h\"\n");
+ printf ("#include \"gdb/callback.h\"\n");
printf ("#include \"targ-vals.h\"\n");
printf ("\n");
{
struct hw_event *event;
va_list dummy;
+ memset (&dummy, 0, sizeof dummy);
event = hw_event_queue_schedule_vtracef (me, delta_time, callback, data,
NULL, dummy);
return event;
#include "libiberty.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "ansidecl.h"
#include "run-sim.h"
extern int getopt ();
#ifdef NEED_UI_LOOP_HOOK
-/* Gdb foolery. This is only needed for gdb using a gui. */
+/* Gdb foolery. This is only needed for gdb using a gui. */
int (*ui_loop_hook) PARAMS ((int signo));
#endif
/* FIXME: This is currently being migrated into sim_open.
Simulators that use functions such as sim_size() still require
- this. */
+ this. */
default_callback.init (&default_callback);
sim_set_callbacks (&default_callback);
do all argv processing. */
#ifdef SIM_H8300 /* FIXME: quick hack */
- while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
+ while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
#else
- while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
+ while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
#endif
switch (i)
{
#ifdef SIM_HAVE_ENVIRONMENT
case 'o':
/* Operating enironment where any signals are delivered to the
- target. */
+ target. */
operating_p = 1;
break;
#endif SIM_HAVE_ENVIRONMENT
/* FIXME: Quick hack, to be replaced by more general facility. */
#ifdef SIM_H8300
case 'h':
- set_h8300h (1,0);
+ set_h8300h (1, 0);
break;
case 'S':
- set_h8300h (1,1);
- break;
+ set_h8300h (1, 1);
+ break;
#endif
default:
usage ();
}
abfd = bfd_openr (name, 0);
- if (!abfd)
+ if (!abfd)
{
- fprintf (stderr, "%s: can't open %s: %s\n",
+ fprintf (stderr, "%s: can't open %s: %s\n",
myname, name, bfd_errmsg (bfd_get_error ()));
exit (1);
}
#endif
/* Ensure that any run-time initialisation that needs to be
- performed by the simulator can occur. */
+ performed by the simulator can occur. */
sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, abfd, sim_argv);
if (sd == 0)
exit (1);
#ifdef SIM_HAVE_ENVIRONMENT
/* NOTE: An old simulator supporting the operating environment MUST
provide sim_set_trace() and not sim_trace(). That way
- sim_stop_reason() can be used to determine any stop reason. */
+ sim_stop_reason() can be used to determine any stop reason. */
if (trace)
sim_set_trace ();
sigrc = 0;
case sim_signalled:
case sim_stopped:
if (sigrc != 0)
- fprintf (stderr, "program stopped with signal %d.\n", sigrc);
+ fprintf (stderr, "program stopped with signal %d.\n", sigrc);
break;
case sim_exited:
break;
case sim_running:
- case sim_polling: /* these indicate a serious problem */
+ case sim_polling: /* These indicate a serious problem. */
abort ();
break;
#endif
#include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "sim-config.h"
void *data)
{
va_list dummy;
+ memset (&dummy, 0, sizeof dummy);
return sim_events_schedule_vtracef (sd, delta_time, handler, data,
NULL, dummy);
}
/* tastes like zero */
dst->class = sim_fpu_class_zero;
dst->sign = sign;
+ dst->normal_exp = 0;
}
else
{
{
f->class = sim_fpu_class_zero;
f->sign = 0;
+ f->normal_exp = 0;
}
else
{
{
f->class = sim_fpu_class_zero;
f->sign = 0;
+ f->normal_exp = 0;
}
else
{
{
f->class = sim_fpu_class_zero;
f->sign = r->sign;
+ f->normal_exp = 0;
return 0;
}
if (sim_fpu_is_infinity (r))
#include "bfd.h"
#include "sim-utils.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
static void eprintf PARAMS ((host_callback *, const char *, ...));
static void xprintf PARAMS ((host_callback *, const char *, ...));
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
/* Memory fill byte. */
static unsigned8 fill_byte_value;
{
sim_io_error (sd,
"Error, cannot confirm that mmap file is large enough "
- "(>= %d bytes)\n", bytes);
+ "(>= %ld bytes)\n", bytes);
}
free_buffer = mmap (0, bytes, PROT_READ|PROT_WRITE, MAP_SHARED, mmap_next_fd, 0);
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
#include "targ-vals.h"
#ifndef ENOSYS
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * d10v_sim.h (SET_PSW_BIT): Add cast to avoid inverting an enum.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-13 Tom Rix <trix@redhat.com>
+
+ * interp.c (xfer_mem): Fix transfers across multiple segments.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (INCLUDE): Update path to callback.h.
+ * gencode.c: Do not include "callback.h".
+ * d10v_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * interp.c: Ditto.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_fetch_register): Fix name of enum used in cast.
+ (sim_store_register): Ditto.
+
+2002-06-02 Elena Zannoni <ezannoni@redhat.com>
+
+ From Jason Eckhardt <jle@redhat.com>
+ * d10v_sim.h (INC_ADDR): Correctly handle the case where MOD_E is
+ less than MOD_S (post-decrement).
+
+2002-06-01 Andrew Cagney <ac131313@redhat.com>
+
+ * interp.c (sim_fetch_register, sim_store_register): Use a switch
+ statement and enums from "sim-d10v.h".
+
2002-05-28 Elena Zannoni <ezannoni@redhat.com>
* interp.c (sim_create_inferior): Add comment.
SIM_EXTRA_CLEAN = clean-extra
SIM_EXTRA_CFLAGS = -DNEED_UI_LOOP_HOOK -DSIM_HAVE_ENVIRONMENT
-INCLUDE = d10v_sim.h $(srcroot)/include/callback.h targ-vals.h endian.c \
+INCLUDE = d10v_sim.h $(srcroot)/include/gdb/callback.h targ-vals.h endian.c \
$(srcroot)/include/gdb/sim-d10v.h
# This selects the d10v newlib/libgloss syscall definitions.
ac_help="$ac_help
--enable-sim-profile=opts Enable profiling flags"
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
# Initialize some variables set by options.
# The variables have the same names as the options, with
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:681: checking how to run the C preprocessor" >&5
+echo "configure:683: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 696 "configure"
+#line 698 "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:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:704: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 713 "configure"
+#line 715 "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:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:721: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 730 "configure"
+#line 732 "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:736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:738: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:761: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:763: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:788: checking for POSIXized ISC" >&5
+echo "configure:790: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:809: checking for ANSI C header files" >&5
+echo "configure:811: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 814 "configure"
+#line 816 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:824: \"$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*
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 839 "configure"
+#line 841 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 857 "configure"
+#line 859 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 878 "configure"
+#line 880 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:913: checking for working const" >&5
+echo "configure:915: 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 918 "configure"
+#line 920 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:988: checking for inline" >&5
+echo "configure:990: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 995 "configure"
+#line 997 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1028: checking for off_t" >&5
+echo "configure:1030: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1033 "configure"
+#line 1035 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1061: checking for size_t" >&5
+echo "configure:1063: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1066 "configure"
+#line 1068 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1096: checking for working alloca.h" >&5
+echo "configure:1098: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1101 "configure"
+#line 1103 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1129: checking for alloca" >&5
+echo "configure:1131: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1134 "configure"
+#line 1136 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1194: checking whether alloca needs Cray hooks" >&5
+echo "configure:1196: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
+#line 1201 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1224: checking for $ac_func" >&5
+echo "configure:1226: 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 1229 "configure"
+#line 1231 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1254: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1279: checking stack direction for C alloca" >&5
+echo "configure:1281: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
+#line 1289 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1331: checking for $ac_hdr" >&5
+echo "configure:1333: 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 1336 "configure"
+#line 1338 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1343: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1370: checking for $ac_func" >&5
+echo "configure:1372: 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 1375 "configure"
+#line 1377 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1400: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1423: checking for working mmap" >&5
+echo "configure:1425: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1431 "configure"
+#line 1433 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1573: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1594: checking for Cygwin environment" >&5
+echo "configure:1596: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1599 "configure"
+#line 1601 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1627: checking for mingw32 environment" >&5
+echo "configure:1629: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1632 "configure"
+#line 1634 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1706: checking host system type" >&5
+echo "configure:1708: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1727: checking target system type" >&5
+echo "configure:1729: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1745: checking build system type" >&5
+echo "configure:1747: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1789: checking for $ac_word" >&5
+echo "configure:1791: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1819: checking for $ac_word" >&5
+echo "configure:1821: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1870: checking for $ac_word" >&5
+echo "configure:1872: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1904: 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.
cat > conftest.$ac_ext << EOF
-#line 1913 "configure"
+#line 1915 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1920: \"$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
{ 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:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1949: checking whether we are using GNU C" >&5
+echo "configure:1951: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1977: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1979: 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
# 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:2020: checking for a BSD compatible install" >&5
+echo "configure:2022: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2088: checking for $ac_word" >&5
+echo "configure:2090: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2123: checking for $ac_hdr" >&5
+echo "configure:2125: 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 2128 "configure"
+#line 2130 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2135: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2163: checking for $ac_func" >&5
+echo "configure:2165: 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 2168 "configure"
+#line 2170 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2193: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2220: checking for $ac_func" >&5
+echo "configure:2222: 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 2225 "configure"
+#line 2227 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2250: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2282: checking for LC_MESSAGES" >&5
+echo "configure:2284: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2287 "configure"
+#line 2289 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2315: checking whether NLS is requested" >&5
+echo "configure:2317: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2335: checking whether included gettext is requested" >&5
+echo "configure:2337: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2354: checking for libintl.h" >&5
+echo "configure:2356: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2359 "configure"
+#line 2361 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2366: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2381: checking for gettext in libc" >&5
+echo "configure:2383: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
+#line 2388 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2409: checking for bindtextdomain in -lintl" >&5
+echo "configure:2411: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2417 "configure"
+#line 2419 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2430: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2444: checking for gettext in libintl" >&5
+echo "configure:2446: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2449 "configure"
+#line 2451 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2484: checking for $ac_word" >&5
+echo "configure:2486: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2518: checking for $ac_func" >&5
+echo "configure:2520: 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 2523 "configure"
+#line 2525 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2548: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2573: checking for $ac_word" >&5
+echo "configure:2575: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2609: checking for $ac_word" >&5
+echo "configure:2611: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2641 "configure"
+#line 2643 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2681: checking for $ac_word" >&5
+echo "configure:2683: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2715: checking for $ac_word" >&5
+echo "configure:2717: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2751: checking for $ac_word" >&5
+echo "configure:2753: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2841: checking for catalogs to be installed" >&5
+echo "configure:2843: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2869: checking for linux/version.h" >&5
+echo "configure:2871: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
+#line 2876 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2881: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2948: checking for $ac_hdr" >&5
+echo "configure:2950: 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 2953 "configure"
+#line 2955 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2960: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2988: checking for $ac_hdr" >&5
+echo "configure:2990: 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 2993 "configure"
+#line 2995 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3000: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3028: checking for $ac_hdr" >&5
+echo "configure:3030: 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 3033 "configure"
+#line 3035 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3040: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3068: checking for $ac_hdr" >&5
+echo "configure:3070: 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 3073 "configure"
+#line 3075 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3080: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3107: checking for $ac_func" >&5
+echo "configure:3109: 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 3112 "configure"
+#line 3114 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3137: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3162: checking for bind in -lsocket" >&5
+echo "configure:3164: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3170 "configure"
+#line 3172 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3183: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3209: checking for gethostbyname in -lnsl" >&5
+echo "configure:3211: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3217 "configure"
+#line 3219 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3404: checking return type of signal handlers" >&5
+echo "configure:3406: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3409 "configure"
+#line 3411 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3448: checking for executable suffix" >&5
+echo "configure:3450: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3551: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3561 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3538: checking for $ac_hdr" >&5
+echo "configure:3587: 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 3543 "configure"
+#line 3592 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3597: \"$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*
#include <ctype.h>
#include <limits.h>
#include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
#include "opcode/d10v.h"
#include "bfd.h"
extern int d10v_debug;
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
#include "sim-config.h"
#include "sim-types.h"
#define PSW CREG (PSW_CR)
#define SET_PSW(VAL) SET_CREG (PSW_CR, (VAL))
#define SET_HW_PSW(VAL) SET_HW_CREG (PSW_CR, (VAL))
-#define SET_PSW_BIT(MASK,VAL) move_to_cr (PSW_CR, ~(MASK), (VAL) ? (MASK) : 0, 1)
+#define SET_PSW_BIT(MASK,VAL) move_to_cr (PSW_CR, ~((reg_t) MASK), (VAL) ? (MASK) : 0, 1)
#define PSW_SM ((PSW & PSW_SM_BIT) != 0)
#define SET_PSW_SM(VAL) SET_PSW_BIT (PSW_SM_BIT, (VAL))
{ \
int test_i = i < 0 ? i : ~((i) - 1); \
if (PSW_MD && GPR (x) == (MOD_E & test_i)) \
- SET_GPR (x, MOD_S); \
+ SET_GPR (x, MOD_S & test_i); \
else \
SET_GPR (x, GPR (x) + (i)); \
} \
#include <ctype.h>
#include <limits.h>
#include "ansidecl.h"
-#include "callback.h"
#include "opcode/d10v.h"
static void write_header PARAMS ((void));
#include <signal.h>
#include "sysdep.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "d10v_sim.h"
#include "gdb/sim-d10v.h"
{
int xfered = 0;
- while (xfered < size)
+ while (0 < size)
{
uint8 *memory;
unsigned long phys;
virt += phys_size;
buffer += phys_size;
xfered += phys_size;
+ size -= phys_size;
}
- return size;
+ return xfered;
}
int length;
{
int size;
- if (rn < 0)
- size = 0;
- else if (rn >= SIM_D10V_R0_REGNUM
- && rn < SIM_D10V_R0_REGNUM + SIM_D10V_NR_R_REGS)
+ switch ((enum sim_d10v_regs) rn)
{
+ case SIM_D10V_R0_REGNUM:
+ case SIM_D10V_R1_REGNUM:
+ case SIM_D10V_R2_REGNUM:
+ case SIM_D10V_R3_REGNUM:
+ case SIM_D10V_R4_REGNUM:
+ case SIM_D10V_R5_REGNUM:
+ case SIM_D10V_R6_REGNUM:
+ case SIM_D10V_R7_REGNUM:
+ case SIM_D10V_R8_REGNUM:
+ case SIM_D10V_R9_REGNUM:
+ case SIM_D10V_R10_REGNUM:
+ case SIM_D10V_R11_REGNUM:
+ case SIM_D10V_R12_REGNUM:
+ case SIM_D10V_R13_REGNUM:
+ case SIM_D10V_R14_REGNUM:
+ case SIM_D10V_R15_REGNUM:
WRITE_16 (memory, GPR (rn - SIM_D10V_R0_REGNUM));
size = 2;
- }
- else if (rn >= SIM_D10V_CR0_REGNUM
- && rn < SIM_D10V_CR0_REGNUM + SIM_D10V_NR_CR_REGS)
- {
+ break;
+ case SIM_D10V_CR0_REGNUM:
+ case SIM_D10V_CR1_REGNUM:
+ case SIM_D10V_CR2_REGNUM:
+ case SIM_D10V_CR3_REGNUM:
+ case SIM_D10V_CR4_REGNUM:
+ case SIM_D10V_CR5_REGNUM:
+ case SIM_D10V_CR6_REGNUM:
+ case SIM_D10V_CR7_REGNUM:
+ case SIM_D10V_CR8_REGNUM:
+ case SIM_D10V_CR9_REGNUM:
+ case SIM_D10V_CR10_REGNUM:
+ case SIM_D10V_CR11_REGNUM:
+ case SIM_D10V_CR12_REGNUM:
+ case SIM_D10V_CR13_REGNUM:
+ case SIM_D10V_CR14_REGNUM:
+ case SIM_D10V_CR15_REGNUM:
WRITE_16 (memory, CREG (rn - SIM_D10V_CR0_REGNUM));
size = 2;
- }
- else if (rn >= SIM_D10V_A0_REGNUM
- && rn < SIM_D10V_A0_REGNUM + SIM_D10V_NR_A_REGS)
- {
+ break;
+ case SIM_D10V_A0_REGNUM:
+ case SIM_D10V_A1_REGNUM:
WRITE_64 (memory, ACC (rn - SIM_D10V_A0_REGNUM));
size = 8;
- }
- else if (rn == SIM_D10V_SPI_REGNUM)
- {
+ break;
+ case SIM_D10V_SPI_REGNUM:
/* PSW_SM indicates that the current SP is the USER
stack-pointer. */
WRITE_16 (memory, spi_register ());
size = 2;
- }
- else if (rn == SIM_D10V_SPU_REGNUM)
- {
+ break;
+ case SIM_D10V_SPU_REGNUM:
/* PSW_SM indicates that the current SP is the USER
stack-pointer. */
WRITE_16 (memory, spu_register ());
size = 2;
- }
- else if (rn >= SIM_D10V_IMAP0_REGNUM
- && rn < SIM_D10V_IMAP0_REGNUM + SIM_D10V_NR_IMAP_REGS)
- {
+ break;
+ case SIM_D10V_IMAP0_REGNUM:
+ case SIM_D10V_IMAP1_REGNUM:
WRITE_16 (memory, imap_register (rn - SIM_D10V_IMAP0_REGNUM));
size = 2;
- }
- else if (rn >= SIM_D10V_DMAP0_REGNUM
- && rn < SIM_D10V_DMAP0_REGNUM + SIM_D10V_NR_DMAP_REGS)
- {
+ break;
+ case SIM_D10V_DMAP0_REGNUM:
+ case SIM_D10V_DMAP1_REGNUM:
+ case SIM_D10V_DMAP2_REGNUM:
+ case SIM_D10V_DMAP3_REGNUM:
WRITE_16 (memory, dmap_register (rn - SIM_D10V_DMAP0_REGNUM));
size = 2;
+ break;
+ case SIM_D10V_TS2_DMAP_REGNUM:
+ size = 0;
+ break;
+ default:
+ size = 0;
+ break;
}
- else
- size = 0;
return size;
}
int length;
{
int size;
- if (rn < 0)
- size = 0;
- else if (rn >= SIM_D10V_R0_REGNUM
- && rn < SIM_D10V_R0_REGNUM + SIM_D10V_NR_R_REGS)
+ switch ((enum sim_d10v_regs) rn)
{
+ case SIM_D10V_R0_REGNUM:
+ case SIM_D10V_R1_REGNUM:
+ case SIM_D10V_R2_REGNUM:
+ case SIM_D10V_R3_REGNUM:
+ case SIM_D10V_R4_REGNUM:
+ case SIM_D10V_R5_REGNUM:
+ case SIM_D10V_R6_REGNUM:
+ case SIM_D10V_R7_REGNUM:
+ case SIM_D10V_R8_REGNUM:
+ case SIM_D10V_R9_REGNUM:
+ case SIM_D10V_R10_REGNUM:
+ case SIM_D10V_R11_REGNUM:
+ case SIM_D10V_R12_REGNUM:
+ case SIM_D10V_R13_REGNUM:
+ case SIM_D10V_R14_REGNUM:
+ case SIM_D10V_R15_REGNUM:
SET_GPR (rn - SIM_D10V_R0_REGNUM, READ_16 (memory));
size = 2;
- }
- else if (rn >= SIM_D10V_CR0_REGNUM
- && rn < SIM_D10V_CR0_REGNUM + SIM_D10V_NR_CR_REGS)
- {
+ break;
+ case SIM_D10V_CR0_REGNUM:
+ case SIM_D10V_CR1_REGNUM:
+ case SIM_D10V_CR2_REGNUM:
+ case SIM_D10V_CR3_REGNUM:
+ case SIM_D10V_CR4_REGNUM:
+ case SIM_D10V_CR5_REGNUM:
+ case SIM_D10V_CR6_REGNUM:
+ case SIM_D10V_CR7_REGNUM:
+ case SIM_D10V_CR8_REGNUM:
+ case SIM_D10V_CR9_REGNUM:
+ case SIM_D10V_CR10_REGNUM:
+ case SIM_D10V_CR11_REGNUM:
+ case SIM_D10V_CR12_REGNUM:
+ case SIM_D10V_CR13_REGNUM:
+ case SIM_D10V_CR14_REGNUM:
+ case SIM_D10V_CR15_REGNUM:
SET_CREG (rn - SIM_D10V_CR0_REGNUM, READ_16 (memory));
size = 2;
- }
- else if (rn >= SIM_D10V_A0_REGNUM
- && rn < SIM_D10V_A0_REGNUM + SIM_D10V_NR_A_REGS)
- {
+ break;
+ case SIM_D10V_A0_REGNUM:
+ case SIM_D10V_A1_REGNUM:
SET_ACC (rn - SIM_D10V_A0_REGNUM, READ_64 (memory) & MASK40);
size = 8;
- }
- else if (rn == SIM_D10V_SPI_REGNUM)
- {
+ break;
+ case SIM_D10V_SPI_REGNUM:
/* PSW_SM indicates that the current SP is the USER
stack-pointer. */
set_spi_register (READ_16 (memory));
size = 2;
- }
- else if (rn == SIM_D10V_SPU_REGNUM)
- {
+ break;
+ case SIM_D10V_SPU_REGNUM:
set_spu_register (READ_16 (memory));
size = 2;
- }
- else if (rn >= SIM_D10V_IMAP0_REGNUM
- && rn < SIM_D10V_IMAP0_REGNUM + SIM_D10V_NR_IMAP_REGS)
- {
+ break;
+ case SIM_D10V_IMAP0_REGNUM:
+ case SIM_D10V_IMAP1_REGNUM:
set_imap_register (rn - SIM_D10V_IMAP0_REGNUM, READ_16(memory));
size = 2;
- }
- else if (rn >= SIM_D10V_DMAP0_REGNUM
- && rn < SIM_D10V_DMAP0_REGNUM + SIM_D10V_NR_DMAP_REGS)
- {
+ break;
+ case SIM_D10V_DMAP0_REGNUM:
+ case SIM_D10V_DMAP1_REGNUM:
+ case SIM_D10V_DMAP2_REGNUM:
+ case SIM_D10V_DMAP3_REGNUM:
set_dmap_register (rn - SIM_D10V_DMAP0_REGNUM, READ_16(memory));
size = 2;
+ break;
+ case SIM_D10V_TS2_DMAP_REGNUM:
+ size = 0;
+ break;
+ default:
+ size = 0;
+ break;
}
- else
- size = 0;
SLOT_FLUSH ();
return size;
}
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2000-07-05 Nick Clifton <nickc@cygnus.com>
* d30v-insns: Change minimum loop size limit to 0x10.
ac_help="$ac_help
--enable-sim-hostendian=end Specify host byte endian orientation."
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
--enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
ac_help="$ac_help
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:693: checking how to run the C preprocessor" >&5
+echo "configure:695: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 708 "configure"
+#line 710 "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:714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:716: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 725 "configure"
+#line 727 "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:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:733: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
+#line 744 "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:748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:750: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:800: checking for POSIXized ISC" >&5
+echo "configure:802: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:821: checking for ANSI C header files" >&5
+echo "configure:823: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 826 "configure"
+#line 828 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:836: \"$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*
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 851 "configure"
+#line 853 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 869 "configure"
+#line 871 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 890 "configure"
+#line 892 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:925: checking for working const" >&5
+echo "configure:927: 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 930 "configure"
+#line 932 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1000: checking for inline" >&5
+echo "configure:1002: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1007 "configure"
+#line 1009 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1040: checking for off_t" >&5
+echo "configure:1042: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1045 "configure"
+#line 1047 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1073: checking for size_t" >&5
+echo "configure:1075: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1078 "configure"
+#line 1080 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1108: checking for working alloca.h" >&5
+echo "configure:1110: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1113 "configure"
+#line 1115 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1141: checking for alloca" >&5
+echo "configure:1143: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1146 "configure"
+#line 1148 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1206: checking whether alloca needs Cray hooks" >&5
+echo "configure:1208: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1211 "configure"
+#line 1213 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1236: checking for $ac_func" >&5
+echo "configure:1238: 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 1241 "configure"
+#line 1243 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1266: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1291: checking stack direction for C alloca" >&5
+echo "configure:1293: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
+#line 1301 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1343: checking for $ac_hdr" >&5
+echo "configure:1345: 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 1348 "configure"
+#line 1350 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1355: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1382: checking for $ac_func" >&5
+echo "configure:1384: 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 1387 "configure"
+#line 1389 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1412: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1435: checking for working mmap" >&5
+echo "configure:1437: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
+#line 1445 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1585: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1606: checking for Cygwin environment" >&5
+echo "configure:1608: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1611 "configure"
+#line 1613 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1639: checking for mingw32 environment" >&5
+echo "configure:1641: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1644 "configure"
+#line 1646 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1718: checking host system type" >&5
+echo "configure:1720: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1739: checking target system type" >&5
+echo "configure:1741: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1757: checking build system type" >&5
+echo "configure:1759: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1801: checking for $ac_word" >&5
+echo "configure:1803: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1831: checking for $ac_word" >&5
+echo "configure:1833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1882: checking for $ac_word" >&5
+echo "configure:1884: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1916: 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.
cat > conftest.$ac_ext << EOF
-#line 1925 "configure"
+#line 1927 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1932: \"$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
{ 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:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1961: checking whether we are using GNU C" >&5
+echo "configure:1963: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1989: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1991: 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
# 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:2032: checking for a BSD compatible install" >&5
+echo "configure:2034: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2100: checking for $ac_word" >&5
+echo "configure:2102: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2135: checking for $ac_hdr" >&5
+echo "configure:2137: 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 2140 "configure"
+#line 2142 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2147: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: checking for $ac_func" >&5
+echo "configure:2177: 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 2180 "configure"
+#line 2182 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2205: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2232: checking for $ac_func" >&5
+echo "configure:2234: 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 2237 "configure"
+#line 2239 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2262: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2294: checking for LC_MESSAGES" >&5
+echo "configure:2296: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2299 "configure"
+#line 2301 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2327: checking whether NLS is requested" >&5
+echo "configure:2329: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2347: checking whether included gettext is requested" >&5
+echo "configure:2349: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2366: checking for libintl.h" >&5
+echo "configure:2368: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2371 "configure"
+#line 2373 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2378: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2393: checking for gettext in libc" >&5
+echo "configure:2395: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2398 "configure"
+#line 2400 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2421: checking for bindtextdomain in -lintl" >&5
+echo "configure:2423: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
+#line 2431 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2442: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2456: checking for gettext in libintl" >&5
+echo "configure:2458: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2461 "configure"
+#line 2463 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2496: checking for $ac_word" >&5
+echo "configure:2498: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2530: checking for $ac_func" >&5
+echo "configure:2532: 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 2535 "configure"
+#line 2537 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2560: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2585: checking for $ac_word" >&5
+echo "configure:2587: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_word" >&5
+echo "configure:2623: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
+#line 2655 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2693: checking for $ac_word" >&5
+echo "configure:2695: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2727: checking for $ac_word" >&5
+echo "configure:2729: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2763: checking for $ac_word" >&5
+echo "configure:2765: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2853: checking for catalogs to be installed" >&5
+echo "configure:2855: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2881: checking for linux/version.h" >&5
+echo "configure:2883: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
+#line 2888 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2893: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2960: checking for $ac_hdr" >&5
+echo "configure:2962: 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 2965 "configure"
+#line 2967 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2972: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3000: checking for $ac_hdr" >&5
+echo "configure:3002: 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 3005 "configure"
+#line 3007 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3012: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3040: checking for $ac_hdr" >&5
+echo "configure:3042: 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 3045 "configure"
+#line 3047 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3052: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3080: checking for $ac_hdr" >&5
+echo "configure:3082: 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 3085 "configure"
+#line 3087 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3092: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3119: checking for $ac_func" >&5
+echo "configure:3121: 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 3124 "configure"
+#line 3126 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3149: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3174: checking for bind in -lsocket" >&5
+echo "configure:3176: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
+#line 3184 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3195: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3221: checking for gethostbyname in -lnsl" >&5
+echo "configure:3223: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3229 "configure"
+#line 3231 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3416: checking return type of signal handlers" >&5
+echo "configure:3418: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3421 "configure"
+#line 3423 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3460: checking for executable suffix" >&5
+echo "configure:3462: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3516: checking for $ac_word" >&5
+echo "configure:3518: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3708: checking whether byte ordering is bigendian" >&5
+echo "configure:3710: 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
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3715 "configure"
+#line 3717 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3730 "configure"
+#line 3732 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3761 "configure"
+#line 3763 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3859: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3869 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3884: checking for $ac_hdr" >&5
+echo "configure:3933: 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 3889 "configure"
+#line 3938 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3943: \"$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*
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * sis.h: Include "gdb/remote-sim.h" and "gdb/callback.h".
+ * interf.c: Include "gdb/remote-sim.h".
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
#include <dis-asm.h>
#include "sim-config.h"
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
#ifndef fprintf
extern fprintf();
*/
#include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "end.h"
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2001-11-14 Dave Brolley <brolley@redhat.com>
* arch.c: Regenerate.
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
2002-05-19 Kazu Hirata <kazu@cs.umass.edu>
* compile.c: Fix formatting.
#endif
#include "ansidecl.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#ifndef SIGTRAP
# define SIGTRAP 5
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
#include <setjmp.h>
#include "ansidecl.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#define O_RECOMPILE 85
#define DEFINE_TABLE
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2001-07-05 Ben Elliston <bje@redhat.com>
* Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * gen.c (gen_entry_expand_opcode): Initialize ``value'' to -1 and
+ ``t'' to NULL.
+ * igen.c (main): Add default case to switch.
+ * gen-icache.c (print_icache_extraction): Ditto.
+
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (BUILD_CFLAGS): Remove -O0.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-03 Richard Henderson <rth@redhat.com>
+
+ * gen-engine.c (print_run_body): Avoid multi-line strings.
+ * lf.c (lf_print__gnu_copyleft): Likewise.
+
2002-05-01 Chris Demetriou <cgd@broadcom.com>
* igen.c: Use 'deprecated' rather than 'depreciated.'
$(CFLAGS_FOR_BUILD) \
$(IGEN_WARN_CFLAGS) \
$(IGEN_WERROR_CFLAGS) \
- $(INCLUDES) -O0
+ $(INCLUDES)
BUILD_LDFLAGS =
all: igen
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# 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:693: checking for a BSD compatible install" >&5
+echo "configure:695: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:748: checking for $ac_word" >&5
+echo "configure:750: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:778: checking for $ac_word" >&5
+echo "configure:780: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:829: checking for $ac_word" >&5
+echo "configure:831: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:861: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:863: 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.
cat > conftest.$ac_ext << EOF
-#line 872 "configure"
+#line 874 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:879: \"$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
{ 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:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:908: checking whether we are using GNU C" >&5
+echo "configure:910: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:936: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:938: 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
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:1020: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 1030 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1068: checking host system type" >&5
+echo "configure:1117: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1089: checking target system type" >&5
+echo "configure:1138: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1107: checking build system type" >&5
+echo "configure:1156: checking build system type" >&5
build_alias=$build
case "$build_alias" in
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1154: checking how to run the C preprocessor" >&5
+echo "configure:1203: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1169 "configure"
+#line 1218 "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:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1224: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1186 "configure"
+#line 1235 "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:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1241: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+#line 1252 "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:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1258: \"$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
:
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1237: checking for $ac_hdr" >&5
+echo "configure:1286: 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 1242 "configure"
+#line 1291 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1296: \"$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*
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:1278: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1327: 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 1283 "configure"
+#line 1332 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# 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:1316: checking for opendir in -ldir" >&5
+echo "configure:1365: 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
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1324 "configure"
+#line 1373 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1384: \"$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
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1357: checking for opendir in -lx" >&5
+echo "configure:1406: 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
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
+#line 1414 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1425: \"$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
# 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:1411: checking for $ac_word" >&5
+echo "configure:1460: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if (!options.gen.smp)
{
- lf_putstr (file, "
-/* CASE 1: NO SMP (with or with out instruction cache).
-
-In this case, we can take advantage of the fact that the current
-instruction address (CIA) does not need to be read from / written to
-the CPU object after the execution of an instruction.
-
-Instead, CIA is only saved when the main loop exits. This occures
-when either sim_engine_halt or sim_engine_restart is called. Both of
-these functions save the current instruction address before halting /
-restarting the simulator.
-
-As a variation, there may also be support for an instruction cracking
-cache. */
-
+ lf_putstr (file, "\
+/* CASE 1: NO SMP (with or with out instruction cache).\n\
+\n\
+In this case, we can take advantage of the fact that the current\n\
+instruction address (CIA) does not need to be read from / written to\n\
+the CPU object after the execution of an instruction.\n\
+\n\
+Instead, CIA is only saved when the main loop exits. This occures\n\
+when either sim_engine_halt or sim_engine_restart is called. Both of\n\
+these functions save the current instruction address before halting /\n\
+restarting the simulator.\n\
+\n\
+As a variation, there may also be support for an instruction cracking\n\
+cache. */\n\
+\n\
");
lf_putstr (file, "\n");
if (options.gen.smp)
{
- lf_putstr (file, "
-/* CASE 2: SMP (With or without ICACHE)
-
-The complexity here comes from needing to correctly halt the simulator
-when it is aborted. For instance, if cpu0 requests a restart then
-cpu1 will normally be the next cpu that is run. Cpu0 being restarted
-after all the other CPU's and the event queue have been processed */
-
+ lf_putstr (file, "\
+/* CASE 2: SMP (With or without ICACHE)\n\
+\n\
+The complexity here comes from needing to correctly halt the simulator\n\
+when it is aborted. For instance, if cpu0 requests a restart then\n\
+cpu1 will normally be the next cpu that is run. Cpu0 being restarted\n\
+after all the other CPU's and the event queue have been processed */\n\
+\n\
");
lf_putstr (file, "\n");
else
return;
break;
+ default:
+ abort (); /* Bad switch. */
}
/* For the type, default to a simple unsigned */
}
case insn_field_cond_field:
{
- int value;
+ int value = -1;
opcode_bits *bit;
- gen_entry *t;
+ gen_entry *t = NULL;
/* Try to find a value for the
conditional by looking back through
the previously defined bits for one
case 'S':
name = &names->suffix;
break;
+ default:
+ abort (); /* Bad switch. */
}
name->u = strdup (chp);
name->l = strdup (chp);
case lf_is_c:
case lf_is_h:
nr += lf_printf(file, "\
-/* This file is part of the program psim.
-
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
-
- 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.
-
- --
-
- This file was generated by the program %s */
+/* This file is part of the program psim.\n\
+\n\
+ Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>\n\
+\n\
+ This program is free software; you can redistribute it and/or modify\n\
+ it under the terms of the GNU General Public License as published by\n\
+ the Free Software Foundation; either version 2 of the License, or\n\
+ (at your option) any later version.\n\
+\n\
+ This program is distributed in the hope that it will be useful,\n\
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
+ GNU General Public License for more details.\n\
+ \n\
+ You should have received a copy of the GNU General Public License\n\
+ along with this program; if not, write to the Free Software\n\
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
+\n\
+ --\n\
+\n\
+ This file was generated by the program %s */\n\
", filter_filename(file->program));
break;
default:
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2001-11-14 Dave Brolley <brolley@redhat.com>
* arch.c: Regenerate.
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (INCLUDE): Update path to callback.h.
+ * sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
2002-03-07 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
SIM_EXTRA_OBJS = @m68hc11_extra_objs@
-INCLUDE = $(srcdir)/../../include/callback.h \
+INCLUDE = $(srcdir)/../../include/gdb/callback.h \
interrupts.h sim-main.h
ac_help="$ac_help
--enable-sim-hostendian=end Specify host byte endian orientation."
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
--enable-sim-hardware=LIST Specify the hardware to be included in the build."
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:689: checking how to run the C preprocessor" >&5
+echo "configure:691: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 704 "configure"
+#line 706 "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:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:712: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 721 "configure"
+#line 723 "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:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:729: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
+#line 740 "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:744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:746: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:769: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:771: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:796: checking for POSIXized ISC" >&5
+echo "configure:798: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:817: checking for ANSI C header files" >&5
+echo "configure:819: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 822 "configure"
+#line 824 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:832: \"$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*
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 847 "configure"
+#line 849 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 865 "configure"
+#line 867 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 886 "configure"
+#line 888 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:921: checking for working const" >&5
+echo "configure:923: 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 926 "configure"
+#line 928 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:996: checking for inline" >&5
+echo "configure:998: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1003 "configure"
+#line 1005 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1036: checking for off_t" >&5
+echo "configure:1038: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1041 "configure"
+#line 1043 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1069: checking for size_t" >&5
+echo "configure:1071: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1074 "configure"
+#line 1076 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1104: checking for working alloca.h" >&5
+echo "configure:1106: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1109 "configure"
+#line 1111 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1137: checking for alloca" >&5
+echo "configure:1139: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1142 "configure"
+#line 1144 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1202: checking whether alloca needs Cray hooks" >&5
+echo "configure:1204: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1207 "configure"
+#line 1209 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1232: checking for $ac_func" >&5
+echo "configure:1234: 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 1237 "configure"
+#line 1239 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1262: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1287: checking stack direction for C alloca" >&5
+echo "configure:1289: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1295 "configure"
+#line 1297 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1339: checking for $ac_hdr" >&5
+echo "configure:1341: 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 1344 "configure"
+#line 1346 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1351: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1378: checking for $ac_func" >&5
+echo "configure:1380: 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 1383 "configure"
+#line 1385 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1408: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1431: checking for working mmap" >&5
+echo "configure:1433: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1439 "configure"
+#line 1441 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1581: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1602: checking for Cygwin environment" >&5
+echo "configure:1604: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1607 "configure"
+#line 1609 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1635: checking for mingw32 environment" >&5
+echo "configure:1637: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1640 "configure"
+#line 1642 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1714: checking host system type" >&5
+echo "configure:1716: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1735: checking target system type" >&5
+echo "configure:1737: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1753: checking build system type" >&5
+echo "configure:1755: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1797: checking for $ac_word" >&5
+echo "configure:1799: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1827: checking for $ac_word" >&5
+echo "configure:1829: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1878: checking for $ac_word" >&5
+echo "configure:1880: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1912: 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.
cat > conftest.$ac_ext << EOF
-#line 1921 "configure"
+#line 1923 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1928: \"$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
{ 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:1952: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1957: checking whether we are using GNU C" >&5
+echo "configure:1959: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1985: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1987: 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
# 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:2028: checking for a BSD compatible install" >&5
+echo "configure:2030: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2096: checking for $ac_word" >&5
+echo "configure:2098: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2131: checking for $ac_hdr" >&5
+echo "configure:2133: 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 2136 "configure"
+#line 2138 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2143: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2171: checking for $ac_func" >&5
+echo "configure:2173: 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 2176 "configure"
+#line 2178 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2201: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2228: checking for $ac_func" >&5
+echo "configure:2230: 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 2233 "configure"
+#line 2235 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2258: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2290: checking for LC_MESSAGES" >&5
+echo "configure:2292: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2297 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2323: checking whether NLS is requested" >&5
+echo "configure:2325: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2343: checking whether included gettext is requested" >&5
+echo "configure:2345: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2362: checking for libintl.h" >&5
+echo "configure:2364: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2367 "configure"
+#line 2369 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2374: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2389: checking for gettext in libc" >&5
+echo "configure:2391: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2394 "configure"
+#line 2396 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2417: checking for bindtextdomain in -lintl" >&5
+echo "configure:2419: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2427 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2438: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2452: checking for gettext in libintl" >&5
+echo "configure:2454: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
+#line 2459 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2492: checking for $ac_word" >&5
+echo "configure:2494: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2526: checking for $ac_func" >&5
+echo "configure:2528: 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 2531 "configure"
+#line 2533 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2556: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2581: checking for $ac_word" >&5
+echo "configure:2583: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2617: checking for $ac_word" >&5
+echo "configure:2619: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2649 "configure"
+#line 2651 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2689: checking for $ac_word" >&5
+echo "configure:2691: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2723: checking for $ac_word" >&5
+echo "configure:2725: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2759: checking for $ac_word" >&5
+echo "configure:2761: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2849: checking for catalogs to be installed" >&5
+echo "configure:2851: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2877: checking for linux/version.h" >&5
+echo "configure:2879: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
+#line 2884 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2889: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2956: checking for $ac_hdr" >&5
+echo "configure:2958: 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 2961 "configure"
+#line 2963 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2968: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2996: checking for $ac_hdr" >&5
+echo "configure:2998: 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 3001 "configure"
+#line 3003 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3008: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3036: checking for $ac_hdr" >&5
+echo "configure:3038: 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 3041 "configure"
+#line 3043 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3048: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3076: checking for $ac_hdr" >&5
+echo "configure:3078: 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 3081 "configure"
+#line 3083 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3088: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3115: checking for $ac_func" >&5
+echo "configure:3117: 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 3120 "configure"
+#line 3122 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3145: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3170: checking for bind in -lsocket" >&5
+echo "configure:3172: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3178 "configure"
+#line 3180 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3191: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3217: checking for gethostbyname in -lnsl" >&5
+echo "configure:3219: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3225 "configure"
+#line 3227 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3412: checking return type of signal handlers" >&5
+echo "configure:3414: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
+#line 3419 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3456: checking for executable suffix" >&5
+echo "configure:3458: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3616: checking whether byte ordering is bigendian" >&5
+echo "configure:3618: 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
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3623 "configure"
+#line 3625 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3638 "configure"
+#line 3640 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3669 "configure"
+#line 3671 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3767: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3777 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3827: checking for $ac_hdr" >&5
+echo "configure:3876: 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 3832 "configure"
+#line 3881 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3886: \"$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*
#include "opcode/m68hc11.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "opcode/m68hc11.h"
#include "sim-types.h"
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
#include <sys/param.h>
#include <netinet/in.h> /* for byte ordering macros */
#include "bfd.h"
-#include "callback.h"
+#include "gdb/callback.h"
#include "libiberty.h"
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
#ifndef NUM_ELEM
#define NUM_ELEM(A) (sizeof (A) / sizeof (A)[0])
+2002-06-18 Chris Demetriou <cgd@broadcom.com>
+
+ * mdmx.c (SD_): Delete.
+ (Unpredictable): Re-define, for now, to directly invoke
+ unpredictable_action().
+ (mdmx_acc_op): Fix error in .ob immediate handling.
+
+2002-06-18 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_firmware_command): Initialize `address'.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-14 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * mips3d.igen: New file which contains MIPS-3D ASE instructions.
+ * Makefile.in (IGEN_INCLUDE): Add mips3d.igen.
+ * mips.igen: Include mips3d.igen.
+ (mips3d): New model name for MIPS-3D ASE instructions.
+ (CVT.W.fmt): Don't use this instruction for word (source) format
+ instructions.
+ * cp1.c (fp_binary_r, fp_add_r, fp_mul_r, fpu_inv1, fpu_inv1_32)
+ (fpu_inv1_64, fp_recip1, fp_recip2, fpu_inv_sqrt1, fpu_inv_sqrt1_32)
+ (fpu_inv_sqrt1_64, fp_rsqrt1, fp_rsqrt2): New functions.
+ (NR_FRAC_GUARD, IMPLICIT_1): New macros.
+ * sim-main.h (fmt_pw, CompareAbs, AddR, MultiplyR, Recip1, Recip2)
+ (RSquareRoot1, RSquareRoot2): New macros.
+ (fp_add_r, fp_mul_r, fp_recip1, fp_recip2, fp_rsqrt1)
+ (fp_rsqrt2): New functions.
+ * configure.in: Add MIPS-3D support to mipsisa64 simulator.
+ * configure: Regenerate.
+
+2002-06-13 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * cp1.c (FP_PS_upper, FP_PS_lower, FP_PS_cat, FPQNaN_PS): New macros.
+ (value_fpr, store_fpr, fp_cmp, fp_unary, fp_binary, fp_mac)
+ (fp_inv_sqrt, fpu_format_name): Add paired-single support.
+ (convert): Note that this function is not used for paired-single
+ format conversions.
+ (ps_lower, ps_upper, pack_ps, convert_ps): New functions.
+ * mips.igen (FMT, MOVtf.fmt): Add paired-single support.
+ (check_fmt_p): Enable paired-single support.
+ (ALNV.PS, CVT.PS.S, CVT.S.PL, CVT.S.PU, PLL.PS, PLU.PS, PUL.PS)
+ (PUU.PS): New instructions.
+ (CVT.S.fmt): Don't use this instruction for paired-single format
+ destinations.
+ * sim-main.h (FP_formats): New value 'fmt_ps.'
+ (ps_lower, ps_upper, pack_ps, convert_ps): New prototypes.
+ (PSLower, PSUpper, PackPS, ConvertPS): New macros.
+
+2002-06-12 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen: Fix formatting of function calls in
+ many FP operations.
+
+2002-06-12 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (MOVN, MOVZ): Trace result.
+ (TNEI): Print "tnei" as the opcode name in traces.
+ (CEIL.W): Add disassembly string for traces.
+ (RSQRT.fmt): Make location of disassembly string consistent
+ with other instructions.
+
+2002-06-12 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (X): Delete unused function.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
+2002-06-07 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * cp1.c (inner_mac, fp_mac, inner_rsqrt, fp_inv_sqrt)
+ (fp_rsqrt, fp_madd, fp_msub, fp_nmadd, fp_nmsub): New functions.
+ * sim-main.h (fp_rsqrt, fp_madd, fp_msub, fp_nmadd)
+ (fp_nmsub): New prototypes.
+ (RSquareRoot, MultiplyAdd, MultiplySub, NegMultiplyAdd)
+ (NegMultiplySub): New defines.
+ * mips.igen (RSQRT.fmt): Use RSquareRoot().
+ (MADD.D, MADD.S): Replace with...
+ (MADD.fmt): New instruction.
+ (MSUB.D, MSUB.S): Replace with...
+ (MSUB.fmt): New instruction.
+ (NMADD.D, NMADD.S): Replace with...
+ (NMADD.fmt): New instruction.
+ (NMSUB.D, MSUB.S): Replace with...
+ (NMSUB.fmt): New instruction.
+
+2002-06-07 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * cp1.c: Fix more comment spelling and formatting.
+ (value_fcr, store_fcr): Use fenr_FS rather than hard-coding value.
+ (denorm_mode): New function.
+ (fpu_unary, fpu_binary): Round results after operation, collect
+ status from rounding operations, and update the FCSR.
+ (convert): Collect status from integer conversions and rounding
+ operations, and update the FCSR. Adjust NaN values that result
+ from conversions. Convert to use sim_io_eprintf rather than
+ fprintf, and remove some debugging code.
+ * cp1.h (fenr_FS): New define.
+
+2002-06-07 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c (convert): Remove unusable debugging code, and move MIPS
+ rounding mode to sim FP rounding mode flag conversion code into...
+ (rounding_mode): New function.
+
+2002-06-07 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c: Clean up formatting of a few comments.
+ (value_fpr): Reformat switch statement.
+
+2002-06-06 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * cp1.h: New file.
+ * sim-main.h: Include cp1.h.
+ (SETFCC, GETFCC, IR, UF, OF, DX, IO, UO, FP_FLAGS, FP_ENABLE)
+ (FP_CAUSE, GETFS, FP_RM_NEAREST, FP_RM_TOZERO, FP_RM_TOPINF)
+ (FP_RM_TOMINF, GETRM): Remove. Moved to cp1.h.
+ (FP_FS, FP_MASK_RM, FP_SH_RM, Nan, Less, Equal): Remove.
+ (value_fcr, store_fcr, test_fcsr, fp_cmp): New prototypes.
+ (ValueFCR, StoreFCR, TestFCSR, Compare): New macros.
+ * cp1.c: Don't include sim-fpu.h; already included by
+ sim-main.h. Clean up formatting of some comments.
+ (NaN, Equal, Less): Remove.
+ (test_fcsr, value_fcr, store_fcr, update_fcsr, fp_test)
+ (fp_cmp): New functions.
+ * mips.igen (do_c_cond_fmt): Remove.
+ (C.cond.fmta, C.cond.fmtb): Replace uses of do_c_cond_fmt_a with
+ Compare. Add result tracing.
+ (CxC1): Remove, replace with...
+ (CFC1a, CFC1b, CFC1c, CTC1a, CTC1b, CTC1c): New instructions.
+ (DMxC1): Remove, replace with...
+ (DMFC1a, DMFC1b, DMTC1a, DMTC1b): New instructions.
+ (MxC1): Remove, replace with...
+ (MFC1a, MFC1b, MTC1a, MTC1b): New instructions.
+
+2002-06-04 Chris Demetriou <cgd@broadcom.com>
+
+ * sim-main.h (FGRIDX): Remove, replace all uses with...
+ (FGR_BASE): New macro.
+ (FP0_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): New macros.
+ (_sim_cpu): Move 'fgr' member to be right before 'fpr_state' member.
+ (NR_FGR, FGR): Likewise.
+ * interp.c: Replace all uses of FGRIDX with FGR_BASE.
+ * mips.igen: Likewise.
+
+2002-06-04 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c: Add an FSF Copyright notice to this file.
+
+2002-06-04 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * cp1.c (Infinity): Remove.
+ * sim-main.h (Infinity): Likewise.
+
+ * cp1.c (fp_unary, fp_binary): New functions.
+ (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div, fp_recip)
+ (fp_sqrt): New functions, implemented in terms of the above.
+ (AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
+ (Recip, SquareRoot): Remove (replaced by functions above).
+ * sim-main.h (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div)
+ (fp_recip, fp_sqrt): New prototypes.
+ (AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
+ (Recip, SquareRoot): Replace prototypes with #defines which
+ invoke the functions above.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+
+ * sim-main.h (Nan, Infinity, Less, Equal, AbsoluteValue, Negate)
+ (Add, Sub, Multiply, Divide, Recip, SquareRoot): Move lower in
+ file, remove PARAMS from prototypes.
+ (value_fpr, store_fpr, convert): Likewise. Use SIM_STATE to provide
+ simulator state arguments.
+ (ValueFPR, StoreFPR, Convert): Move lower in file. Use SIM_ARGS to
+ pass simulator state arguments.
+ * cp1.c (SD): Redefine as CPU_STATE(cpu).
+ (store_fpr, convert): Remove 'sd' argument.
+ (value_fpr): Likewise. Convert to use 'SD' instead.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c (Min, Max): Remove #if 0'd functions.
+ * sim-main.h (Min, Max): Remove.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c: fix formatting of switch case and default labels.
+ * interp.c: Likewise.
+ * sim-main.c: Likewise.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+
+ * cp1.c: Clean up comments which describe FP formats.
+ (FPQNaN_DOUBLE, FPQNaN_LONG): Generate using UNSIGNED64.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * configure.in (mipsisa64sb1*-*-*): New target for supporting
+ Broadcom SiByte SB-1 processor configurations.
+ * configure: Regenerate.
+ * sb1.igen: New file.
+ * mips.igen: Include sb1.igen.
+ (sb1): New model.
+ * Makefile.in (IGEN_INCLUDE): Add sb1.igen.
+ * mdmx.igen: Add "sb1" model to all appropriate functions and
+ instructions.
+ * mdmx.c (AbsDiffOB, AvgOB, AccAbsDiffOB): New functions.
+ (ob_func, ob_acc): Reference the above.
+ (qh_acc): Adjust to keep the same size as ob_acc.
+ * sim-main.h (status_SBX, MX_VECT_ABSD, MX_VECT_AVG, MX_AbsDiff)
+ (MX_Avg, MX_VECT_ABSDA, MX_AbsDiffC): New macros.
+
+2002-06-03 Chris Demetriou <cgd@broadcom.com>
+
+ * Makefile.in (IGEN_INCLUDE): Add mdmx.igen.
+
+2002-06-02 Chris Demetriou <cgd@broadcom.com>
+ Ed Satterthwaite <ehs@broadcom.com>
+
+ * mips.igen (mdmx): New (pseudo-)model.
+ * mdmx.c, mdmx.igen: New files.
+ * Makefile.in (SIM_OBJS): Add mdmx.o.
+ * sim-main.h (MDMX_accumulator, MX_fmtsel, signed24, signed48):
+ New typedefs.
+ (ACC, MX_Add, MX_AddA, MX_AddL, MX_And, MX_C_EQ, MX_C_LT, MX_Comp)
+ (MX_FMT_OB, MX_FMT_QH, MX_Max, MX_Min, MX_Msgn, MX_Mul, MX_MulA)
+ (MX_MulL, MX_MulS, MX_MulSL, MX_Nor, MX_Or, MX_Pick, MX_RAC)
+ (MX_RAC_H, MX_RAC_L, MX_RAC_M, MX_RNAS, MX_RNAU, MX_RND_AS)
+ (MX_RND_AU, MX_RND_ES, MX_RND_EU, MX_RND_ZS, MX_RND_ZU, MX_RNES)
+ (MX_RNEU, MX_RZS, MX_RZU, MX_SHFL, MX_ShiftLeftLogical)
+ (MX_ShiftRightArith, MX_ShiftRightLogical, MX_Sub, MX_SubA, MX_SubL)
+ (MX_VECT_ADD, MX_VECT_ADDA, MX_VECT_ADDL, MX_VECT_AND)
+ (MX_VECT_MAX, MX_VECT_MIN, MX_VECT_MSGN, MX_VECT_MUL, MX_VECT_MULA)
+ (MX_VECT_MULL, MX_VECT_MULS, MX_VECT_MULSL, MX_VECT_NOR)
+ (MX_VECT_OR, MX_VECT_SLL, MX_VECT_SRA, MX_VECT_SRL, MX_VECT_SUB)
+ (MX_VECT_SUBA, MX_VECT_SUBL, MX_VECT_XOR, MX_WACH, MX_WACL, MX_Xor)
+ (SIM_ARGS, SIM_STATE, UnpredictableResult, fmt_mdmx, ob_fmtsel)
+ (qh_fmtsel): New macros.
+ (_sim_cpu): New member "acc".
+ (mdmx_acc_op, mdmx_cc_op, mdmx_cpr_op, mdmx_pick_op, mdmx_rac_op)
+ (mdmx_round_op, mdmx_shuffle, mdmx_wach, mdmx_wacl): New functions.
+
2002-05-01 Chris Demetriou <cgd@broadcom.com>
* interp.c: Use 'deprecated' rather than 'depreciated.'
$(MIPS_EXTRA_OBJS) \
cp1.o \
interp.o \
+ mdmx.o \
sim-main.o \
sim-hload.o \
sim-engine.o \
interp.o: $(srcdir)/interp.c config.h sim-main.h itable.h
cp1.o: $(srcdir)/cp1.c config.h sim-main.h
+mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
../igen/igen:
cd ../igen && $(MAKE)
M16_DC=$(srcdir)/m16.dc
IGEN_INCLUDE=\
$(srcdir)/m16.igen \
+ $(srcdir)/mdmx.igen \
+ $(srcdir)/mips3d.igen \
+ $(srcdir)/sb1.igen \
$(srcdir)/tx.igen \
$(srcdir)/vr.igen \
ac_help="$ac_help
--enable-sim-hostendian=end Specify host byte endian orientation."
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
--enable-sim-endian=endian Specify target byte endian orientation."
ac_help="$ac_help
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:699: checking how to run the C preprocessor" >&5
+echo "configure:701: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 714 "configure"
+#line 716 "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:720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:722: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 731 "configure"
+#line 733 "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:737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:739: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 748 "configure"
+#line 750 "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:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:756: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:781: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:806: checking for POSIXized ISC" >&5
+echo "configure:808: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:827: checking for ANSI C header files" >&5
+echo "configure:829: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 832 "configure"
+#line 834 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:842: \"$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*
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 857 "configure"
+#line 859 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 875 "configure"
+#line 877 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 896 "configure"
+#line 898 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:931: checking for working const" >&5
+echo "configure:933: 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 936 "configure"
+#line 938 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1006: checking for inline" >&5
+echo "configure:1008: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1013 "configure"
+#line 1015 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1046: checking for off_t" >&5
+echo "configure:1048: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1051 "configure"
+#line 1053 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1079: checking for size_t" >&5
+echo "configure:1081: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1084 "configure"
+#line 1086 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1114: checking for working alloca.h" >&5
+echo "configure:1116: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1121 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1147: checking for alloca" >&5
+echo "configure:1149: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1152 "configure"
+#line 1154 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1212: checking whether alloca needs Cray hooks" >&5
+echo "configure:1214: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1217 "configure"
+#line 1219 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1242: checking for $ac_func" >&5
+echo "configure:1244: 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 1247 "configure"
+#line 1249 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1272: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1297: checking stack direction for C alloca" >&5
+echo "configure:1299: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1305 "configure"
+#line 1307 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1349: checking for $ac_hdr" >&5
+echo "configure:1351: 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 1354 "configure"
+#line 1356 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1361: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1388: checking for $ac_func" >&5
+echo "configure:1390: 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 1393 "configure"
+#line 1395 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1418: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1441: checking for working mmap" >&5
+echo "configure:1443: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1449 "configure"
+#line 1451 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1591: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1612: checking for Cygwin environment" >&5
+echo "configure:1614: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1617 "configure"
+#line 1619 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1645: checking for mingw32 environment" >&5
+echo "configure:1647: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1650 "configure"
+#line 1652 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1724: checking host system type" >&5
+echo "configure:1726: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1745: checking target system type" >&5
+echo "configure:1747: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1763: checking build system type" >&5
+echo "configure:1765: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1807: checking for $ac_word" >&5
+echo "configure:1809: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1837: checking for $ac_word" >&5
+echo "configure:1839: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1888: checking for $ac_word" >&5
+echo "configure:1890: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1920: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1922: 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.
cat > conftest.$ac_ext << EOF
-#line 1931 "configure"
+#line 1933 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1938: \"$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
{ 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:1962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1964: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1967: checking whether we are using GNU C" >&5
+echo "configure:1969: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1995: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1997: 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
# 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:2038: checking for a BSD compatible install" >&5
+echo "configure:2040: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2106: checking for $ac_word" >&5
+echo "configure:2108: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2141: checking for $ac_hdr" >&5
+echo "configure:2143: 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 2146 "configure"
+#line 2148 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2153: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2181: checking for $ac_func" >&5
+echo "configure:2183: 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 2186 "configure"
+#line 2188 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2211: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2238: checking for $ac_func" >&5
+echo "configure:2240: 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 2243 "configure"
+#line 2245 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2268: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2300: checking for LC_MESSAGES" >&5
+echo "configure:2302: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+#line 2307 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2333: checking whether NLS is requested" >&5
+echo "configure:2335: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2353: checking whether included gettext is requested" >&5
+echo "configure:2355: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2372: checking for libintl.h" >&5
+echo "configure:2374: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2377 "configure"
+#line 2379 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2384: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2399: checking for gettext in libc" >&5
+echo "configure:2401: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2404 "configure"
+#line 2406 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2427: checking for bindtextdomain in -lintl" >&5
+echo "configure:2429: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2435 "configure"
+#line 2437 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2448: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2462: checking for gettext in libintl" >&5
+echo "configure:2464: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2467 "configure"
+#line 2469 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2502: checking for $ac_word" >&5
+echo "configure:2504: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2536: checking for $ac_func" >&5
+echo "configure:2538: 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 2541 "configure"
+#line 2543 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2566: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2591: checking for $ac_word" >&5
+echo "configure:2593: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2627: checking for $ac_word" >&5
+echo "configure:2629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2659 "configure"
+#line 2661 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_word" >&5
+echo "configure:2701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2733: checking for $ac_word" >&5
+echo "configure:2735: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2769: checking for $ac_word" >&5
+echo "configure:2771: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2859: checking for catalogs to be installed" >&5
+echo "configure:2861: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2887: checking for linux/version.h" >&5
+echo "configure:2889: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2892 "configure"
+#line 2894 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2899: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2966: checking for $ac_hdr" >&5
+echo "configure:2968: 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 2971 "configure"
+#line 2973 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2978: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3006: checking for $ac_hdr" >&5
+echo "configure:3008: 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 3011 "configure"
+#line 3013 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3018: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3046: checking for $ac_hdr" >&5
+echo "configure:3048: 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 3051 "configure"
+#line 3053 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3058: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3086: checking for $ac_hdr" >&5
+echo "configure:3088: 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 3091 "configure"
+#line 3093 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3098: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3125: checking for $ac_func" >&5
+echo "configure:3127: 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 3130 "configure"
+#line 3132 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3155: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3180: checking for bind in -lsocket" >&5
+echo "configure:3182: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3188 "configure"
+#line 3190 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3201: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3227: checking for gethostbyname in -lnsl" >&5
+echo "configure:3229: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3235 "configure"
+#line 3237 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3422: checking return type of signal handlers" >&5
+echo "configure:3424: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3427 "configure"
+#line 3429 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3466: checking for executable suffix" >&5
+echo "configure:3468: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3626: checking whether byte ordering is bigendian" >&5
+echo "configure:3628: 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
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3633 "configure"
+#line 3635 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
+#line 3650 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3681 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3777: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3787 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
sim_igen_machine="-M mips32"
sim_igen_filter="32,f"
;;
+ mipsisa64sb1*-*-*) sim_gen=IGEN
+ sim_igen_machine="-M mips64,sb1"
+ sim_igen_filter="32,64,f"
+ ;;
mipsisa64*-*-*) sim_gen=IGEN
- sim_igen_machine="-M mips64"
+ sim_igen_machine="-M mips64,mips3d"
sim_igen_filter="32,64,f"
;;
mips*lsi*) sim_gen=M16
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4136: checking for X" >&5
+echo "configure:4189: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4198 "configure"
+#line 4251 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4256: \"$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*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4272 "configure"
+#line 4325 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4372: checking for $ac_hdr" >&5
+echo "configure:4425: 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 4377 "configure"
+#line 4430 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4435: \"$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*
done
echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:4409: checking for fabs in -lm" >&5
+echo "configure:4462: checking for fabs in -lm" >&5
ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4417 "configure"
+#line 4470 "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
fabs()
; return 0; }
EOF
-if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4481: \"$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
for ac_func in aint anint sqrt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4458: checking for $ac_func" >&5
+echo "configure:4511: 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 4463 "configure"
+#line 4516 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4539: \"$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
sim_igen_machine="-M mips32"
sim_igen_filter="32,f"
;;
+ mipsisa64sb1*-*-*) sim_gen=IGEN
+ sim_igen_machine="-M mips64,sb1"
+ sim_igen_filter="32,64,f"
+ ;;
mipsisa64*-*-*) sim_gen=IGEN
- sim_igen_machine="-M mips64"
+ sim_igen_machine="-M mips64,mips3d"
sim_igen_filter="32,64,f"
;;
mips*lsi*) sim_gen=M16
/*> cp1.c <*/
+/* MIPS Simulator FPU (CoProcessor 1) support.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Originally created by Cygnus Solutions, modified substially
+ by Broadcom Corporation (SiByte). Paired-single operation support
+ and MIPS-3D support contributed by Broadcom Corporation (SiByte).
+
+This file is part of GDB, the GNU debugger.
+
+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, 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. */
+
+/* XXX: The following notice should be removed as soon as is practical: */
/* Floating Point Support for gdb MIPS simulators
This file is part of the MIPS sim
THIS SOFTWARE IS NOT COPYRIGHTED
+ (by Cygnus.)
Cygnus offers the following for use in the public domain. Cygnus
makes no warranty with regard to the software or it's performance
*/
#include "sim-main.h"
-#include "sim-fpu.h"
/* Within cp1.c we refer to sim_cpu directly. */
#define CPU cpu
-#define SD sd
+#define SD CPU_STATE(cpu)
/*-- FPU support routines ---------------------------------------------------*/
/* Numbers are held in normalized form. The SINGLE and DOUBLE binary
- formats conform to ANSI/IEEE Std 754-1985. */
-/* SINGLE precision floating:
- * seeeeeeeefffffffffffffffffffffff
- * s = 1bit = sign
- * e = 8bits = exponent
- * f = 23bits = fraction
- */
-/* SINGLE precision fixed:
- * siiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- * s = 1bit = sign
- * i = 31bits = integer
- */
-/* DOUBLE precision floating:
- * seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff
- * s = 1bit = sign
- * e = 11bits = exponent
- * f = 52bits = fraction
- */
-/* DOUBLE precision fixed:
- * siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- * s = 1bit = sign
- * i = 63bits = integer
+ formats conform to ANSI/IEEE Std 754-1985.
+
+ SINGLE precision floating:
+ seeeeeeeefffffffffffffffffffffff
+ s = 1bit = sign
+ e = 8bits = exponent
+ f = 23bits = fraction
+
+ SINGLE precision fixed:
+ siiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+ s = 1bit = sign
+ i = 31bits = integer
+
+ DOUBLE precision floating:
+ seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff
+ s = 1bit = sign
+ e = 11bits = exponent
+ f = 52bits = fraction
+
+ DOUBLE precision fixed:
+ siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+ s = 1bit = sign
+ i = 63bits = integer
+
+ PAIRED SINGLE precision floating:
+ seeeeeeeefffffffffffffffffffffffseeeeeeeefffffffffffffffffffffff
+ | upper || lower |
+ s = 1bit = sign
+ e = 8bits = exponent
+ f = 23bits = fraction
+ Note: upper = [63..32], lower = [31..0]
*/
-/* Explicit QNaN values used when value required: */
+/* Extract packed single values: */
+#define FP_PS_upper(v) (((v) >> 32) & (unsigned)0xFFFFFFFF)
+#define FP_PS_lower(v) ((v) & (unsigned)0xFFFFFFFF)
+#define FP_PS_cat(u,l) (((unsigned64)((u) & (unsigned)0xFFFFFFFF) << 32) \
+ | (unsigned64)((l) & 0xFFFFFFFF))
+
+/* Explicit QNaN values. */
#define FPQNaN_SINGLE (0x7FBFFFFF)
#define FPQNaN_WORD (0x7FFFFFFF)
-#define FPQNaN_DOUBLE ((((uword64) 0x7FF7FFFF) << 32) | 0xFFFFFFFF)
-#define FPQNaN_LONG ((((uword64) 0x7FFFFFFF) << 32) | 0xFFFFFFFF)
+#define FPQNaN_DOUBLE (UNSIGNED64 (0x7FF7FFFFFFFFFFFF))
+#define FPQNaN_LONG (UNSIGNED64 (0x7FFFFFFFFFFFFFFF))
+#define FPQNaN_PS (FP_PS_cat (FPQNaN_SINGLE, FPQNaN_SINGLE))
static const char *fpu_format_name (FP_formats fmt);
#ifdef DEBUG
#endif
uword64
-value_fpr (SIM_DESC sd,
- sim_cpu *cpu,
+value_fpr (sim_cpu *cpu,
address_word cia,
int fpr,
FP_formats fmt)
uword64 value = 0;
int err = 0;
- /* Treat unused register values, as fixed-point 64bit values: */
+ /* Treat unused register values, as fixed-point 64bit values. */
if ((fmt == fmt_uninterpreted) || (fmt == fmt_unknown))
{
#if 1
#endif
}
- /* For values not yet accessed, set to the desired format: */
+ /* For values not yet accessed, set to the desired format. */
if (FPR_STATE[fpr] == fmt_uninterpreted)
{
FPR_STATE[fpr] = fmt;
}
if (fmt != FPR_STATE[fpr])
{
- sim_io_eprintf (sd, "FPR %d (format %s) being accessed with format %s - setting to unknown (PC = 0x%s)\n",
+ sim_io_eprintf (SD, "FPR %d (format %s) being accessed with format %s - setting to unknown (PC = 0x%s)\n",
fpr, fpu_format_name (FPR_STATE[fpr]),
fpu_format_name (fmt), pr_addr (cia));
FPR_STATE[fpr] = fmt_unknown;
/* Set QNaN value: */
switch (fmt)
{
- case fmt_single:
- value = FPQNaN_SINGLE;
- break;
-
- case fmt_double:
- value = FPQNaN_DOUBLE;
- break;
-
- case fmt_word:
- value = FPQNaN_WORD;
- break;
-
- case fmt_long:
- value = FPQNaN_LONG;
- break;
-
- default:
- err = -1;
- break;
+ case fmt_single: value = FPQNaN_SINGLE; break;
+ case fmt_double: value = FPQNaN_DOUBLE; break;
+ case fmt_word: value = FPQNaN_WORD; break;
+ case fmt_long: value = FPQNaN_LONG; break;
+ case fmt_ps: value = FPQNaN_PS; break;
+ default: err = -1; break;
}
}
else if (SizeFGR () == 64)
case fmt_uninterpreted:
case fmt_double:
case fmt_long:
+ case fmt_ps:
value = FGR[fpr];
break;
case fmt_long:
if ((fpr & 1) == 0)
{
- /* even registers only */
+ /* Even register numbers only. */
#ifdef DEBUG
printf ("DBG: ValueFPR: FGR[%d] = %s, FGR[%d] = %s\n",
fpr + 1, pr_uword64 ((uword64) FGR[fpr+1]),
}
break;
- default :
+ case fmt_ps:
+ SignalException (ReservedInstruction, 0);
+ break;
+
+ default:
err = -1;
break;
}
}
void
-store_fpr (SIM_DESC sd,
- sim_cpu *cpu,
+store_fpr (sim_cpu *cpu,
address_word cia,
int fpr,
FP_formats fmt,
{
case fmt_uninterpreted_32:
fmt = fmt_uninterpreted;
- case fmt_single :
- case fmt_word :
+ case fmt_single:
+ case fmt_word:
if (STATE_VERBOSE_P (SD))
sim_io_eprintf (SD,
"Warning: PC 0x%s: interp.c store_fpr DEADCODE\n",
case fmt_uninterpreted_64:
fmt = fmt_uninterpreted;
case fmt_uninterpreted:
- case fmt_double :
- case fmt_long :
+ case fmt_double:
+ case fmt_long:
+ case fmt_ps:
FGR[fpr] = value;
FPR_STATE[fpr] = fmt;
break;
- default :
+ default:
FPR_STATE[fpr] = fmt_unknown;
err = -1;
break;
{
case fmt_uninterpreted_32:
fmt = fmt_uninterpreted;
- case fmt_single :
- case fmt_word :
+ case fmt_single:
+ case fmt_word:
FGR[fpr] = (value & 0xFFFFFFFF);
FPR_STATE[fpr] = fmt;
break;
case fmt_uninterpreted_64:
fmt = fmt_uninterpreted;
case fmt_uninterpreted:
- case fmt_double :
- case fmt_long :
+ case fmt_double:
+ case fmt_long:
if ((fpr & 1) == 0)
{
- /* even register number only */
+ /* Even register numbers only. */
FGR[fpr+1] = (value >> 32);
FGR[fpr] = (value & 0xFFFFFFFF);
FPR_STATE[fpr + 1] = fmt;
}
break;
- default :
+ case fmt_ps:
+ FPR_STATE[fpr] = fmt_unknown;
+ SignalException (ReservedInstruction, 0);
+ break;
+
+ default:
FPR_STATE[fpr] = fmt_unknown;
err = -1;
break;
return;
}
-int
-NaN (op, fmt)
- uword64 op;
- FP_formats fmt;
+
+/* CP1 control/status register access functions. */
+
+void
+test_fcsr (sim_cpu *cpu,
+ address_word cia)
{
- int boolean = 0;
- switch (fmt)
+ unsigned int cause;
+
+ cause = (FCSR & fcsr_CAUSE_mask) >> fcsr_CAUSE_shift;
+ if ((cause & ((FCSR & fcsr_ENABLES_mask) >> fcsr_ENABLES_shift)) != 0
+ || (cause & (1 << UO)))
{
- case fmt_single:
- case fmt_word:
- {
- sim_fpu wop;
- sim_fpu_32to (&wop, op);
- boolean = sim_fpu_is_nan (&wop);
- break;
- }
- case fmt_double:
- case fmt_long:
- {
- sim_fpu wop;
- sim_fpu_64to (&wop, op);
- boolean = sim_fpu_is_nan (&wop);
- break;
- }
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
+ SignalExceptionFPE();
}
-
-#ifdef DEBUG
- printf ("DBG: NaN: returning %d for 0x%s (format = %s)\n",
- boolean, pr_addr (op), fpu_format_name (fmt));
-#endif /* DEBUG */
-
- return (boolean);
}
-int
-Infinity (op, fmt)
- uword64 op;
- FP_formats fmt;
+unsigned_word
+value_fcr(sim_cpu *cpu,
+ address_word cia,
+ int fcr)
{
- int boolean = 0;
-
-#ifdef DEBUG
- printf ("DBG: Infinity: format %s 0x%s\n",
- fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
+ unsigned32 value = 0;
- switch (fmt)
+ switch (fcr)
{
- case fmt_single:
- {
- sim_fpu wop;
- sim_fpu_32to (&wop, op);
- boolean = sim_fpu_is_infinity (&wop);
- break;
- }
- case fmt_double:
- {
- sim_fpu wop;
- sim_fpu_64to (&wop, op);
- boolean = sim_fpu_is_infinity (&wop);
- break;
- }
- default:
- printf ("DBG: TODO: unrecognised format (%s) for Infinity check\n",
- fpu_format_name (fmt));
+ case 0: /* FP Implementation and Revision Register. */
+ value = FCR0;
+ break;
+ case 25: /* FP Condition Codes Register (derived from FCSR). */
+ value = (FCR31 & fcsr_FCC_mask) >> fcsr_FCC_shift;
+ value = (value & 0x1) | (value >> 1); /* Close FCC gap. */
+ break;
+ case 26: /* FP Exceptions Register (derived from FCSR). */
+ value = FCR31 & (fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+ break;
+ case 28: /* FP Enables Register (derived from FCSR). */
+ value = FCR31 & (fcsr_ENABLES_mask | fcsr_RM_mask);
+ if ((FCR31 & fcsr_FS) != 0)
+ value |= fenr_FS;
+ break;
+ case 31: /* FP Control/Status Register (FCSR). */
+ value = FCR31 & ~fcsr_ZERO_mask;
break;
}
-#ifdef DEBUG
- printf ("DBG: Infinity: returning %d for 0x%s (format = %s)\n",
- boolean, pr_addr (op), fpu_format_name (fmt));
-#endif /* DEBUG */
+ return (EXTEND32 (value));
+}
+
+void
+store_fcr(sim_cpu *cpu,
+ address_word cia,
+ int fcr,
+ unsigned_word value)
+{
+ unsigned32 v;
- return (boolean);
+ v = VL4_8(value);
+ switch (fcr)
+ {
+ case 25: /* FP Condition Codes Register (stored into FCSR). */
+ v = (v << 1) | (v & 0x1); /* Adjust for FCC gap. */
+ FCR31 &= ~fcsr_FCC_mask;
+ FCR31 |= ((v << fcsr_FCC_shift) & fcsr_FCC_mask);
+ break;
+ case 26: /* FP Exceptions Register (stored into FCSR). */
+ FCR31 &= ~(fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+ FCR31 |= (v & (fcsr_CAUSE_mask | fcsr_FLAGS_mask));
+ test_fcsr(cpu, cia);
+ break;
+ case 28: /* FP Enables Register (stored into FCSR). */
+ if ((v & fenr_FS) != 0)
+ v |= fcsr_FS;
+ else
+ v &= ~fcsr_FS;
+ FCR31 &= (fcsr_FCC_mask | fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+ FCR31 |= (v & (fcsr_FS | fcsr_ENABLES_mask | fcsr_RM_mask));
+ test_fcsr(cpu, cia);
+ break;
+ case 31: /* FP Control/Status Register (FCSR). */
+ FCR31 = v & ~fcsr_ZERO_mask;
+ test_fcsr(cpu, cia);
+ break;
+ }
}
-int
-Less (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
+void
+update_fcsr (sim_cpu *cpu,
+ address_word cia,
+ sim_fpu_status status)
{
- int boolean = 0;
+ FCSR &= ~fcsr_CAUSE_mask;
- /* Argument checking already performed by the FPCOMPARE code */
+ if (status != 0)
+ {
+ unsigned int cause = 0;
+
+ /* map between sim_fpu codes and MIPS FCSR */
+ if (status & (sim_fpu_status_invalid_snan
+ | sim_fpu_status_invalid_isi
+ | sim_fpu_status_invalid_idi
+ | sim_fpu_status_invalid_zdz
+ | sim_fpu_status_invalid_imz
+ | sim_fpu_status_invalid_cmp
+ | sim_fpu_status_invalid_sqrt
+ | sim_fpu_status_invalid_cvi))
+ cause |= (1 << IO);
+ if (status & sim_fpu_status_invalid_div0)
+ cause |= (1 << DZ);
+ if (status & sim_fpu_status_overflow)
+ cause |= (1 << OF);
+ if (status & sim_fpu_status_underflow)
+ cause |= (1 << UF);
+ if (status & sim_fpu_status_inexact)
+ cause |= (1 << IR);
+#if 0 /* Not yet. */
+ /* Implicit clearing of other bits by unimplemented done by callers. */
+ if (status & sim_fpu_status_unimplemented)
+ cause |= (1 << UO);
+#endif
-#ifdef DEBUG
- printf ("DBG: Less: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+ FCSR |= (cause << fcsr_CAUSE_shift);
+ test_fcsr (cpu, cia);
+ FCSR |= ((cause & ~(1 << UO)) << fcsr_FLAGS_shift);
+ }
+ return;
+}
- /* The format type should already have been checked: */
- switch (fmt)
+static sim_fpu_round
+rounding_mode(int rm)
+{
+ sim_fpu_round round;
+
+ switch (rm)
{
- case fmt_single:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_32to (&wop1, op1);
- sim_fpu_32to (&wop2, op2);
- boolean = sim_fpu_is_lt (&wop1, &wop2);
- break;
- }
- case fmt_double:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_64to (&wop1, op1);
- sim_fpu_64to (&wop2, op2);
- boolean = sim_fpu_is_lt (&wop1, &wop2);
- break;
- }
+ case FP_RM_NEAREST:
+ /* Round result to nearest representable value. When two
+ representable values are equally near, round to the value
+ that has a least significant bit of zero (i.e. is even). */
+ round = sim_fpu_round_near;
+ break;
+ case FP_RM_TOZERO:
+ /* Round result to the value closest to, and not greater in
+ magnitude than, the result. */
+ round = sim_fpu_round_zero;
+ break;
+ case FP_RM_TOPINF:
+ /* Round result to the value closest to, and not less than,
+ the result. */
+ round = sim_fpu_round_up;
+ break;
+ case FP_RM_TOMINF:
+ /* Round result to the value closest to, and not greater than,
+ the result. */
+ round = sim_fpu_round_down;
+ break;
default:
+ round = 0;
fprintf (stderr, "Bad switch\n");
abort ();
}
+ return round;
+}
-#ifdef DEBUG
- printf ("DBG: Less: returning %d (format = %s)\n",
- boolean, fpu_format_name (fmt));
-#endif /* DEBUG */
+/* When the FS bit is set, MIPS processors return zero for
+ denormalized results and optionally replace denormalized inputs
+ with zero. When FS is clear, some implementation trap on input
+ and/or output, while other perform the operation in hardware. */
+static sim_fpu_denorm
+denorm_mode(sim_cpu *cpu)
+{
+ sim_fpu_denorm denorm;
- return (boolean);
+ /* XXX: FIXME: Eventually should be CPU model dependent. */
+ if (GETFS())
+ denorm = sim_fpu_denorm_zero;
+ else
+ denorm = 0;
+ return denorm;
}
-int
-Equal (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
-{
- int boolean = 0;
- /* Argument checking already performed by the FPCOMPARE code */
+/* Comparison operations. */
-#ifdef DEBUG
- printf ("DBG: Equal: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+static sim_fpu_status
+fp_test(unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt,
+ int abs,
+ int cond,
+ int *condition)
+{
+ sim_fpu wop1;
+ sim_fpu wop2;
+ sim_fpu_status status = 0;
+ int less, equal, unordered;
- /* The format type should already have been checked: */
+ /* The format type has already been checked: */
switch (fmt)
{
case fmt_single:
{
- sim_fpu wop1;
- sim_fpu wop2;
sim_fpu_32to (&wop1, op1);
sim_fpu_32to (&wop2, op2);
- boolean = sim_fpu_is_eq (&wop1, &wop2);
break;
}
case fmt_double:
{
- sim_fpu wop1;
- sim_fpu wop2;
sim_fpu_64to (&wop1, op1);
sim_fpu_64to (&wop2, op2);
- boolean = sim_fpu_is_eq (&wop1, &wop2);
break;
}
default:
abort ();
}
-#ifdef DEBUG
- printf ("DBG: Equal: returning %d (format = %s)\n",
- boolean, fpu_format_name (fmt));
-#endif /* DEBUG */
-
- return (boolean);
+ if (sim_fpu_is_nan (&wop1) || sim_fpu_is_nan (&wop2))
+ {
+ if ((cond & (1 << 3)) ||
+ sim_fpu_is_snan (&wop1) || sim_fpu_is_snan (&wop2))
+ status = sim_fpu_status_invalid_snan;
+ less = 0;
+ equal = 0;
+ unordered = 1;
+ }
+ else
+ {
+ if (abs)
+ {
+ status |= sim_fpu_abs (&wop1, &wop1);
+ status |= sim_fpu_abs (&wop2, &wop2);
+ }
+ equal = sim_fpu_is_eq (&wop1, &wop2);
+ less = !equal && sim_fpu_is_lt (&wop1, &wop2);
+ unordered = 0;
+ }
+ *condition = (((cond & (1 << 2)) && less)
+ || ((cond & (1 << 1)) && equal)
+ || ((cond & (1 << 0)) && unordered));
+ return status;
}
-uword64
-AbsoluteValue (op, fmt)
- uword64 op;
- FP_formats fmt;
+void
+fp_cmp(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt,
+ int abs,
+ int cond,
+ int cc)
{
- uword64 result = 0;
+ sim_fpu_status status = 0;
-#ifdef DEBUG
- printf ("DBG: AbsoluteValue: %s: op = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
- /* The format type should already have been checked: */
+ /* The format type should already have been checked. The FCSR is
+ updated before the condition codes so that any exceptions will
+ be signalled before the condition codes are changed. */
switch (fmt)
{
case fmt_single:
+ case fmt_double:
{
- sim_fpu wop;
- unsigned32 ans;
- sim_fpu_32to (&wop, op);
- sim_fpu_abs (&wop, &wop);
- sim_fpu_to32 (&ans, &wop);
- result = ans;
+ int result;
+ status = fp_test(op1, op2, fmt, abs, cond, &result);
+ update_fcsr (cpu, cia, status);
+ SETFCC (cc, result);
break;
}
- case fmt_double:
+ case fmt_ps:
{
- sim_fpu wop;
- unsigned64 ans;
- sim_fpu_64to (&wop, op);
- sim_fpu_abs (&wop, &wop);
- sim_fpu_to64 (&ans, &wop);
- result = ans;
+ int result0, result1;
+ status = fp_test(FP_PS_lower (op1), FP_PS_lower (op2), fmt_single,
+ abs, cond, &result0);
+ status |= fp_test(FP_PS_upper (op1), FP_PS_upper (op2), fmt_single,
+ abs, cond, &result1);
+ update_fcsr (cpu, cia, status);
+ SETFCC (cc, result0);
+ SETFCC (cc+1, result1);
break;
}
default:
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
-
- return (result);
}
-uword64
-Negate (op, fmt)
- uword64 op;
- FP_formats fmt;
-{
- uword64 result = 0;
-#ifdef DEBUG
- printf ("DBG: Negate: %s: op = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
+/* Basic arithmetic operations. */
+
+static unsigned64
+fp_unary(sim_cpu *cpu,
+ address_word cia,
+ int (*sim_fpu_op)(sim_fpu *, const sim_fpu *),
+ unsigned64 op,
+ FP_formats fmt)
+{
+ sim_fpu wop;
+ sim_fpu ans;
+ sim_fpu_round round = rounding_mode (GETRM());
+ sim_fpu_denorm denorm = denorm_mode (cpu);
+ sim_fpu_status status = 0;
+ unsigned64 result = 0;
- /* The format type should already have been checked: */
+ /* The format type has already been checked: */
switch (fmt)
{
case fmt_single:
{
- sim_fpu wop;
- unsigned32 ans;
+ unsigned32 res;
sim_fpu_32to (&wop, op);
- sim_fpu_neg (&wop, &wop);
- sim_fpu_to32 (&ans, &wop);
- result = ans;
+ status |= (*sim_fpu_op) (&ans, &wop);
+ status |= sim_fpu_round_32 (&ans, round, denorm);
+ sim_fpu_to32 (&res, &ans);
+ result = res;
break;
}
case fmt_double:
{
- sim_fpu wop;
- unsigned64 ans;
+ unsigned64 res;
sim_fpu_64to (&wop, op);
- sim_fpu_neg (&wop, &wop);
- sim_fpu_to64 (&ans, &wop);
- result = ans;
+ status |= (*sim_fpu_op) (&ans, &wop);
+ status |= sim_fpu_round_64 (&ans, round, denorm);
+ sim_fpu_to64 (&res, &ans);
+ result = res;
+ break;
+ }
+ case fmt_ps:
+ {
+ int status_u = 0, status_l = 0;
+ unsigned32 res_u, res_l;
+ sim_fpu_32to (&wop, FP_PS_upper(op));
+ status_u |= (*sim_fpu_op) (&ans, &wop);
+ sim_fpu_to32 (&res_u, &ans);
+ sim_fpu_32to (&wop, FP_PS_lower(op));
+ status_l |= (*sim_fpu_op) (&ans, &wop);
+ sim_fpu_to32 (&res_l, &ans);
+ result = FP_PS_cat(res_u, res_l);
+ status = status_u | status_l;
break;
}
default:
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
- return (result);
+ update_fcsr (cpu, cia, status);
+ return result;
}
-uword64
-Add (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
+static unsigned64
+fp_binary(sim_cpu *cpu,
+ address_word cia,
+ int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
{
- uword64 result = 0;
-
-#ifdef DEBUG
- printf ("DBG: Add: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
-
- /* The format type should already have been checked: */
+ sim_fpu wop1;
+ sim_fpu wop2;
+ sim_fpu ans;
+ sim_fpu_round round = rounding_mode (GETRM());
+ sim_fpu_denorm denorm = denorm_mode (cpu);
+ sim_fpu_status status = 0;
+ unsigned64 result = 0;
+
+ /* The format type has already been checked: */
switch (fmt)
{
case fmt_single:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned32 res;
sim_fpu_32to (&wop1, op1);
sim_fpu_32to (&wop2, op2);
- sim_fpu_add (&ans, &wop1, &wop2);
+ status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ status |= sim_fpu_round_32 (&ans, round, denorm);
sim_fpu_to32 (&res, &ans);
result = res;
break;
}
case fmt_double:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned64 res;
sim_fpu_64to (&wop1, op1);
sim_fpu_64to (&wop2, op2);
- sim_fpu_add (&ans, &wop1, &wop2);
+ status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ status |= sim_fpu_round_64 (&ans, round, denorm);
sim_fpu_to64 (&res, &ans);
result = res;
break;
}
+ case fmt_ps:
+ {
+ int status_u = 0, status_l = 0;
+ unsigned32 res_u, res_l;
+ sim_fpu_32to (&wop1, FP_PS_upper(op1));
+ sim_fpu_32to (&wop2, FP_PS_upper(op2));
+ status_u |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ sim_fpu_to32 (&res_u, &ans);
+ sim_fpu_32to (&wop1, FP_PS_lower(op1));
+ sim_fpu_32to (&wop2, FP_PS_lower(op2));
+ status_l |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ sim_fpu_to32 (&res_l, &ans);
+ result = FP_PS_cat(res_u, res_l);
+ status = status_u | status_l;
+ break;
+ }
default:
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
-#ifdef DEBUG
- printf ("DBG: Add: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
- return (result);
+ update_fcsr (cpu, cia, status);
+ return result;
}
-uword64
-Sub (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
+/* Common MAC code for single operands (.s or .d), defers setting FCSR. */
+static sim_fpu_status
+inner_mac(int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ int scale,
+ int negate,
+ FP_formats fmt,
+ sim_fpu_round round,
+ sim_fpu_denorm denorm,
+ unsigned64 *result)
{
- uword64 result = 0;
-
-#ifdef DEBUG
- printf ("DBG: Sub: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+ sim_fpu wop1;
+ sim_fpu wop2;
+ sim_fpu ans;
+ sim_fpu_status status = 0;
+ sim_fpu_status op_status;
+ unsigned64 temp = 0;
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
-
- /* The format type should already have been checked: */
switch (fmt)
{
case fmt_single:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned32 res;
sim_fpu_32to (&wop1, op1);
sim_fpu_32to (&wop2, op2);
- sim_fpu_sub (&ans, &wop1, &wop2);
+ status |= sim_fpu_mul (&ans, &wop1, &wop2);
+ if (scale != 0 && sim_fpu_is_number (&ans)) /* number or denorm */
+ ans.normal_exp += scale;
+ status |= sim_fpu_round_32 (&ans, round, denorm);
+ wop1 = ans;
+ op_status = 0;
+ sim_fpu_32to (&wop2, op3);
+ op_status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ op_status |= sim_fpu_round_32 (&ans, round, denorm);
+ status |= op_status;
+ if (negate)
+ {
+ wop1 = ans;
+ op_status = sim_fpu_neg (&ans, &wop1);
+ op_status |= sim_fpu_round_32 (&ans, round, denorm);
+ status |= op_status;
+ }
sim_fpu_to32 (&res, &ans);
- result = res;
+ temp = res;
+ break;
}
- break;
case fmt_double:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned64 res;
sim_fpu_64to (&wop1, op1);
sim_fpu_64to (&wop2, op2);
- sim_fpu_sub (&ans, &wop1, &wop2);
+ status |= sim_fpu_mul (&ans, &wop1, &wop2);
+ if (scale != 0 && sim_fpu_is_number (&ans)) /* number or denorm */
+ ans.normal_exp += scale;
+ status |= sim_fpu_round_64 (&ans, round, denorm);
+ wop1 = ans;
+ op_status = 0;
+ sim_fpu_64to (&wop2, op3);
+ op_status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ op_status |= sim_fpu_round_64 (&ans, round, denorm);
+ status |= op_status;
+ if (negate)
+ {
+ wop1 = ans;
+ op_status = sim_fpu_neg (&ans, &wop1);
+ op_status |= sim_fpu_round_64 (&ans, round, denorm);
+ status |= op_status;
+ }
sim_fpu_to64 (&res, &ans);
- result = res;
+ temp = res;
+ break;
}
- break;
default:
fprintf (stderr, "Bad switch\n");
abort ();
}
-
-#ifdef DEBUG
- printf ("DBG: Sub: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
- return (result);
+ *result = temp;
+ return status;
}
-uword64
-Multiply (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
+/* Common implementation of madd, nmadd, msub, nmsub that does
+ intermediate rounding per spec. Also used for recip2 and rsqrt2,
+ which are transformed into equivalent nmsub operations. The scale
+ argument is an adjustment to the exponent of the intermediate
+ product op1*op2. It is currently non-zero for rsqrt2 (-1), which
+ requires an effective division by 2. */
+static unsigned64
+fp_mac(sim_cpu *cpu,
+ address_word cia,
+ int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ int scale,
+ int negate,
+ FP_formats fmt)
{
- uword64 result = 0;
+ sim_fpu_round round = rounding_mode (GETRM());
+ sim_fpu_denorm denorm = denorm_mode (cpu);
+ sim_fpu_status status = 0;
+ unsigned64 result = 0;
-#ifdef DEBUG
- printf ("DBG: Multiply: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+ /* The format type has already been checked: */
+ switch (fmt)
+ {
+ case fmt_single:
+ case fmt_double:
+ status = inner_mac(sim_fpu_op, op1, op2, op3, scale,
+ negate, fmt, round, denorm, &result);
+ break;
+ case fmt_ps:
+ {
+ int status_u, status_l;
+ unsigned64 result_u, result_l;
+ status_u = inner_mac(sim_fpu_op, FP_PS_upper(op1), FP_PS_upper(op2),
+ FP_PS_upper(op3), scale, negate, fmt_single,
+ round, denorm, &result_u);
+ status_l = inner_mac(sim_fpu_op, FP_PS_lower(op1), FP_PS_lower(op2),
+ FP_PS_lower(op3), scale, negate, fmt_single,
+ round, denorm, &result_l);
+ result = FP_PS_cat(result_u, result_l);
+ status = status_u | status_l;
+ break;
+ }
+ default:
+ sim_io_eprintf (SD, "Bad switch\n");
+ abort ();
+ }
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
+ update_fcsr (cpu, cia, status);
+ return result;
+}
+
+/* Common rsqrt code for single operands (.s or .d), intermediate rounding. */
+static sim_fpu_status
+inner_rsqrt(unsigned64 op1,
+ FP_formats fmt,
+ sim_fpu_round round,
+ sim_fpu_denorm denorm,
+ unsigned64 *result)
+{
+ sim_fpu wop1;
+ sim_fpu ans;
+ sim_fpu_status status = 0;
+ sim_fpu_status op_status;
+ unsigned64 temp = 0;
- /* The format type should already have been checked: */
switch (fmt)
{
case fmt_single:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned32 res;
sim_fpu_32to (&wop1, op1);
- sim_fpu_32to (&wop2, op2);
- sim_fpu_mul (&ans, &wop1, &wop2);
+ status |= sim_fpu_sqrt (&ans, &wop1);
+ status |= sim_fpu_round_32 (&ans, status, round);
+ wop1 = ans;
+ op_status = sim_fpu_inv (&ans, &wop1);
+ op_status |= sim_fpu_round_32 (&ans, round, denorm);
sim_fpu_to32 (&res, &ans);
- result = res;
+ temp = res;
+ status |= op_status;
break;
}
case fmt_double:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
unsigned64 res;
sim_fpu_64to (&wop1, op1);
- sim_fpu_64to (&wop2, op2);
- sim_fpu_mul (&ans, &wop1, &wop2);
+ status |= sim_fpu_sqrt (&ans, &wop1);
+ status |= sim_fpu_round_64 (&ans, round, denorm);
+ wop1 = ans;
+ op_status = sim_fpu_inv (&ans, &wop1);
+ op_status |= sim_fpu_round_64 (&ans, round, denorm);
sim_fpu_to64 (&res, &ans);
- result = res;
+ temp = res;
+ status |= op_status;
break;
}
default:
fprintf (stderr, "Bad switch\n");
abort ();
}
-
-#ifdef DEBUG
- printf ("DBG: Multiply: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
- return (result);
+ *result = temp;
+ return status;
}
-uword64
-Divide (op1, op2, fmt)
- uword64 op1;
- uword64 op2;
- FP_formats fmt;
+static unsigned64
+fp_inv_sqrt(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ FP_formats fmt)
{
- uword64 result = 0;
+ sim_fpu_round round = rounding_mode (GETRM());
+ sim_fpu_round denorm = denorm_mode (cpu);
+ sim_fpu_status status = 0;
+ unsigned64 result = 0;
-#ifdef DEBUG
- printf ("DBG: Divide: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
-
- /* The format type should already have been checked: */
+ /* The format type has already been checked: */
switch (fmt)
{
case fmt_single:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
- unsigned32 res;
- sim_fpu_32to (&wop1, op1);
- sim_fpu_32to (&wop2, op2);
- sim_fpu_div (&ans, &wop1, &wop2);
- sim_fpu_to32 (&res, &ans);
- result = res;
- break;
- }
case fmt_double:
+ status = inner_rsqrt (op1, fmt, round, denorm, &result);
+ break;
+ case fmt_ps:
{
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu ans;
- unsigned64 res;
- sim_fpu_64to (&wop1, op1);
- sim_fpu_64to (&wop2, op2);
- sim_fpu_div (&ans, &wop1, &wop2);
- sim_fpu_to64 (&res, &ans);
- result = res;
+ int status_u, status_l;
+ unsigned64 result_u, result_l;
+ status_u = inner_rsqrt (FP_PS_upper(op1), fmt_single, round, denorm,
+ &result_u);
+ status_l = inner_rsqrt (FP_PS_lower(op1), fmt_single, round, denorm,
+ &result_l);
+ result = FP_PS_cat(result_u, result_l);
+ status = status_u | status_l;
break;
}
default:
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
-#ifdef DEBUG
- printf ("DBG: Divide: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
+ update_fcsr (cpu, cia, status);
+ return result;
+}
- return (result);
+
+unsigned64
+fp_abs(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
+{
+ return fp_unary(cpu, cia, &sim_fpu_abs, op, fmt);
}
-uword64 UNUSED
-Recip (op, fmt)
- uword64 op;
- FP_formats fmt;
+unsigned64
+fp_neg(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
{
- uword64 result = 0;
+ return fp_unary(cpu, cia, &sim_fpu_neg, op, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: Recip: %s: op = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
+unsigned64
+fp_add(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary(cpu, cia, &sim_fpu_add, op1, op2, fmt);
+}
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
+unsigned64
+fp_sub(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary(cpu, cia, &sim_fpu_sub, op1, op2, fmt);
+}
- /* The format type should already have been checked: */
- switch (fmt)
- {
- case fmt_single:
- {
- sim_fpu wop;
- sim_fpu ans;
- unsigned32 res;
- sim_fpu_32to (&wop, op);
- sim_fpu_inv (&ans, &wop);
- sim_fpu_to32 (&res, &ans);
- result = res;
- break;
- }
- case fmt_double:
- {
- sim_fpu wop;
- sim_fpu ans;
- unsigned64 res;
- sim_fpu_64to (&wop, op);
- sim_fpu_inv (&ans, &wop);
- sim_fpu_to64 (&res, &ans);
- result = res;
- break;
- }
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
- }
+unsigned64
+fp_mul(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary(cpu, cia, &sim_fpu_mul, op1, op2, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: Recip: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
+unsigned64
+fp_div(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary(cpu, cia, &sim_fpu_div, op1, op2, fmt);
+}
- return (result);
+unsigned64
+fp_recip(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
+{
+ return fp_unary(cpu, cia, &sim_fpu_inv, op, fmt);
}
-uword64
-SquareRoot (op, fmt)
- uword64 op;
- FP_formats fmt;
+unsigned64
+fp_sqrt(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
{
- uword64 result = 0;
+ return fp_unary(cpu, cia, &sim_fpu_sqrt, op, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: SquareRoot: %s: op = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
+unsigned64
+fp_rsqrt(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
+{
+ return fp_inv_sqrt(cpu, cia, op, fmt);
+}
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
+unsigned64
+fp_madd(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ FP_formats fmt)
+{
+ return fp_mac(cpu, cia, &sim_fpu_add, op1, op2, op3, 0, 0, fmt);
+}
- /* The format type should already have been checked: */
- switch (fmt)
- {
- case fmt_single:
- {
- sim_fpu wop;
- sim_fpu ans;
- unsigned32 res;
- sim_fpu_32to (&wop, op);
- sim_fpu_sqrt (&ans, &wop);
- sim_fpu_to32 (&res, &ans);
- result = res;
- break;
- }
- case fmt_double:
- {
- sim_fpu wop;
- sim_fpu ans;
- unsigned64 res;
- sim_fpu_64to (&wop, op);
- sim_fpu_sqrt (&ans, &wop);
- sim_fpu_to64 (&res, &ans);
- result = res;
- break;
- }
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
- }
+unsigned64
+fp_msub(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ FP_formats fmt)
+{
+ return fp_mac(cpu, cia, &sim_fpu_sub, op1, op2, op3, 0, 0, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: SquareRoot: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
+unsigned64
+fp_nmadd(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ FP_formats fmt)
+{
+ return fp_mac(cpu, cia, &sim_fpu_add, op1, op2, op3, 0, 1, fmt);
+}
- return (result);
+unsigned64
+fp_nmsub(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ unsigned64 op3,
+ FP_formats fmt)
+{
+ return fp_mac(cpu, cia, &sim_fpu_sub, op1, op2, op3, 0, 1, fmt);
}
-#if 0
-uword64
-Max (uword64 op1,
- uword64 op2,
- FP_formats fmt)
+
+/* MIPS-3D ASE operations. */
+
+/* Variant of fp_binary for *r.ps MIPS-3D operations. */
+static unsigned64
+fp_binary_r(sim_cpu *cpu,
+ address_word cia,
+ int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+ unsigned64 op1,
+ unsigned64 op2)
{
- int cmp;
+ sim_fpu wop1;
+ sim_fpu wop2;
+ sim_fpu ans;
+ sim_fpu_round round = rounding_mode (GETRM ());
+ sim_fpu_denorm denorm = denorm_mode (cpu);
+ sim_fpu_status status_u, status_l;
unsigned64 result;
+ unsigned32 res_u, res_l;
+
+ /* The format must be fmt_ps. */
+ status_u = 0;
+ sim_fpu_32to (&wop1, FP_PS_upper (op1));
+ sim_fpu_32to (&wop2, FP_PS_lower (op1));
+ status_u |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ status_u |= sim_fpu_round_32 (&ans, round, denorm);
+ sim_fpu_to32 (&res_u, &ans);
+ status_l = 0;
+ sim_fpu_32to (&wop1, FP_PS_upper (op2));
+ sim_fpu_32to (&wop2, FP_PS_lower (op2));
+ status_l |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+ status_l |= sim_fpu_round_32 (&ans, round, denorm);
+ sim_fpu_to32 (&res_l, &ans);
+ result = FP_PS_cat (res_u, res_l);
+
+ update_fcsr (cpu, cia, status_u | status_l);
+ return result;
+}
-#ifdef DEBUG
- printf ("DBG: Max: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+unsigned64
+fp_add_r(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary_r (cpu, cia, &sim_fpu_add, op1, op2);
+}
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
+unsigned64
+fp_mul_r(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ return fp_binary_r (cpu, cia, &sim_fpu_mul, op1, op2);
+}
+
+#define NR_FRAC_GUARD (60)
+#define IMPLICIT_1 LSBIT64 (NR_FRAC_GUARD)
+
+static int
+fpu_inv1(sim_fpu *f, const sim_fpu *l)
+{
+ static const sim_fpu sim_fpu_one = {
+ sim_fpu_class_number, 0, IMPLICIT_1, 0
+ };
+ int status = 0;
+ sim_fpu t;
+
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_maxfp;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ if (sim_fpu_is_infinity (l))
+ {
+ *f = sim_fpu_zero;
+ f->sign = l->sign;
+ return status;
+ }
+ status |= sim_fpu_div (f, &sim_fpu_one, l);
+ return status;
+}
+
+static int
+fpu_inv1_32(sim_fpu *f, const sim_fpu *l)
+{
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_max32;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ return fpu_inv1 (f, l);
+}
- /* The format type should already have been checked: */
+static int
+fpu_inv1_64(sim_fpu *f, const sim_fpu *l)
+{
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_max64;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ return fpu_inv1 (f, l);
+}
+
+unsigned64
+fp_recip1(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
+{
switch (fmt)
{
case fmt_single:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_32to (&wop1, op1);
- sim_fpu_32to (&wop2, op2);
- cmp = sim_fpu_cmp (&wop1, &wop2);
- break;
- }
+ case fmt_ps:
+ return fp_unary (cpu, cia, &fpu_inv1_32, op, fmt);
case fmt_double:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_64to (&wop1, op1);
- sim_fpu_64to (&wop2, op2);
- cmp = sim_fpu_cmp (&wop1, &wop2);
- break;
- }
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
+ return fp_unary (cpu, cia, &fpu_inv1_64, op, fmt);
}
+ return 0;
+}
- switch (cmp)
+unsigned64
+fp_recip2(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ static const unsigned64 one_single = UNSIGNED64 (0x3F800000);
+ static const unsigned64 one_double = UNSIGNED64 (0x3FF0000000000000);
+ static const unsigned64 one_ps = (one_single << 32 | one_single);
+ unsigned64 one;
+
+ /* Implemented as nmsub fd, 1, fs, ft. */
+ switch (fmt)
{
- case SIM_FPU_IS_SNAN:
- case SIM_FPU_IS_QNAN:
- result = op1;
- case SIM_FPU_IS_NINF:
- case SIM_FPU_IS_NNUMBER:
- case SIM_FPU_IS_NDENORM:
- case SIM_FPU_IS_NZERO:
- result = op2; /* op1 - op2 < 0 */
- case SIM_FPU_IS_PINF:
- case SIM_FPU_IS_PNUMBER:
- case SIM_FPU_IS_PDENORM:
- case SIM_FPU_IS_PZERO:
- result = op1; /* op1 - op2 > 0 */
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
+ case fmt_single: one = one_single; break;
+ case fmt_double: one = one_double; break;
+ case fmt_ps: one = one_ps; break;
+ default: one = 0; abort ();
}
+ return fp_mac (cpu, cia, &sim_fpu_sub, op1, op2, one, 0, 1, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: Max: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
+static int
+fpu_inv_sqrt1(sim_fpu *f, const sim_fpu *l)
+{
+ static const sim_fpu sim_fpu_one = {
+ sim_fpu_class_number, 0, IMPLICIT_1, 0
+ };
+ int status = 0;
+ sim_fpu t;
- return (result);
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_maxfp;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ if (sim_fpu_is_infinity (l))
+ {
+ if (!l->sign)
+ {
+ f->class = sim_fpu_class_zero;
+ f->sign = 0;
+ }
+ else
+ {
+ *f = sim_fpu_qnan;
+ status = sim_fpu_status_invalid_sqrt;
+ }
+ return status;
+ }
+ status |= sim_fpu_sqrt (&t, l);
+ status |= sim_fpu_div (f, &sim_fpu_one, &t);
+ return status;
}
-#endif
-#if 0
-uword64
-Min (uword64 op1,
- uword64 op2,
- FP_formats fmt)
+static int
+fpu_inv_sqrt1_32(sim_fpu *f, const sim_fpu *l)
{
- int cmp;
- unsigned64 result;
-
-#ifdef DEBUG
- printf ("DBG: Min: %s: op1 = 0x%s : op2 = 0x%s\n",
- fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_max32;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ return fpu_inv_sqrt1 (f, l);
+}
- /* The registers must specify FPRs valid for operands of type
- "fmt". If they are not valid, the result is undefined. */
+static int
+fpu_inv_sqrt1_64(sim_fpu *f, const sim_fpu *l)
+{
+ if (sim_fpu_is_zero (l))
+ {
+ *f = sim_fpu_max64;
+ f->sign = l->sign;
+ return sim_fpu_status_invalid_div0;
+ }
+ return fpu_inv_sqrt1 (f, l);
+}
- /* The format type should already have been checked: */
+unsigned64
+fp_rsqrt1(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op,
+ FP_formats fmt)
+{
switch (fmt)
{
case fmt_single:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_32to (&wop1, op1);
- sim_fpu_32to (&wop2, op2);
- cmp = sim_fpu_cmp (&wop1, &wop2);
- break;
- }
+ case fmt_ps:
+ return fp_unary (cpu, cia, &fpu_inv_sqrt1_32, op, fmt);
case fmt_double:
- {
- sim_fpu wop1;
- sim_fpu wop2;
- sim_fpu_64to (&wop1, op1);
- sim_fpu_64to (&wop2, op2);
- cmp = sim_fpu_cmp (&wop1, &wop2);
- break;
- }
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
+ return fp_unary (cpu, cia, &fpu_inv_sqrt1_64, op, fmt);
}
+ return 0;
+}
+
+unsigned64
+fp_rsqrt2(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ static const unsigned64 half_single = UNSIGNED64 (0x3F000000);
+ static const unsigned64 half_double = UNSIGNED64 (0x3FE0000000000000);
+ static const unsigned64 half_ps = (half_single << 32 | half_single);
+ unsigned64 half;
- switch (cmp)
+ /* Implemented as (nmsub fd, 0.5, fs, ft)/2, where the divide is
+ done by scaling the exponent during multiply. */
+ switch (fmt)
{
- case SIM_FPU_IS_SNAN:
- case SIM_FPU_IS_QNAN:
- result = op1;
- case SIM_FPU_IS_NINF:
- case SIM_FPU_IS_NNUMBER:
- case SIM_FPU_IS_NDENORM:
- case SIM_FPU_IS_NZERO:
- result = op1; /* op1 - op2 < 0 */
- case SIM_FPU_IS_PINF:
- case SIM_FPU_IS_PNUMBER:
- case SIM_FPU_IS_PDENORM:
- case SIM_FPU_IS_PZERO:
- result = op2; /* op1 - op2 > 0 */
- default:
- fprintf (stderr, "Bad switch\n");
- abort ();
+ case fmt_single: half = half_single; break;
+ case fmt_double: half = half_double; break;
+ case fmt_ps: half = half_ps; break;
+ default: half = 0; abort ();
}
+ return fp_mac (cpu, cia, &sim_fpu_sub, op1, op2, half, -1, 1, fmt);
+}
-#ifdef DEBUG
- printf ("DBG: Min: returning 0x%s (format = %s)\n",
- pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
- return (result);
-}
-#endif
+/* Conversion operations. */
uword64
-convert (SIM_DESC sd,
- sim_cpu *cpu,
+convert (sim_cpu *cpu,
address_word cia,
int rm,
uword64 op,
FP_formats to)
{
sim_fpu wop;
- sim_fpu_round round;
+ sim_fpu_round round = rounding_mode (rm);
+ sim_fpu_denorm denorm = denorm_mode (cpu);
unsigned32 result32;
unsigned64 result64;
-
-#ifdef DEBUG
-#if 0 /* FIXME: doesn't compile */
- printf ("DBG: Convert: mode %s : op 0x%s : from %s : to %s : (PC = 0x%s)\n",
- fpu_rounding_mode_name (rm), pr_addr (op), fpu_format_name (from),
- fpu_format_name (to), pr_addr (IPC));
-#endif
-#endif /* DEBUG */
-
- switch (rm)
- {
- case FP_RM_NEAREST:
- /* Round result to nearest representable value. When two
- representable values are equally near, round to the value
- that has a least significant bit of zero (i.e. is even). */
- round = sim_fpu_round_near;
- break;
- case FP_RM_TOZERO:
- /* Round result to the value closest to, and not greater in
- magnitude than, the result. */
- round = sim_fpu_round_zero;
- break;
- case FP_RM_TOPINF:
- /* Round result to the value closest to, and not less than,
- the result. */
- round = sim_fpu_round_up;
- break;
-
- case FP_RM_TOMINF:
- /* Round result to the value closest to, and not greater than,
- the result. */
- round = sim_fpu_round_down;
- break;
- default:
- round = 0;
- fprintf (stderr, "Bad switch\n");
- abort ();
- }
+ sim_fpu_status status = 0;
/* Convert the input to sim_fpu internal format */
switch (from)
sim_fpu_32to (&wop, op);
break;
case fmt_word:
- sim_fpu_i32to (&wop, op, round);
+ status = sim_fpu_i32to (&wop, op, round);
break;
case fmt_long:
- sim_fpu_i64to (&wop, op, round);
+ status = sim_fpu_i64to (&wop, op, round);
break;
default:
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
/* The value WOP is converted to the destination format, rounding
using mode RM. When the destination is a fixed-point format, then
a source value of Infinity, NaN or one which would round to an
- integer outside the fixed point range then an IEEE Invalid
- Operation condition is raised. */
+ integer outside the fixed point range then an IEEE Invalid Operation
+ condition is raised. Not used if destination format is PS. */
switch (to)
{
case fmt_single:
- sim_fpu_round_32 (&wop, round, 0);
+ status |= sim_fpu_round_32 (&wop, round, denorm);
+ /* For a NaN, normalize mantissa bits (cvt.s.d can't preserve them) */
+ if (sim_fpu_is_qnan (&wop))
+ wop = sim_fpu_qnan;
sim_fpu_to32 (&result32, &wop);
result64 = result32;
break;
case fmt_double:
- sim_fpu_round_64 (&wop, round, 0);
+ status |= sim_fpu_round_64 (&wop, round, denorm);
+ /* For a NaN, normalize mantissa bits (make cvt.d.s consistent) */
+ if (sim_fpu_is_qnan (&wop))
+ wop = sim_fpu_qnan;
sim_fpu_to64 (&result64, &wop);
break;
case fmt_word:
- sim_fpu_to32i (&result32, &wop, round);
+ status |= sim_fpu_to32i (&result32, &wop, round);
result64 = result32;
break;
case fmt_long:
- sim_fpu_to64i (&result64, &wop, round);
+ status |= sim_fpu_to64i (&result64, &wop, round);
break;
default:
result64 = 0;
- fprintf (stderr, "Bad switch\n");
+ sim_io_eprintf (SD, "Bad switch\n");
abort ();
}
-#ifdef DEBUG
- printf ("DBG: Convert: returning 0x%s (to format = %s)\n",
- pr_addr (result64), fpu_format_name (to));
-#endif /* DEBUG */
+ update_fcsr (cpu, cia, status);
+ return result64;
+}
+
+unsigned64
+ps_lower(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op)
+{
+ return FP_PS_lower (op);
+}
+
+unsigned64
+ps_upper(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op)
+{
+ return FP_PS_upper(op);
+}
+
+unsigned64
+pack_ps(sim_cpu *cpu,
+ address_word cia,
+ unsigned64 op1,
+ unsigned64 op2,
+ FP_formats fmt)
+{
+ unsigned64 result = 0;
+
+ /* The registers must specify FPRs valid for operands of type
+ "fmt". If they are not valid, the result is undefined. */
+
+ /* The format type should already have been checked: */
+ switch (fmt)
+ {
+ case fmt_single:
+ {
+ sim_fpu wop;
+ unsigned32 res_u, res_l;
+ sim_fpu_32to (&wop, op1);
+ sim_fpu_to32 (&res_u, &wop);
+ sim_fpu_32to (&wop, op2);
+ sim_fpu_to32 (&res_l, &wop);
+ result = FP_PS_cat(res_u, res_l);
+ break;
+ }
+ default:
+ sim_io_eprintf (SD, "Bad switch\n");
+ abort ();
+ }
+
+ return result;
+}
+
+unsigned64
+convert_ps (sim_cpu *cpu,
+ address_word cia,
+ int rm,
+ unsigned64 op,
+ FP_formats from,
+ FP_formats to)
+{
+ sim_fpu wop_u, wop_l;
+ sim_fpu_round round = rounding_mode (rm);
+ sim_fpu_denorm denorm = denorm_mode (cpu);
+ unsigned32 res_u, res_l;
+ unsigned64 result;
+ sim_fpu_status status_u = 0, status_l = 0;
+
+ /* As convert, but used only for paired values (formats PS, PW) */
+
+ /* Convert the input to sim_fpu internal format */
+ switch (from)
+ {
+ case fmt_word: /* fmt_pw */
+ sim_fpu_i32to (&wop_u, (op >> 32) & (unsigned)0xFFFFFFFF, round);
+ sim_fpu_i32to (&wop_l, op & (unsigned)0xFFFFFFFF, round);
+ break;
+ case fmt_ps:
+ sim_fpu_32to (&wop_u, FP_PS_upper(op));
+ sim_fpu_32to (&wop_l, FP_PS_lower(op));
+ break;
+ default:
+ sim_io_eprintf (SD, "Bad switch\n");
+ abort ();
+ }
+
+ /* Convert sim_fpu format into the output */
+ switch (to)
+ {
+ case fmt_word: /* fmt_pw */
+ status_u |= sim_fpu_to32i (&res_u, &wop_u, round);
+ status_l |= sim_fpu_to32i (&res_l, &wop_l, round);
+ result = (((unsigned64)res_u) << 32) | (unsigned64)res_l;
+ break;
+ case fmt_ps:
+ status_u |= sim_fpu_round_32 (&wop_u, 0, round);
+ status_l |= sim_fpu_round_32 (&wop_l, 0, round);
+ sim_fpu_to32 (&res_u, &wop_u);
+ sim_fpu_to32 (&res_l, &wop_l);
+ result = FP_PS_cat(res_u, res_l);
+ break;
+ default:
+ result = 0;
+ sim_io_eprintf (SD, "Bad switch\n");
+ abort ();
+ }
- return (result64);
+ update_fcsr (cpu, cia, status_u | status_l);
+ return result;
}
static const char *
return "word";
case fmt_long:
return "long";
+ case fmt_ps:
+ return "ps";
case fmt_unknown:
return "<unknown>";
case fmt_uninterpreted:
#include "getopt.h"
#include "libiberty.h"
#include "bfd.h"
-#include "callback.h" /* GDB simulator callback interface */
-#include "remote-sim.h" /* GDB simulator interface */
+#include "gdb/callback.h" /* GDB simulator callback interface */
+#include "gdb/remote-sim.h" /* GDB simulator interface */
#include "sysdep.h"
{
if (rn < 32)
cpu->register_widths[rn] = WITH_TARGET_WORD_BITSIZE;
- else if ((rn >= FGRIDX) && (rn < (FGRIDX + NR_FGR)))
+ else if ((rn >= FGR_BASE) && (rn < (FGR_BASE + NR_FGR)))
cpu->register_widths[rn] = WITH_TARGET_FLOATING_POINT_BITSIZE;
else if ((rn >= 33) && (rn <= 37))
cpu->register_widths[rn] = WITH_TARGET_WORD_BITSIZE;
- if (rn >= FGRIDX && rn < FGRIDX + NR_FGR)
+ if (rn >= FGR_BASE && rn < FGR_BASE + NR_FGR)
{
- cpu->fpr_state[rn - FGRIDX] = fmt_uninterpreted;
+ cpu->fpr_state[rn - FGR_BASE] = fmt_uninterpreted;
if (cpu->register_widths[rn] == 32)
{
if (length == 8)
{
- cpu->fgr[rn - FGRIDX] =
+ cpu->fgr[rn - FGR_BASE] =
(unsigned32) T2H_8 (*(unsigned64*)memory);
return 8;
}
else
{
- cpu->fgr[rn - FGRIDX] = T2H_4 (*(unsigned32*)memory);
+ cpu->fgr[rn - FGR_BASE] = T2H_4 (*(unsigned32*)memory);
return 4;
}
}
else
{
- cpu->fgr[rn - FGRIDX] = T2H_8 (*(unsigned64*)memory);
+ cpu->fgr[rn - FGR_BASE] = T2H_8 (*(unsigned64*)memory);
return 8;
}
}
/* Any floating point register */
- if (rn >= FGRIDX && rn < FGRIDX + NR_FGR)
+ if (rn >= FGR_BASE && rn < FGR_BASE + NR_FGR)
{
if (cpu->register_widths[rn] == 32)
{
if (length == 8)
{
*(unsigned64*)memory =
- H2T_8 ((unsigned32) (cpu->fgr[rn - FGRIDX]));
+ H2T_8 ((unsigned32) (cpu->fgr[rn - FGR_BASE]));
return 8;
}
else
{
- *(unsigned32*)memory = H2T_4 (cpu->fgr[rn - FGRIDX]);
+ *(unsigned32*)memory = H2T_4 (cpu->fgr[rn - FGR_BASE]);
return 4;
}
}
else
{
- *(unsigned64*)memory = H2T_8 (cpu->fgr[rn - FGRIDX]);
+ *(unsigned64*)memory = H2T_8 (cpu->fgr[rn - FGR_BASE]);
return 8;
}
}
}
}
else
- address_present = 0;
+ {
+ address_present = 0;
+ address = -1; /* Dummy value. */
+ }
}
if (! strncmp (arg, "idt", 3))
break;
}
- case 28 : /* PMON flush_cache */
+ case 28: /* PMON flush_cache */
break;
case 55: /* void get_mem_info(unsigned int *ptr) */
break;
}
- case 158 : /* PMON printf */
+ case 158: /* PMON printf */
/* in: A0 = pointer to format string */
/* A1 = optional argument 1 */
/* A2 = optional argument 2 */
switch (exception) {
- case DebugBreakPoint :
+ case DebugBreakPoint:
if (! (Debug & Debug_DM))
{
if (INDELAYSLOT())
}
break;
- case ReservedInstruction :
+ case ReservedInstruction:
{
va_list ap;
unsigned int instruction;
sim_engine_halt (SD, CPU, NULL, PC,
sim_stopped, SIM_SIGTRAP);
- default : /* Unknown internal exception */
+ default: /* Unknown internal exception */
PC = EPC;
sim_engine_halt (SD, CPU, NULL, PC,
sim_stopped, SIM_SIGABRT);
// MIPS Application Specific Extensions (ASEs)
//
// Instructions for the ASEs are in separate .igen files.
+// ASEs add instructions on to a base ISA.
:model:::mips16:mips16: // m16.igen (and m16.dc)
+:model:::mips3d:mips3d: // mips3d.igen
+:model:::mdmx:mdmx: // mdmx.igen
+
+// Vendor Extensions
+//
+// Instructions specific to these extensions are in separate .igen files.
+// Extensions add instructions on to a base ISA.
+:model:::sb1:sb1: // sb1.igen
// Pseudo instructions known by IGEN
*vr5000:
{
if (GPR[RT] != 0)
- GPR[RD] = GPR[RS];
+ {
+ GPR[RD] = GPR[RS];
+ TRACE_ALU_RESULT (GPR[RD]);
+ }
}
*vr5000:
{
if (GPR[RT] == 0)
- GPR[RD] = GPR[RS];
+ {
+ GPR[RD] = GPR[RS];
+ TRACE_ALU_RESULT (GPR[RD]);
+ }
}
000001,5.RS,01110,16.IMMEDIATE:REGIMM:32::TNEI
-"tne r<RS>, <IMMEDIATE>"
+"tnei r<RS>, <IMMEDIATE>"
*mipsII:
*mipsIII:
*mipsIV:
case fmt_double: return "d";
case fmt_word: return "w";
case fmt_long: return "l";
- default: return "?";
- }
-}
-
-:%s::::X:int x
-{
- switch (x)
- {
- case 0: return "f";
- case 1: return "t";
+ case fmt_ps: return "ps";
default: return "?";
}
}
*mipsV:
*mips64:
{
-#if 0 /* XXX FIXME: FP code doesn't yet support paired single ops. */
if ((fmt != fmt_single) && (fmt != fmt_double)
&& (fmt != fmt_ps || (UserMode && (SR & (status_UX|status_PX)) == 0)))
SignalException (ReservedInstruction, insn);
-#else
- check_fmt (SD_, fmt, insn);
-#endif
}
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,AbsoluteValue(ValueFPR(FS,fmt),fmt));
+ StoreFPR (FD, fmt, AbsoluteValue (ValueFPR (FS, fmt), fmt));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Add(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+ StoreFPR (FD, fmt, Add (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
}
+010011,5.RS,5.FT,5.FS,5.FD,011,110:COP1X:64,f::ALNV.PS
+"alnv.ps f<FD>, f<FS>, f<FT>, r<RS>"
+*mipsV:
+*mips64:
+{
+ unsigned64 fs;
+ unsigned64 ft;
+ unsigned64 fd;
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ fs = ValueFPR (FS, fmt_ps);
+ if ((GPR[RS] & 0x3) != 0)
+ Unpredictable ();
+ if ((GPR[RS] & 0x4) == 0)
+ fd = fs;
+ else
+ {
+ ft = ValueFPR (FT, fmt_ps);
+ if (BigEndianCPU)
+ fd = PackPS (PSLower (fs), PSUpper (ft));
+ else
+ fd = PackPS (PSLower (ft), PSUpper (fs));
+ }
+ StoreFPR (FD, fmt_ps, fd);
+}
+
// BC1F
// BC1FL
}
-
-
-
-
-// C.EQ.S
-// C.EQ.D
-// ...
-
-:function:::void:do_c_cond_fmt:int fmt, int ft, int fs, int cc, int cond, instruction_word insn
-{
- int less;
- int equal;
- int unordered;
- int condition;
- unsigned64 ofs = ValueFPR (fs, fmt);
- unsigned64 oft = ValueFPR (ft, fmt);
- if (NaN (ofs, fmt) || NaN (oft, fmt))
- {
- if (FCSR & FP_ENABLE (IO))
- {
- FCSR |= FP_CAUSE (IO);
- SignalExceptionFPE ();
- }
- less = 0;
- equal = 0;
- unordered = 1;
- }
- else
- {
- less = Less (ofs, oft, fmt);
- equal = Equal (ofs, oft, fmt);
- unordered = 0;
- }
- condition = (((cond & (1 << 2)) && less)
- || ((cond & (1 << 1)) && equal)
- || ((cond & (1 << 0)) && unordered));
- SETFCC (cc, condition);
-}
-
010001,10,3.FMT,5.FT,5.FS,3.0,00,11,4.COND:COP1:32,f::C.cond.fmta
"c.%s<COND>.%s<FMT> f<FS>, f<FT>"
*mipsI:
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- do_c_cond_fmt (SD_, fmt, FT, FS, 0, COND, instruction_0);
+ Compare (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt, COND, 0);
+ TRACE_ALU_RESULT (ValueFCR (31));
}
010001,10,3.FMT,5.FT,5.FS,3.CC,00,11,4.COND:COP1:32,f::C.cond.fmtb
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- do_c_cond_fmt (SD_, fmt, FT, FS, CC, COND, instruction_0);
+ Compare (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt, COND, CC);
+ TRACE_ALU_RESULT (ValueFCR (31));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_long,Convert(FP_RM_TOPINF,ValueFPR(FS,fmt),fmt,fmt_long));
+ StoreFPR (FD, fmt_long, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
+ fmt_long));
}
010001,10,3.FMT,00000,5.FS,5.FD,001110:COP1:32,f::CEIL.W
+"ceil.w.%s<FMT> f<FD>, f<FS>"
*mipsII:
*mipsIII:
*mipsIV:
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_word,Convert(FP_RM_TOPINF,ValueFPR(FS,fmt),fmt,fmt_word));
+ StoreFPR (FD, fmt_word, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
+ fmt_word));
}
-// CFC1
-// CTC1
-010001,00,X,10,5.RT,5.FS,00000000000:COP1Sa:32,f::CxC1
-"c%s<X>c1 r<RT>, f<FS>"
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1a
+"cfc1 r<RT>, f<FS>"
*mipsI:
*mipsII:
*mipsIII:
{
check_fpu (SD_);
- if (X)
+ if (FS == 0)
+ PENDING_FILL (RT, EXTEND32 (FCR0));
+ else if (FS == 31)
+ PENDING_FILL (RT, EXTEND32 (FCR31));
+ /* else NOP */
+}
+
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1b
+"cfc1 r<RT>, f<FS>"
+*mipsIV:
+*vr4100:
+*vr5000:
+*r3900:
+{
+ check_fpu (SD_);
+ if (FS == 0 || FS == 31)
{
- if (FS == 0)
- PENDING_FILL(FCR0IDX,VL4_8(GPR[RT]));
- else if (FS == 31)
- PENDING_FILL(FCR31IDX,VL4_8(GPR[RT]));
- /* else NOP */
- PENDING_SCHED(FCSR, FCR31 & (1<<23), 1, 23);
- }
- else
- { /* control from */
- if (FS == 0)
- PENDING_FILL(RT, EXTEND32 (FCR0));
- else if (FS == 31)
- PENDING_FILL(RT, EXTEND32 (FCR31));
- /* else NOP */
+ unsigned_word fcr = ValueFCR (FS);
+ TRACE_ALU_INPUT1 (fcr);
+ GPR[RT] = fcr;
}
+ /* else NOP */
+ TRACE_ALU_RESULT (GPR[RT]);
}
-010001,00,X,10,5.RT,5.FS,00000000000:COP1Sb:32,f::CxC1
-"c%s<X>c1 r<RT>, f<FS>"
-*mipsIV:
+
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1c
+"cfc1 r<RT>, f<FS>"
*mipsV:
*mips32:
*mips64:
+{
+ check_fpu (SD_);
+ if (FS == 0 || FS == 25 || FS == 26 || FS == 28 || FS == 31)
+ {
+ unsigned_word fcr = ValueFCR (FS);
+ TRACE_ALU_INPUT1 (fcr);
+ GPR[RT] = fcr;
+ }
+ /* else NOP */
+ TRACE_ALU_RESULT (GPR[RT]);
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1a
+"ctc1 r<RT>, f<FS>"
+*mipsI:
+*mipsII:
+*mipsIII:
+{
+ check_fpu (SD_);
+ if (FS == 31)
+ PENDING_FILL (FCRCS_REGNUM, VL4_8 (GPR[RT]));
+ /* else NOP */
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1b
+"ctc1 r<RT>, f<FS>"
+*mipsIV:
*vr4100:
*vr5000:
*r3900:
{
check_fpu (SD_);
- if (X)
- {
- /* control to */
- TRACE_ALU_INPUT1 (GPR[RT]);
- if (FS == 0)
- {
- FCR0 = VL4_8(GPR[RT]);
- TRACE_ALU_RESULT (FCR0);
- }
- else if (FS == 31)
- {
- FCR31 = VL4_8(GPR[RT]);
- SETFCC(0,((FCR31 & (1 << 23)) ? 1 : 0));
- TRACE_ALU_RESULT (FCR31);
- }
- else
- {
- TRACE_ALU_RESULT0 ();
- }
- /* else NOP */
- }
- else
- { /* control from */
- if (FS == 0)
- {
- TRACE_ALU_INPUT1 (FCR0);
- GPR[RT] = EXTEND32 (FCR0);
- }
- else if (FS == 31)
- {
- TRACE_ALU_INPUT1 (FCR31);
- GPR[RT] = EXTEND32 (FCR31);
- }
- TRACE_ALU_RESULT (GPR[RT]);
- /* else NOP */
- }
+ TRACE_ALU_INPUT1 (GPR[RT]);
+ if (FS == 31)
+ StoreFCR (FS, GPR[RT]);
+ /* else NOP */
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1c
+"ctc1 r<RT>, f<FS>"
+*mipsV:
+*mips32:
+*mips64:
+{
+ check_fpu (SD_);
+ TRACE_ALU_INPUT1 (GPR[RT]);
+ if (FS == 25 || FS == 26 || FS == 28 || FS == 31)
+ StoreFCR (FS, GPR[RT]);
+ /* else NOP */
}
{
int fmt = FMT;
check_fpu (SD_);
- {
- if ((fmt == fmt_double) | 0)
- SignalException (ReservedInstruction, instruction_0);
- else
- StoreFPR(FD,fmt_double,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_double));
- }
+ if ((fmt == fmt_double) | 0)
+ SignalException (ReservedInstruction, instruction_0);
+ StoreFPR (FD, fmt_double, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+ fmt_double));
}
{
int fmt = FMT;
check_fpu (SD_);
- {
- if ((fmt == fmt_long) | ((fmt == fmt_long) || (fmt == fmt_word)))
- SignalException (ReservedInstruction, instruction_0);
- else
- StoreFPR(FD,fmt_long,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_long));
- }
+ if ((fmt == fmt_long) | ((fmt == fmt_long) || (fmt == fmt_word)))
+ SignalException (ReservedInstruction, instruction_0);
+ StoreFPR (FD, fmt_long, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+ fmt_long));
+}
+
+
+010001,10,000,5.FT,5.FS,5.FD,100110:COP1:64,f::CVT.PS.S
+"cvt.ps.s f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_ps, PackPS (ValueFPR (FS, fmt_single),
+ ValueFPR (FT, fmt_single)));
}
//
// FIXME: Does not correctly differentiate between mips*
//
-010001,10,3.FMT,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
+010001,10,3.FMT!6,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
"cvt.s.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
{
int fmt = FMT;
check_fpu (SD_);
- {
- if ((fmt == fmt_single) | 0)
- SignalException (ReservedInstruction, instruction_0);
- else
- StoreFPR(FD,fmt_single,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_single));
- }
+ if ((fmt == fmt_single) | 0)
+ SignalException (ReservedInstruction, instruction_0);
+ StoreFPR (FD, fmt_single, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+ fmt_single));
}
-010001,10,3.FMT,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
+010001,10,110,00000,5.FS,5.FD,101000:COP1:64,f::CVT.S.PL
+"cvt.s.pl f<FD>, f<FS>"
+*mipsV:
+*mips64:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_single, PSLower (ValueFPR (FS, fmt_ps)));
+}
+
+
+010001,10,110,00000,5.FS,5.FD,100000:COP1:64,f::CVT.S.PU
+"cvt.s.pu f<FD>, f<FS>"
+*mipsV:
+*mips64:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_single, PSUpper (ValueFPR (FS, fmt_ps)));
+}
+
+
+010001,10,3.FMT!6,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
"cvt.w.%s<FMT> f<FD>, f<FS>"
*mipsI:
*mipsII:
{
int fmt = FMT;
check_fpu (SD_);
- {
- if ((fmt == fmt_word) | ((fmt == fmt_long) || (fmt == fmt_word)))
- SignalException (ReservedInstruction, instruction_0);
- else
- StoreFPR(FD,fmt_word,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_word));
- }
+ if ((fmt == fmt_word) | ((fmt == fmt_long) || (fmt == fmt_word)))
+ SignalException (ReservedInstruction, instruction_0);
+ StoreFPR (FD, fmt_word, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+ fmt_word));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Divide(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+ StoreFPR (FD, fmt, Divide (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
}
-// DMFC1
-// DMTC1
-010001,00,X,01,5.RT,5.FS,00000000000:COP1Sa:64,f::DMxC1
-"dm%s<X>c1 r<RT>, f<FS>"
+010001,00001,5.RT,5.FS,00000000000:COP1:64,f::DMFC1a
+"dmfc1 r<RT>, f<FS>"
*mipsIII:
{
+ unsigned64 v;
check_fpu (SD_);
check_u64 (SD_, instruction_0);
- if (X)
- {
- if (SizeFGR() == 64)
- PENDING_FILL((FS + FGRIDX),GPR[RT]);
- else if ((FS & 0x1) == 0)
- {
- PENDING_FILL(((FS + 1) + FGRIDX),VH4_8(GPR[RT]));
- PENDING_FILL((FS + FGRIDX),VL4_8(GPR[RT]));
- }
- }
+ if (SizeFGR () == 64)
+ v = FGR[FS];
+ else if ((FS & 0x1) == 0)
+ v = SET64HI (FGR[FS+1]) | FGR[FS];
else
- {
- if (SizeFGR() == 64)
- PENDING_FILL(RT,FGR[FS]);
- else if ((FS & 0x1) == 0)
- PENDING_FILL(RT,(SET64HI(FGR[FS+1]) | FGR[FS]));
- else
- {
- if (STATE_VERBOSE_P(SD))
- sim_io_eprintf (SD,
- "Warning: PC 0x%lx: semantic_DMxC1_COP1Sa 32-bit use of odd FPR number\n",
- (long) CIA);
- PENDING_FILL(RT,SET64HI(0xDEADC0DE) | 0xBAD0BAD0);
- }
- }
+ v = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
+ PENDING_FILL (RT, v);
+ TRACE_ALU_RESULT (v);
}
-010001,00,X,01,5.RT,5.FS,00000000000:COP1Sb:64,f::DMxC1
-"dm%s<X>c1 r<RT>, f<FS>"
+
+010001,00001,5.RT,5.FS,00000000000:COP1:64,f::DMFC1b
+"dmfc1 r<RT>, f<FS>"
*mipsIV:
*mipsV:
*mips64:
{
check_fpu (SD_);
check_u64 (SD_, instruction_0);
- if (X)
- {
- if (SizeFGR() == 64)
- StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
- else if ((FS & 0x1) == 0)
- StoreFPR (FS, fmt_uninterpreted_64, SET64HI (FGR[FS+1]) | FGR[FS]);
- }
+ if (SizeFGR () == 64)
+ GPR[RT] = FGR[FS];
+ else if ((FS & 0x1) == 0)
+ GPR[RT] = SET64HI (FGR[FS+1]) | FGR[FS];
else
+ GPR[RT] = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
+ TRACE_ALU_RESULT (GPR[RT]);
+}
+
+
+010001,00101,5.RT,5.FS,00000000000:COP1:64,f::DMTC1a
+"dmtc1 r<RT>, f<FS>"
+*mipsIII:
+{
+ unsigned64 v;
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ if (SizeFGR () == 64)
+ PENDING_FILL ((FS + FGR_BASE), GPR[RT]);
+ else if ((FS & 0x1) == 0)
{
- if (SizeFGR() == 64)
- GPR[RT] = FGR[FS];
- else if ((FS & 0x1) == 0)
- GPR[RT] = SET64HI (FGR[FS+1]) | FGR[FS];
- else
- {
- if (STATE_VERBOSE_P(SD))
- sim_io_eprintf (SD,
- "Warning: PC 0x%lx: DMxC1 32-bit use of odd FPR number\n",
- (long) CIA);
- GPR[RT] = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
- }
+ PENDING_FILL (((FS + 1) + FGR_BASE), VH4_8 (GPR[RT]));
+ PENDING_FILL ((FS + FGR_BASE), VL4_8 (GPR[RT]));
}
+ else
+ Unpredictable ();
+ TRACE_FP_RESULT (GPR[RT]);
+}
+
+010001,00101,5.RT,5.FS,00000000000:COP1:64,f::DMTC1b
+"dmtc1 r<RT>, f<FS>"
+*mipsIV:
+*mipsV:
+*mips64:
+*vr4100:
+*vr5000:
+*r3900:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ if (SizeFGR () == 64)
+ StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
+ else if ((FS & 0x1) == 0)
+ StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
+ else
+ Unpredictable ();
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_long,Convert(FP_RM_TOMINF,ValueFPR(FS,fmt),fmt,fmt_long));
+ StoreFPR (FD, fmt_long, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
+ fmt_long));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_word,Convert(FP_RM_TOMINF,ValueFPR(FS,fmt),fmt,fmt_word));
+ StoreFPR (FD, fmt_word, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
+ fmt_word));
}
-//
-// FIXME: Not correct for mips*
-//
-010011,5.FR,5.FT,5.FS,5.FD,100,001:COP1X:32,f::MADD.D
-"madd.d f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
-*mipsV:
-*mips64:
-*vr5000:
-{
- check_fpu (SD_);
- {
- StoreFPR(FD,fmt_double,Add(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double));
- }
-}
-
-
-010011,5.FR,5.FT,5.FS,5.FD,100,000:COP1X:32,f::MADD.S
-"madd.s f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,100,3.FMT:COP1X:64,f::MADD.fmt
+"madd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
*mips64:
*vr5000:
{
+ int fmt = FMT;
check_fpu (SD_);
- {
- StoreFPR(FD,fmt_single,Add(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single));
- }
+ check_u64 (SD_, instruction_0);
+ check_fmt_p (SD_, fmt, instruction_0);
+ StoreFPR (FD, fmt, MultiplyAdd (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+ ValueFPR (FR, fmt), fmt));
}
-// MFC1
-// MTC1
-010001,00,X,00,5.RT,5.FS,00000000000:COP1Sa:32,f::MxC1
-"m%s<X>c1 r<RT>, f<FS>"
+010001,00000,5.RT,5.FS,00000000000:COP1:32,f::MFC1a
+"mfc1 r<RT>, f<FS>"
*mipsI:
*mipsII:
*mipsIII:
{
+ unsigned64 v;
check_fpu (SD_);
- if (X)
- { /*MTC1*/
- if (SizeFGR() == 64)
- {
- if (STATE_VERBOSE_P(SD))
- sim_io_eprintf (SD,
- "Warning: PC 0x%lx: MTC1 not DMTC1 with 64 bit regs\n",
- (long) CIA);
- PENDING_FILL ((FS + FGRIDX), (SET64HI(0xDEADC0DE) | VL4_8(GPR[RT])));
- }
- else
- PENDING_FILL ((FS + FGRIDX), VL4_8(GPR[RT]));
- }
- else /*MFC1*/
- PENDING_FILL (RT, EXTEND32 (FGR[FS]));
+ v = EXTEND32 (FGR[FS]);
+ PENDING_FILL (RT, v);
+ TRACE_ALU_RESULT (v);
}
-010001,00,X,00,5.RT,5.FS,00000000000:COP1Sb:32,f::MxC1
-"m%s<X>c1 r<RT>, f<FS>"
+
+010001,00000,5.RT,5.FS,00000000000:COP1:32,f::MFC1b
+"mfc1 r<RT>, f<FS>"
*mipsIV:
*mipsV:
*mips32:
*vr4100:
*vr5000:
*r3900:
-{
- int fs = FS;
+{
check_fpu (SD_);
- if (X)
- /*MTC1*/
- StoreFPR (FS, fmt_uninterpreted_32, VL4_8 (GPR[RT]));
- else /*MFC1*/
- GPR[RT] = EXTEND32 (FGR[FS]);
+ GPR[RT] = EXTEND32 (FGR[FS]);
+ TRACE_ALU_RESULT (GPR[RT]);
}
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,ValueFPR(FS,fmt));
+ StoreFPR (FD, fmt, ValueFPR (FS, fmt));
}
{
int fmt = FMT;
check_fpu (SD_);
- {
- if (GETFCC(CC) == TF)
- StoreFPR (FD, fmt, ValueFPR (FS, fmt));
- else
- StoreFPR (FD, fmt, ValueFPR (FD, fmt));
- }
+ if (fmt != fmt_ps)
+ {
+ if (GETFCC(CC) == TF)
+ StoreFPR (FD, fmt, ValueFPR (FS, fmt));
+ else
+ StoreFPR (FD, fmt, ValueFPR (FD, fmt)); /* set fmt */
+ }
+ else
+ {
+ unsigned64 fd;
+ fd = PackPS (PSUpper (ValueFPR ((GETFCC (CC+1) == TF) ? FS : FD,
+ fmt_ps)),
+ PSLower (ValueFPR ((GETFCC (CC+0) == TF) ? FS : FD,
+ fmt_ps)));
+ StoreFPR (FD, fmt_ps, fd);
+ }
}
}
-// MSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,101,001:COP1X:32,f::MSUB.D
-"msub.d f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,101,3.FMT:COP1X:64,f::MSUB.fmt
+"msub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
*mips64:
*vr5000:
{
+ int fmt = FMT;
check_fpu (SD_);
- StoreFPR(FD,fmt_double,Sub(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double));
+ check_u64 (SD_, instruction_0);
+ check_fmt_p (SD_, fmt, instruction_0);
+ StoreFPR (FD, fmt, MultiplySub (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+ ValueFPR (FR, fmt), fmt));
}
-// MSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,101000:COP1X:32,f::MSUB.S
-"msub.s f<FD>, f<FR>, f<FS>, f<FT>"
+010001,00100,5.RT,5.FS,00000000000:COP1:32,f::MTC1a
+"mtc1 r<RT>, f<FS>"
+*mipsI:
+*mipsII:
+*mipsIII:
+{
+ check_fpu (SD_);
+ if (SizeFGR () == 64)
+ PENDING_FILL ((FS + FGR_BASE), (SET64HI (0xDEADC0DE) | VL4_8 (GPR[RT])));
+ else
+ PENDING_FILL ((FS + FGR_BASE), VL4_8 (GPR[RT]));
+ TRACE_FP_RESULT (GPR[RT]);
+}
+
+010001,00100,5.RT,5.FS,00000000000:COP1:32,f::MTC1b
+"mtc1 r<RT>, f<FS>"
*mipsIV:
*mipsV:
+*mips32:
*mips64:
+*vr4100:
*vr5000:
+*r3900:
{
- check_fpu (SD_);
- StoreFPR(FD,fmt_single,Sub(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single));
+ check_fpu (SD_);
+ StoreFPR (FS, fmt_uninterpreted_32, VL4_8 (GPR[RT]));
}
-// MTC1 see MxC1
-
-
010001,10,3.FMT,5.FT,5.FS,5.FD,000010:COP1:32,f::MUL.fmt
"mul.%s<FMT> f<FD>, f<FS>, f<FT>"
*mipsI:
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Multiply(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+ StoreFPR (FD, fmt, Multiply (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Negate(ValueFPR(FS,fmt),fmt));
+ StoreFPR (FD, fmt, Negate (ValueFPR (FS, fmt), fmt));
}
-// NMADD.fmt
-010011,5.FR,5.FT,5.FS,5.FD,110001:COP1X:32,f::NMADD.D
-"nmadd.d f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,110,3.FMT:COP1X:64,f::NMADD.fmt
+"nmadd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
*mips64:
*vr5000:
{
+ int fmt = FMT;
check_fpu (SD_);
- StoreFPR(FD,fmt_double,Negate(Add(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double),fmt_double));
+ check_u64 (SD_, instruction_0);
+ check_fmt_p (SD_, fmt, instruction_0);
+ StoreFPR (FD, fmt, NegMultiplyAdd (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+ ValueFPR (FR, fmt), fmt));
}
-// NMADD.fmt
-010011,5.FR,5.FT,5.FS,5.FD,110000:COP1X:32,f::NMADD.S
-"nmadd.s f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,111,3.FMT:COP1X:64,f::NMSUB.fmt
+"nmsub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
*mipsIV:
*mipsV:
*mips64:
*vr5000:
{
+ int fmt = FMT;
check_fpu (SD_);
- StoreFPR(FD,fmt_single,Negate(Add(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single),fmt_single));
+ check_u64 (SD_, instruction_0);
+ check_fmt_p (SD_, fmt, instruction_0);
+ StoreFPR (FD, fmt, NegMultiplySub (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+ ValueFPR (FR, fmt), fmt));
}
-// NMSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,111001:COP1X:32,f::NMSUB.D
-"nmsub.d f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
+010001,10,110,5.FT,5.FS,5.FD,101100:COP1:64,f::PLL.PS
+"pll.ps f<FD>, f<FS>, f<FT>"
*mipsV:
*mips64:
-*vr5000:
{
check_fpu (SD_);
- StoreFPR(FD,fmt_double,Negate(Sub(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double),fmt_double));
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_ps, PackPS (PSLower (ValueFPR (FS, fmt_ps)),
+ PSLower (ValueFPR (FT, fmt_ps))));
}
-// NMSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,111000:COP1X:32,f::NMSUB.S
-"nmsub.s f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
+010001,10,110,5.FT,5.FS,5.FD,101101:COP1:64,f::PLU.PS
+"plu.ps f<FD>, f<FS>, f<FT>"
*mipsV:
*mips64:
-*vr5000:
{
check_fpu (SD_);
- StoreFPR(FD,fmt_single,Negate(Sub(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single),fmt_single));
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_ps, PackPS (PSLower (ValueFPR (FS, fmt_ps)),
+ PSUpper (ValueFPR (FT, fmt_ps))));
}
}
}
+
+010001,10,110,5.FT,5.FS,5.FD,101110:COP1:64,f::PUL.PS
+"pul.ps f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_ps, PackPS (PSUpper (ValueFPR (FS, fmt_ps)),
+ PSLower (ValueFPR (FT, fmt_ps))));
+}
+
+
+010001,10,110,5.FT,5.FS,5.FD,101111:COP1:64,f::PUU.PS
+"puu.ps f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+ check_fpu (SD_);
+ check_u64 (SD_, instruction_0);
+ StoreFPR (FD, fmt_ps, PackPS (PSUpper (ValueFPR (FS, fmt_ps)),
+ PSUpper (ValueFPR (FT, fmt_ps))));
+}
+
+
010001,10,3.FMT,00000,5.FS,5.FD,010101:COP1:32,f::RECIP.fmt
"recip.%s<FMT> f<FD>, f<FS>"
*mipsIV:
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Recip(ValueFPR(FS,fmt),fmt));
+ StoreFPR (FD, fmt, Recip (ValueFPR (FS, fmt), fmt));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_long,Convert(FP_RM_NEAREST,ValueFPR(FS,fmt),fmt,fmt_long));
+ StoreFPR (FD, fmt_long, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
+ fmt_long));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_word,Convert(FP_RM_NEAREST,ValueFPR(FS,fmt),fmt,fmt_word));
+ StoreFPR (FD, fmt_word, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
+ fmt_word));
}
010001,10,3.FMT,00000,5.FS,5.FD,010110:COP1:32,f::RSQRT.fmt
+"rsqrt.%s<FMT> f<FD>, f<FS>"
*mipsIV:
*mipsV:
*mips64:
-"rsqrt.%s<FMT> f<FD>, f<FS>"
*vr5000:
{
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Recip(SquareRoot(ValueFPR(FS,fmt),fmt),fmt));
+ StoreFPR (FD, fmt, RSquareRoot (ValueFPR (FS, fmt), fmt));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,(SquareRoot(ValueFPR(FS,fmt),fmt)));
+ StoreFPR (FD, fmt, (SquareRoot (ValueFPR (FS, fmt), fmt)));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt_p (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt,Sub(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+ StoreFPR (FD, fmt, Sub (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_long,Convert(FP_RM_TOZERO,ValueFPR(FS,fmt),fmt,fmt_long));
+ StoreFPR (FD, fmt_long, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
+ fmt_long));
}
int fmt = FMT;
check_fpu (SD_);
check_fmt (SD_, fmt, instruction_0);
- StoreFPR(FD,fmt_word,Convert(FP_RM_TOZERO,ValueFPR(FS,fmt),fmt,fmt_word));
+ StoreFPR (FD, fmt_word, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
+ fmt_word));
}
\f
\f
:include:::m16.igen
+:include:::mdmx.igen
+:include:::mips3d.igen
+:include:::sb1.igen
:include:::tx.igen
:include:::vr.igen
\f
switch (AccessLength)
{
- case AccessLength_QUADWORD :
+ case AccessLength_QUADWORD:
{
unsigned_16 val = sim_core_read_aligned_16 (CPU, cia, read_map, pAddr);
value1 = VH8_16 (val);
value = VL8_16 (val);
break;
}
- case AccessLength_DOUBLEWORD :
+ case AccessLength_DOUBLEWORD:
value = sim_core_read_aligned_8 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_SEPTIBYTE :
+ case AccessLength_SEPTIBYTE:
value = sim_core_read_misaligned_7 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_SEXTIBYTE :
+ case AccessLength_SEXTIBYTE:
value = sim_core_read_misaligned_6 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_QUINTIBYTE :
+ case AccessLength_QUINTIBYTE:
value = sim_core_read_misaligned_5 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_WORD :
+ case AccessLength_WORD:
value = sim_core_read_aligned_4 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_TRIPLEBYTE :
+ case AccessLength_TRIPLEBYTE:
value = sim_core_read_misaligned_3 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_HALFWORD :
+ case AccessLength_HALFWORD:
value = sim_core_read_aligned_2 (CPU, cia, read_map, pAddr);
break;
- case AccessLength_BYTE :
+ case AccessLength_BYTE:
value = sim_core_read_aligned_1 (CPU, cia, read_map, pAddr);
break;
default:
switch (AccessLength)
{
- case AccessLength_QUADWORD :
+ case AccessLength_QUADWORD:
{
unsigned_16 val = U16_8 (MemElem1, MemElem);
sim_core_write_aligned_16 (CPU, cia, write_map, pAddr, val);
break;
}
- case AccessLength_DOUBLEWORD :
+ case AccessLength_DOUBLEWORD:
sim_core_write_aligned_8 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_SEPTIBYTE :
+ case AccessLength_SEPTIBYTE:
sim_core_write_misaligned_7 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_SEXTIBYTE :
+ case AccessLength_SEXTIBYTE:
sim_core_write_misaligned_6 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_QUINTIBYTE :
+ case AccessLength_QUINTIBYTE:
sim_core_write_misaligned_5 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_WORD :
+ case AccessLength_WORD:
sim_core_write_aligned_4 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_TRIPLEBYTE :
+ case AccessLength_TRIPLEBYTE:
sim_core_write_misaligned_3 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_HALFWORD :
+ case AccessLength_HALFWORD:
sim_core_write_aligned_2 (CPU, cia, write_map, pAddr, MemElem);
break;
- case AccessLength_BYTE :
+ case AccessLength_BYTE:
sim_core_write_aligned_1 (CPU, cia, write_map, pAddr, MemElem);
break;
default:
/* Floating-point operations: */
#include "sim-fpu.h"
+#include "cp1.h"
/* FPU registers must be one of the following types. All other values
are reserved (and undefined). */
fmt_double = 1,
fmt_word = 4,
fmt_long = 5,
+ fmt_ps = 6,
/* The following are well outside the normal acceptable format
range, and are used in the register status vector. */
fmt_unknown = 0x10000000,
fmt_uninterpreted_64 = 0x80000000U,
} FP_formats;
-unsigned64 value_fpr PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int fpr, FP_formats));
-#define ValueFPR(FPR,FMT) value_fpr (SD, CPU, cia, (FPR), (FMT))
-
-void store_fpr PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int fpr, FP_formats fmt, unsigned64 value));
-#define StoreFPR(FPR,FMT,VALUE) store_fpr (SD, CPU, cia, (FPR), (FMT), (VALUE))
-
-int NaN PARAMS ((unsigned64 op, FP_formats fmt));
-int Infinity PARAMS ((unsigned64 op, FP_formats fmt));
-int Less PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-int Equal PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 AbsoluteValue PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Negate PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Add PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Sub PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Multiply PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Divide PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Recip PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 SquareRoot PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Max PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Min PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 convert PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int rm, unsigned64 op, FP_formats from, FP_formats to));
-#define Convert(rm,op,from,to) \
-convert (SD, CPU, cia, rm, op, from, to)
-
-/* Macro to update FPSR condition-code field. This is complicated by
- the fact that there is a hole in the index range of the bits within
- the FCSR register. Also, the number of bits visible depends on the
- MIPS ISA version being supported. */
-
-#define SETFCC(cc,v) {\
- int bit = ((cc == 0) ? 23 : (24 + (cc)));\
- FCSR = ((FCSR & ~(1 << bit)) | ((v) << bit));\
-}
-#define GETFCC(cc) (((((cc) == 0) ? (FCSR & (1 << 23)) : (FCSR & (1 << (24 + (cc))))) != 0) ? 1U : 0)
+/* For paired word (pw) operations, the opcode representation is fmt_word,
+ but register transfers (StoreFPR, ValueFPR, etc.) are done as fmt_long. */
+#define fmt_pw fmt_long
/* This should be the COC1 value at the start of the preceding
instruction: */
#define SizeFGR() (WITH_TARGET_FLOATING_POINT_BITSIZE)
#endif
-/* Standard FCRS bits: */
-#define IR (0) /* Inexact Result */
-#define UF (1) /* UnderFlow */
-#define OF (2) /* OverFlow */
-#define DZ (3) /* Division by Zero */
-#define IO (4) /* Invalid Operation */
-#define UO (5) /* Unimplemented Operation */
-
-/* Get masks for individual flags: */
-#if 1 /* SAFE version */
-#define FP_FLAGS(b) (((unsigned)(b) < 5) ? (1 << ((b) + 2)) : 0)
-#define FP_ENABLE(b) (((unsigned)(b) < 5) ? (1 << ((b) + 7)) : 0)
-#define FP_CAUSE(b) (((unsigned)(b) < 6) ? (1 << ((b) + 12)) : 0)
-#else
-#define FP_FLAGS(b) (1 << ((b) + 2))
-#define FP_ENABLE(b) (1 << ((b) + 7))
-#define FP_CAUSE(b) (1 << ((b) + 12))
-#endif
-
-#define FP_FS (1 << 24) /* MIPS III onwards : Flush to Zero */
-
-#define FP_MASK_RM (0x3)
-#define FP_SH_RM (0)
-#define FP_RM_NEAREST (0) /* Round to nearest (Round) */
-#define FP_RM_TOZERO (1) /* Round to zero (Trunc) */
-#define FP_RM_TOPINF (2) /* Round to Plus infinity (Ceil) */
-#define FP_RM_TOMINF (3) /* Round to Minus infinity (Floor) */
-#define GETRM() (int)((FCSR >> FP_SH_RM) & FP_MASK_RM)
-
-
/* For backward compatibility */
#define PENDING_FILL(R,VAL) \
do { \
- if ((R) >= FGRIDX && (R) < FGRIDX + NR_FGR) \
+ if ((R) >= FGR_BASE && (R) < FGR_BASE + NR_FGR) \
{ \
- PENDING_SCHED(FGR[(R) - FGRIDX], VAL, 1, -1); \
- PENDING_SCHED(FPR_STATE[(R) - FGRIDX], fmt_uninterpreted, 1, -1); \
+ PENDING_SCHED(FGR[(R) - FGR_BASE], VAL, 1, -1); \
+ PENDING_SCHED(FPR_STATE[(R) - FGR_BASE], fmt_uninterpreted, 1, -1); \
} \
else \
PENDING_SCHED(GPR[(R)], VAL, 1, -1); \
};
+/* The internal representation of an MDMX accumulator.
+ Note that 24 and 48 bit accumulator elements are represented in
+ 32 or 64 bits. Since the accumulators are 2's complement with
+ overflow suppressed, high-order bits can be ignored in most contexts. */
+
+typedef signed32 signed24;
+typedef signed64 signed48;
+
+typedef union {
+ signed24 ob[8];
+ signed48 qh[4];
+} MDMX_accumulator;
+
+
+/* Conventional system arguments. */
+#define SIM_STATE sim_cpu *cpu, address_word cia
+#define SIM_ARGS CPU, cia
+
struct _sim_cpu {
#define LAST_EMBED_REGNUM (89)
#define NUM_REGS (LAST_EMBED_REGNUM + 1)
-
+#define FP0_REGNUM 38 /* Floating point register 0 (single float) */
+#define FCRCS_REGNUM 70 /* FP control/status */
+#define FCRIR_REGNUM 71 /* FP implementation/revision */
#endif
#define GPR (®ISTERS[0])
#define GPR_SET(N,VAL) (REGISTERS[(N)] = (VAL))
- /* While space is allocated for the floating point registers in the
- main registers array, they are stored separatly. This is because
- their size may not necessarily match the size of either the
- general-purpose or system specific registers */
-#define NR_FGR (32)
-#define FGRIDX (38)
- fp_word fgr[NR_FGR];
-#define FGR ((CPU)->fgr)
-
#define LO (REGISTERS[33])
#define HI (REGISTERS[34])
#define PCIDX 37
#define COP0_GPR ((CPU)->cop0_gpr)
#define COP0_BADVADDR ((unsigned32)(COP0_GPR[8]))
+ /* While space is allocated for the floating point registers in the
+ main registers array, they are stored separatly. This is because
+ their size may not necessarily match the size of either the
+ general-purpose or system specific registers. */
+#define NR_FGR (32)
+#define FGR_BASE FP0_REGNUM
+ fp_word fgr[NR_FGR];
+#define FGR ((CPU)->fgr)
+
/* Keep the current format state for each register: */
FP_formats fpr_state[32];
#define FPR_STATE ((CPU)->fpr_state)
pending_write_queue pending;
+ /* The MDMX accumulator (used only for MDMX ASE). */
+ MDMX_accumulator acc;
+#define ACC ((CPU)->acc)
+
/* LLBIT = Load-Linked bit. A bit of "virtual" state used by atomic
read-write instructions. It is set when a linked load occurs. It
is tested and cleared by the conditional store. It is cleared
#define status_CU1 (1 << 29) /* Coprocessor 1 usable */
#define status_CU2 (1 << 30) /* Coprocessor 2 usable */
#define status_CU3 (1 << 31) /* Coprocessor 3 usable */
+/* Bits reserved for implementations: */
+#define status_SBX (1 << 16) /* Enable SiByte SB-1 extensions. */
#define cause_BD ((unsigned)1 << 31) /* L1 Exception in branch delay slot */
#define cause_BD2 (1 << 30) /* L2 Exception in branch delay slot */
int sim_monitor (SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int arg);
+/* FPR access. */
+unsigned64 value_fpr (SIM_STATE, int fpr, FP_formats);
+#define ValueFPR(FPR,FMT) value_fpr (SIM_ARGS, (FPR), (FMT))
+void store_fpr (SIM_STATE, int fpr, FP_formats fmt, unsigned64 value);
+#define StoreFPR(FPR,FMT,VALUE) store_fpr (SIM_ARGS, (FPR), (FMT), (VALUE))
+unsigned64 ps_lower (SIM_STATE, unsigned64 op);
+#define PSLower(op) ps_lower (SIM_ARGS, op)
+unsigned64 ps_upper (SIM_STATE, unsigned64 op);
+#define PSUpper(op) ps_upper (SIM_ARGS, op)
+unsigned64 pack_ps (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats from);
+#define PackPS(op1,op2) pack_ps (SIM_ARGS, op1, op2, fmt_single)
+
+
+/* FCR access. */
+unsigned_word value_fcr (SIM_STATE, int fcr);
+#define ValueFCR(FCR) value_fcr (SIM_ARGS, (FCR))
+void store_fcr (SIM_STATE, int fcr, unsigned_word value);
+#define StoreFCR(FCR,VALUE) store_fcr (SIM_ARGS, (FCR), (VALUE))
+void test_fcsr (SIM_STATE);
+#define TestFCSR() test_fcsr (SIM_ARGS)
+
+
+/* FPU operations. */
+void fp_cmp (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt, int abs, int cond, int cc);
+#define Compare(op1,op2,fmt,cond,cc) fp_cmp(SIM_ARGS, op1, op2, fmt, 0, cond, cc)
+unsigned64 fp_abs (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define AbsoluteValue(op,fmt) fp_abs(SIM_ARGS, op, fmt)
+unsigned64 fp_neg (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Negate(op,fmt) fp_neg(SIM_ARGS, op, fmt)
+unsigned64 fp_add (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Add(op1,op2,fmt) fp_add(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_sub (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Sub(op1,op2,fmt) fp_sub(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_mul (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Multiply(op1,op2,fmt) fp_mul(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_div (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Divide(op1,op2,fmt) fp_div(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_recip (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Recip(op,fmt) fp_recip(SIM_ARGS, op, fmt)
+unsigned64 fp_sqrt (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define SquareRoot(op,fmt) fp_sqrt(SIM_ARGS, op, fmt)
+unsigned64 fp_rsqrt (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define RSquareRoot(op,fmt) fp_rsqrt(SIM_ARGS, op, fmt)
+unsigned64 fp_madd (SIM_STATE, unsigned64 op1, unsigned64 op2,
+ unsigned64 op3, FP_formats fmt);
+#define MultiplyAdd(op1,op2,op3,fmt) fp_madd(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_msub (SIM_STATE, unsigned64 op1, unsigned64 op2,
+ unsigned64 op3, FP_formats fmt);
+#define MultiplySub(op1,op2,op3,fmt) fp_msub(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_nmadd (SIM_STATE, unsigned64 op1, unsigned64 op2,
+ unsigned64 op3, FP_formats fmt);
+#define NegMultiplyAdd(op1,op2,op3,fmt) fp_nmadd(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_nmsub (SIM_STATE, unsigned64 op1, unsigned64 op2,
+ unsigned64 op3, FP_formats fmt);
+#define NegMultiplySub(op1,op2,op3,fmt) fp_nmsub(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 convert (SIM_STATE, int rm, unsigned64 op, FP_formats from, FP_formats to);
+#define Convert(rm,op,from,to) convert (SIM_ARGS, rm, op, from, to)
+unsigned64 convert_ps (SIM_STATE, int rm, unsigned64 op, FP_formats from,
+ FP_formats to);
+#define ConvertPS(rm,op,from,to) convert_ps (SIM_ARGS, rm, op, from, to)
+
+
+/* MIPS-3D ASE operations. */
+#define CompareAbs(op1,op2,fmt,cond,cc) \
+fp_cmp(SIM_ARGS, op1, op2, fmt, 1, cond, cc)
+unsigned64 fp_add_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define AddR(op1,op2,fmt) fp_add_r(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_mul_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define MultiplyR(op1,op2,fmt) fp_mul_r(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_recip1 (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Recip1(op,fmt) fp_recip1(SIM_ARGS, op, fmt)
+unsigned64 fp_recip2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Recip2(op1,op2,fmt) fp_recip2(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_rsqrt1 (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define RSquareRoot1(op,fmt) fp_rsqrt1(SIM_ARGS, op, fmt)
+unsigned64 fp_rsqrt2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define RSquareRoot2(op1,op2,fmt) fp_rsqrt2(SIM_ARGS, op1, op2, fmt)
+
+
+/* MDMX access. */
+
+typedef unsigned int MX_fmtsel; /* MDMX format select field (5 bits). */
+#define ob_fmtsel(sel) (((sel)<<1)|0x0)
+#define qh_fmtsel(sel) (((sel)<<2)|0x1)
+
+#define fmt_mdmx fmt_uninterpreted
+
+#define MX_VECT_AND (0)
+#define MX_VECT_NOR (1)
+#define MX_VECT_OR (2)
+#define MX_VECT_XOR (3)
+#define MX_VECT_SLL (4)
+#define MX_VECT_SRL (5)
+#define MX_VECT_ADD (6)
+#define MX_VECT_SUB (7)
+#define MX_VECT_MIN (8)
+#define MX_VECT_MAX (9)
+#define MX_VECT_MUL (10)
+#define MX_VECT_MSGN (11)
+#define MX_VECT_SRA (12)
+#define MX_VECT_ABSD (13) /* SB-1 only. */
+#define MX_VECT_AVG (14) /* SB-1 only. */
+
+unsigned64 mdmx_cpr_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Add(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ADD, op1, vt, fmtsel)
+#define MX_And(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AND, op1, vt, fmtsel)
+#define MX_Max(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MAX, op1, vt, fmtsel)
+#define MX_Min(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MIN, op1, vt, fmtsel)
+#define MX_Msgn(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MSGN, op1, vt, fmtsel)
+#define MX_Mul(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MUL, op1, vt, fmtsel)
+#define MX_Nor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_NOR, op1, vt, fmtsel)
+#define MX_Or(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_OR, op1, vt, fmtsel)
+#define MX_ShiftLeftLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SLL, op1, vt, fmtsel)
+#define MX_ShiftRightArith(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRA, op1, vt, fmtsel)
+#define MX_ShiftRightLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRL, op1, vt, fmtsel)
+#define MX_Sub(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SUB, op1, vt, fmtsel)
+#define MX_Xor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_XOR, op1, vt, fmtsel)
+#define MX_AbsDiff(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ABSD, op1, vt, fmtsel)
+#define MX_Avg(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AVG, op1, vt, fmtsel)
+
+#define MX_C_EQ 0x1
+#define MX_C_LT 0x4
+
+void mdmx_cc_op (SIM_STATE, int cond, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Comp(op1,cond,vt,fmtsel) mdmx_cc_op(SIM_ARGS, cond, op1, vt, fmtsel)
+
+unsigned64 mdmx_pick_op (SIM_STATE, int tf, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Pick(tf,op1,vt,fmtsel) mdmx_pick_op(SIM_ARGS, tf, op1, vt, fmtsel)
+
+#define MX_VECT_ADDA (0)
+#define MX_VECT_ADDL (1)
+#define MX_VECT_MULA (2)
+#define MX_VECT_MULL (3)
+#define MX_VECT_MULS (4)
+#define MX_VECT_MULSL (5)
+#define MX_VECT_SUBA (6)
+#define MX_VECT_SUBL (7)
+#define MX_VECT_ABSDA (8) /* SB-1 only. */
+
+void mdmx_acc_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_AddA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDA, op1, vt, fmtsel)
+#define MX_AddL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDL, op1, vt, fmtsel)
+#define MX_MulA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULA, op1, vt, fmtsel)
+#define MX_MulL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULL, op1, vt, fmtsel)
+#define MX_MulS(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULS, op1, vt, fmtsel)
+#define MX_MulSL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULSL, op1, vt, fmtsel)
+#define MX_SubA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBA, op1, vt, fmtsel)
+#define MX_SubL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBL, op1, vt, fmtsel)
+#define MX_AbsDiffC(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ABSDA, op1, vt, fmtsel)
+
+#define MX_FMT_OB (0)
+#define MX_FMT_QH (1)
+
+/* The following codes chosen to indicate the units of shift. */
+#define MX_RAC_L (0)
+#define MX_RAC_M (1)
+#define MX_RAC_H (2)
+
+unsigned64 mdmx_rac_op (SIM_STATE, int, int);
+#define MX_RAC(op,fmt) mdmx_rac_op(SIM_ARGS, op, fmt)
+
+void mdmx_wacl (SIM_STATE, int, unsigned64, unsigned64);
+#define MX_WACL(fmt,vs,vt) mdmx_wacl(SIM_ARGS, fmt, vs, vt)
+void mdmx_wach (SIM_STATE, int, unsigned64);
+#define MX_WACH(fmt,vs) mdmx_wach(SIM_ARGS, fmt, vs)
+
+#define MX_RND_AS (0)
+#define MX_RND_AU (1)
+#define MX_RND_ES (2)
+#define MX_RND_EU (3)
+#define MX_RND_ZS (4)
+#define MX_RND_ZU (5)
+
+unsigned64 mdmx_round_op (SIM_STATE, int, int, MX_fmtsel);
+#define MX_RNAS(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AS, vt, fmt)
+#define MX_RNAU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AU, vt, fmt)
+#define MX_RNES(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ES, vt, fmt)
+#define MX_RNEU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_EU, vt, fmt)
+#define MX_RZS(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ZS, vt, fmt)
+#define MX_RZU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ZU, vt, fmt)
+
+unsigned64 mdmx_shuffle (SIM_STATE, int, unsigned64, unsigned64);
+#define MX_SHFL(shop,op1,op2) mdmx_shuffle(SIM_ARGS, shop, op1, op2)
+
+
/* Memory accesses */
void unpredictable_action (sim_cpu *cpu, address_word cia);
#define NotWordValue(val) not_word_value (SD_, (val))
#define Unpredictable() unpredictable (SD_)
+#define UnpredictableResult() /* For now, do nothing. */
INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr));
#define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA))
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (INCLUDE): Update path to callback.h.
+ * mn10200_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
2001-04-15 J.T. Conklin <jtc@redback.com>
* Makefile.in (simops.o): Add simops.h to dependency list.
# Select mn10200 support in nltvals.def.
NL_TARGET = -DNL_TARGET_mn10200
-INCLUDE = mn10200_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10200_sim.h $(srcdir)/../../include/gdb/callback.h
## COMMON_POST_CONFIG_FRAG
#include <stdio.h>
#include <ctype.h>
#include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
#include "opcode/mn10200.h"
#include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
#ifndef INLINE
#ifdef __GNUC__
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (INCLUDE): Update path to callback.h.
+ * mn10300_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * tconfig.in: Ditto.
+
2001-05-06 Jim Blandy <jimb@redhat.com>
* mn10300.igen: Doc fixes.
# Select mn10300 support in nltvals.def.
NL_TARGET = -DNL_TARGET_mn10300
-INCLUDE = mn10300_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10300_sim.h $(srcdir)/../../include/gdb/callback.h
# List of extra flags to always pass to $(CC).
SIM_EXTRA_CFLAGS = @sim_gen@ -DPOLL_QUIT_INTERVAL=0x20
ac_help="$ac_help
--enable-sim-hostendian=end Specify host byte endian orientation."
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
--enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
ac_help="$ac_help
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:697: checking how to run the C preprocessor" >&5
+echo "configure:699: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 712 "configure"
+#line 714 "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:718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:720: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 729 "configure"
+#line 731 "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:735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:737: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 746 "configure"
+#line 748 "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:752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:754: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:777: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:804: checking for POSIXized ISC" >&5
+echo "configure:806: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:825: checking for ANSI C header files" >&5
+echo "configure:827: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 830 "configure"
+#line 832 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:840: \"$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*
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 855 "configure"
+#line 857 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 873 "configure"
+#line 875 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 894 "configure"
+#line 896 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:929: checking for working const" >&5
+echo "configure:931: 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 934 "configure"
+#line 936 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1004: checking for inline" >&5
+echo "configure:1006: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1011 "configure"
+#line 1013 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1044: checking for off_t" >&5
+echo "configure:1046: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1049 "configure"
+#line 1051 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1077: checking for size_t" >&5
+echo "configure:1079: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1082 "configure"
+#line 1084 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1112: checking for working alloca.h" >&5
+echo "configure:1114: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1117 "configure"
+#line 1119 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1145: checking for alloca" >&5
+echo "configure:1147: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1150 "configure"
+#line 1152 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1210: checking whether alloca needs Cray hooks" >&5
+echo "configure:1212: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1215 "configure"
+#line 1217 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1240: checking for $ac_func" >&5
+echo "configure:1242: 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 1245 "configure"
+#line 1247 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1270: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1295: checking stack direction for C alloca" >&5
+echo "configure:1297: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1303 "configure"
+#line 1305 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1347: checking for $ac_hdr" >&5
+echo "configure:1349: 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 1352 "configure"
+#line 1354 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1359: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1386: checking for $ac_func" >&5
+echo "configure:1388: 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 1391 "configure"
+#line 1393 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1416: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1439: checking for working mmap" >&5
+echo "configure:1441: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1447 "configure"
+#line 1449 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1589: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1610: checking for Cygwin environment" >&5
+echo "configure:1612: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1615 "configure"
+#line 1617 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1643: checking for mingw32 environment" >&5
+echo "configure:1645: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1648 "configure"
+#line 1650 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1722: checking host system type" >&5
+echo "configure:1724: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1743: checking target system type" >&5
+echo "configure:1745: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1761: checking build system type" >&5
+echo "configure:1763: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1805: checking for $ac_word" >&5
+echo "configure:1807: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1835: checking for $ac_word" >&5
+echo "configure:1837: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1886: checking for $ac_word" >&5
+echo "configure:1888: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1918: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1920: 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.
cat > conftest.$ac_ext << EOF
-#line 1929 "configure"
+#line 1931 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1936: \"$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
{ 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:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1965: checking whether we are using GNU C" >&5
+echo "configure:1967: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1993: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1995: 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
# 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:2036: checking for a BSD compatible install" >&5
+echo "configure:2038: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2104: checking for $ac_word" >&5
+echo "configure:2106: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2139: checking for $ac_hdr" >&5
+echo "configure:2141: 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 2144 "configure"
+#line 2146 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2151: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2179: checking for $ac_func" >&5
+echo "configure:2181: 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 2184 "configure"
+#line 2186 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2209: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2236: checking for $ac_func" >&5
+echo "configure:2238: 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 2241 "configure"
+#line 2243 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2266: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2298: checking for LC_MESSAGES" >&5
+echo "configure:2300: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2303 "configure"
+#line 2305 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2331: checking whether NLS is requested" >&5
+echo "configure:2333: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2351: checking whether included gettext is requested" >&5
+echo "configure:2353: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2370: checking for libintl.h" >&5
+echo "configure:2372: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2375 "configure"
+#line 2377 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2382: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2397: checking for gettext in libc" >&5
+echo "configure:2399: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2402 "configure"
+#line 2404 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2425: checking for bindtextdomain in -lintl" >&5
+echo "configure:2427: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2433 "configure"
+#line 2435 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2446: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2460: checking for gettext in libintl" >&5
+echo "configure:2462: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2465 "configure"
+#line 2467 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2500: checking for $ac_word" >&5
+echo "configure:2502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2534: checking for $ac_func" >&5
+echo "configure:2536: 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 2539 "configure"
+#line 2541 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2564: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2589: checking for $ac_word" >&5
+echo "configure:2591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2625: checking for $ac_word" >&5
+echo "configure:2627: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2657 "configure"
+#line 2659 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2697: checking for $ac_word" >&5
+echo "configure:2699: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2731: checking for $ac_word" >&5
+echo "configure:2733: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
+echo "configure:2769: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2857: checking for catalogs to be installed" >&5
+echo "configure:2859: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2885: checking for linux/version.h" >&5
+echo "configure:2887: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2890 "configure"
+#line 2892 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2897: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2964: checking for $ac_hdr" >&5
+echo "configure:2966: 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 2969 "configure"
+#line 2971 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2976: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3004: checking for $ac_hdr" >&5
+echo "configure:3006: 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 3009 "configure"
+#line 3011 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3016: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3044: checking for $ac_hdr" >&5
+echo "configure:3046: 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 3049 "configure"
+#line 3051 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3056: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3084: checking for $ac_hdr" >&5
+echo "configure:3086: 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 3089 "configure"
+#line 3091 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3096: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3123: checking for $ac_func" >&5
+echo "configure:3125: 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 3128 "configure"
+#line 3130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3153: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3178: checking for bind in -lsocket" >&5
+echo "configure:3180: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3186 "configure"
+#line 3188 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3199: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3225: checking for gethostbyname in -lnsl" >&5
+echo "configure:3227: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3233 "configure"
+#line 3235 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3420: checking return type of signal handlers" >&5
+echo "configure:3422: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3425 "configure"
+#line 3427 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3464: checking for executable suffix" >&5
+echo "configure:3466: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3625: checking whether byte ordering is bigendian" >&5
+echo "configure:3627: 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
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+#line 3634 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3647 "configure"
+#line 3649 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3678 "configure"
+#line 3680 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3776: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3786 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
for ac_func in time chmod utime fork execve execv chown
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3941: checking for $ac_func" >&5
+echo "configure:3990: 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 3946 "configure"
+#line 3995 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4018: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3997: checking for $ac_hdr" >&5
+echo "configure:4046: 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 4002 "configure"
+#line 4051 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4056: \"$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*
#include <stdio.h>
#include <ctype.h>
#include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
#include "opcode/mn10300.h"
#include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
#include "bfd.h"
#ifndef INLINE
/* FIXME: This is unnecessarily necessary: */
#include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "sim-module.h"
MODULE_INSTALL_FN dv_sockser_install;
+2002-06-17 Elena Zannoni <ezannoni@redhat.com>
+
+ * psim.c (psim_options): Don't choke when gdb invokes us with
+ the --architecture option, just ignore it.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * main.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * sim_calls.c: Ditto.
+
+2002-05-30 DJ Delorie <dj@redhat.com>
+
+ * lf.c (lf_print__gnu_copyleft): Convert multiline strings to
+ compatible format.
+ * gen-idecode.c (print_run_until_stop_body): Likewise.
+ * gen-model.c (gen_model_c): Likewise.
+
2002-04-15 Elena Zannoni <ezannoni@redhat.com>
* sim_calls.c (sim_fetch_register, sim_store_register): Return -1 for
if (!generate_smp) {
- lf_putstr(file, "
-/* CASE 1: NO SMP (with or with out instruction cache).
-
- In this case, we can take advantage of the fact that the current
- instruction address does not need to be returned to the cpu object
- after every execution of an instruction. Instead it only needs to
- be saved when either A. the main loop exits or B. A cpu-halt or
- cpu-restart call forces the loop to be re-enered. The later
- functions always save the current cpu instruction address.
-
- Two subcases also exist that with and that without an instruction
- cache.
-
- An additional complexity is the need to ensure that a 1:1 ratio
- is maintained between the execution of an instruction and the
+ lf_putstr(file, "\n\
+/* CASE 1: NO SMP (with or with out instruction cache).\n\
+\n\
+ In this case, we can take advantage of the fact that the current\n\
+ instruction address does not need to be returned to the cpu object\n\
+ after every execution of an instruction. Instead it only needs to\n\
+ be saved when either A. the main loop exits or B. A cpu-halt or\n\
+ cpu-restart call forces the loop to be re-enered. The later\n\
+ functions always save the current cpu instruction address.\n\
+\n\
+ Two subcases also exist that with and that without an instruction\n\
+ cache.\n\
+\n\
+ An additional complexity is the need to ensure that a 1:1 ratio\n\
+ is maintained between the execution of an instruction and the\n\
incrementing of the simulation clock */");
lf_putstr(file, "\n");
if (generate_smp) {
- lf_putstr(file, "
-/* CASE 2: SMP (With or without ICACHE)
-
- The complexity here comes from needing to correctly restart the
- system when it is aborted. In particular if cpu0 requests a
- restart, the next cpu is still cpu1. Cpu0 being restarted after
+ lf_putstr(file, "\n\
+/* CASE 2: SMP (With or without ICACHE)\n\
+\n\
+ The complexity here comes from needing to correctly restart the\n\
+ system when it is aborted. In particular if cpu0 requests a\n\
+ restart, the next cpu is still cpu1. Cpu0 being restarted after\n\
all the other CPU's and the event queue have been processed */");
lf_putstr(file, "\n");
lf_printf(file, " }\n");
lf_printf(file, " }\n");
lf_printf(file, "\n");
- lf_printf(file, " error(\"Unknown model '%%s', Models which are known are:%%s\n\",\n");
+ lf_printf(file, " error(\"Unknown model '%%s', Models which are known are:%%s\\n\",\n");
lf_printf(file, " name,\n");
lf_printf(file, " \"");
for(model_ptr = models; model_ptr; model_ptr = model_ptr->next) {
switch (file->type) {
case lf_is_c:
case lf_is_h:
- nr += lf_printf(file, "\
-/* This file is part of the program psim.
-
- Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
- 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.
-
- --
-
- This file was generated by the program %s */
+ nr += lf_printf(file, "\n\
+/* This file is part of the program psim.\n\
+\n\
+ Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>\n\
+\n\
+ This program is free software; you can redistribute it and/or modify\n\
+ it under the terms of the GNU General Public License as published by\n\
+ the Free Software Foundation; either version 2 of the License, or\n\
+ (at your option) any later version.\n\
+\n\
+ This program is distributed in the hope that it will be useful,\n\
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
+ GNU General Public License for more details.\n\
+ \n\
+ You should have received a copy of the GNU General Public License\n\
+ along with this program; if not, write to the Free Software\n\
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
+ \n\
+ --\n\
+\n\
+ This file was generated by the program %s */\n\
", filter_filename(file->program));
break;
default:
#include "events.h" /* FIXME: psim should provide the interface */
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
else
tree_parse(root, "/openprom/trace/%s 1", param);
break;
+ case '-':
+ /* it's a long option of the form --optionname=optionvalue.
+ Such options can be passed through if we are invoked by
+ gdb. */
+ if (strstr(argv[argp], "architecture") != NULL) {
+ /* we must consume the argument here, so that we get out
+ of the loop. */
+ p = argv[argp] + strlen(argv[argp]) - 1;
+ printf_filtered("Warning - architecture parameter ignored\n");
+ }
+ else
+ error("Unrecognized option");
+ break;
}
p += 1;
}
#include "defs.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
/* Define the rate at which the simulator should poll the host
for a quit. */
+Tue Jun 18 16:53:11 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * interp.c (sim_resume): Fix setting of bus error for
+ instruction fetch.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
2001-01-30 Ben Elliston <bje@redhat.com>
* interp.c (sim_create_inferior): Record program arguments for
#include "sysdep.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
/* This file is local - if newlib changes, then so should this. */
#include "syscall.h"
}
/* Check for SIGBUS due to insn fetch. */
else if (! saved_state.asregs.exception)
- saved_state.asregs.exception == SIGBUS;
+ saved_state.asregs.exception = SIGBUS;
saved_state.asregs.ticks += get_now () - tick_start;
saved_state.asregs.cycles += cycles;
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2001-07-31 Ben Elliston <bje@redhat.com>
* lib/sim-defs.exp (run_sim_test): Include a description such as
+++ /dev/null
-Tue Jul 4 13:58:43 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * tic80.igen: Rename insns. Re-format.
- * tic80.dc: rename dc.
- * tic80.ic: rename ic. Replace ``compute'' with ``cache''.
-
-Wed May 24 14:40:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-2000-04-12 Frank Ch. Eigler <fche@redhat.com>
-
- * cpu.h (GPR_CLEAR): New macro.
- (GPR_SET): Removed macro.
-
-Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-1999-05-08 Felix Lee <flee@cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri May 1 14:41:11 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns: Pass correct arguments to sim_engine_abort.
-
-Tue Apr 28 18:33:31 1998 Geoffrey Noer <noer@cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Sun Apr 26 15:31:55 1998 Tom Tromey <tromey@creche>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * config.in: Ditto.
-
-Sun Apr 26 15:19:45 1998 Tom Tromey <tromey@cygnus.com>
-
- * acconfig.h: New file.
- * configure.in: Reverted change of Apr 24; use sinclude again.
-
-Fri Apr 24 14:16:40 1998 Tom Tromey <tromey@creche>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * config.in: Ditto.
-
-Fri Apr 24 11:18:28 1998 Tom Tromey <tromey@cygnus.com>
-
- * configure.in: Don't call sinclude.
-
-Fri Apr 24 19:43:30 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ic (rBase, rLink): Make the type a pointer.
-
-Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 11 14:12:56 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (IMEM32_IMMED, IMEM32, STORE, MEM): Replace sim_core_*_map
- with read_map, write_map, exec_map resp.
-
-Thu Feb 26 19:08:37 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_info): Delete.
-
-Tue Feb 17 14:35:05 1998 Michael Meissner <meissner@cygnus.com>
-
- * misc.c (tic80_trace_cond_br): Take size/code arguments, and
- decode bcond conditions and bbo/bbz comparison bits.
-
- * cpu.h (tic80_trace_cond_br): Update prototype.
- (TRACE_COND_PR): Take size/code additional arguments.
-
- * insns: (bbo/bbz/bcnd): Update call to TRACE_COND_PR.
-
-Tue Feb 17 12:50:27 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_store_register, sim_fetch_register): Pass in
- length parameter. Return -1.
-
-Fri Feb 13 17:11:22 1998 Michael Meissner <meissner@cygnus.com>
-
- * insns ({get,set}_fp_reg): Tic80 floating point is little endian,
- not big endian.
-
- * misc.c (tic80_trace_fpu*): Pass address of sim_fpu structure,
- not the structure itself. Use %g consistantly to print floating
- point.
-
- * cpu.h: (tic80_trace_fpu*): Update prototypes.
-
-Tue Feb 3 16:25:47 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (IMEM32, IMEM32_IMMED): Rename IMEM and IMEM_IMMED so that
- in sync with recent igen change.
-
-Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Jan 30 11:47:50 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * cpu.h (CPU_CIA): Delete macro, replace with...
- (CIA_SET, CIA_GET): Define.
-
-Wed Jan 28 18:44:33 1998 Michael Meissner <meissner@cygnus.com>
-
- * misc.c (tic80_trace_cmp_internal): New function to return
- compare bits as a string.
- (tic80_trace_{,fpu2}cmp): New functions for tracing cmp and fcmp.
-
- * cpu.h (tic80_trace_{,fpu2}cmp): Add declaration.
- (TRACE_{,FPU2}CMP): New macros for tracing compares.
-
- * insns (do_{,f}cmp): Use compare specific tracing functions to
- print out the flag bits.
-
-Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * config.in: Ditto.
-
-Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Nov 24 14:57:58 1997 Doug Evans <devans@seba.cygnus.com>
-
- * cpu.h (TRACE_COND_BR): Use TRACE_BRANCH_P, not TRACE_ALU_P.
-
-Sat Nov 22 21:42:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * interp.c (engine_step): Replace SIGTRAP with SIM_SIGTRAP.
- (engine_run_until_stop): Replace SIGINT with SIM_SIGINT.
-
- * sim-main.h: Include sim-signal.h.
- (SIGTRAP): Delete definition.
-
- * interp.c, sim-calls.c: Do not include signal.h.
-
- * insns (illegal): SIGILL -> SIM_SIGILL.
- (fp_unavailable): SIGFPE -> SIM_SIGFPE.
- (do_trap): SIGTRAP -> SIM_SIGTRAP.
-
-Tue Nov 18 15:33:48 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * sim-main.h (CIA_ADDR): Define.
-
- * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
-
-Fri Oct 17 17:26:36 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (ALU32_END): Use ALU32_RESULT.
-
-Mon Sep 29 12:49:06 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (get_fp_reg, set_fp_reg): Update to use changed sim_fpu
- interface.
- (do_fadd, do_fcmp, do_fdiv, do_fmpy, do_frnd, do_fsub): Ditto.
-
- * misc.c (tic80_trace_fpu3, tic80_trace_fpu2, tic80_trace_fpu1,
- tic80_trace_fpu2i) Update to use changed sim_fpu interface.
-
-Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (SIM_AC_OPTIONS_BITSIZE): Define.
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 23 10:19:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
- SIM_HOSTENDIAN, SIM_INLINE, SIM_RESERVED_BITS): Delete, moved to
- common.
- (SIM_EXTRA_CFLAGS): Update.
-
-Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 16 23:10:03 1997 Felix Lee <flee@cygnus.com>
-
- * sim-main.h (kill): macro was missing args.
- (SIGTRAP): define for MSVC.
-
-Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Sep 8 20:10:43 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * cpu.h (CPU_CIA): Define.
-
- * sim-main.h (struct sim_state): Delete halt_ok, path_to_halt,
- restart_ok, path_to_restart members.
- (struct sim_state): Delete reason, siggnal members.
-
-Thu Sep 4 17:21:23 1997 Doug Evans <dje@seba>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Thu Sep 4 17:45:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_open): Add memory before parsing arguments.
- (sim_read): Delete, replace with sim-hrw.
- (sim_write): Delete, replace with sim-hrw.
-
-Thu Sep 4 10:48:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_open): Use sim_do_command to add memory, only
- add memory if none already present.
- (sim_open): Move init of registers from here.
- (sim_create_inferior): To here. Init modules.
-
- * Makefile.in (SIM_OBJS): Add sim-memopt.o module.
-
- * sim-calls.c (sim_open): Add zero modulo arg to sim_core_attach.
-
-Mon Sep 1 11:06:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_open): Use sim_state_alloc
- (simulation): Delete.
-
-Sat Aug 30 09:40:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (do_trap): Unsigned `i' for unsigned iterator.
- (do_trap): Ditto for comparison with getpid.
-
-Wed Aug 27 18:13:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * config.in: Ditto.
-
-Wed Aug 27 13:41:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (do_st): Use U8_4 instead of V4_L8.
-
- * sim-calls.c (sim_open): Add call to sim_analyze_program, update
- call to sim_config.
-
- * sim-calls.c (sim_kill): Delete.
- (sim_create_inferior): Add ABFD argument. Initialize PC from ABFD
- and not SD.
- (sim_load): Delete, use sim-hload.c.
-
- * Makefile.in (SIM_OBJS): Add sim-hload.o module.
-
-Mon Aug 25 17:50:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * config.in: Ditto.
-
-Mon Aug 25 16:33:29 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_open): Add ABFD argument.
- (sim_open): Move sim_config call to just after argument
- parsing. Check return status.
-
-Fri Aug 8 21:52:27 1997 Mark Alexander <marka@cygnus.com>
-
- * sim-calls.c (sim_store_register): Allow accumulators
- other than A0 to be modified. Correct error message.
-
-Thu May 29 14:02:40 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * misc.c (tic80_trace_fpu3, tic80_trace_fpu2, tic80_trace_fpu1,
- tic80_trace_fpu2i): Pass in function prefix.
- (tic80_trace_ldst): Rewrite so it calls print_one_insn directly.
-
- * Makefile.in (SIM_OBJS): Include sim-watch.o module.
-
- * sim-main.h (WITH_WATCHPOINTS): Enable watchpoints.
-
- * ic (bitnum): Compute bitnum from BITNUM.
- * insn (bbo, bbz): Use.
-
- * insn: Convert long immediate instructions to igen long immediate
- form.
- * insn: Add disasembler information.
-
-Thu May 29 12:09:13 1997 Andrew Cagney <cagney@b2.cygnus.com>
-
- * alu.h (IMEM_IMMED): New macro, fetch 32bit immediate operand N.
-
- * insns (subu i): Immediate is signed not unsigned.
-
-Tue May 27 13:22:13 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
- (sim_write): Ditto for write.
-
-Tue May 20 09:33:31 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_load): Set STATE_LOADED_P.
-
- * sim-main.h: Include <unistd.h>.
-
- * sim-calls.c (sim_set_callback): Delete.
- (sim_open): Add/install callback argument.
- (sim_size): Delete.
-
-Mon May 19 18:59:33 1997 Mike Meissner <meissner@cygnus.com>
-
- * configure.in: Check for getpid, kill functions.
- * config{.in,ure}: Regenerate.
-
- * insns (do_trap): Add support for kill, getpid system calls.
-
- * sim-main.h (errno.h): Include.
- (getpid,kill): Define as NOPs if the host doesn't have them.
-
-Mon May 19 14:58:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_open): Set the simulator base magic number.
- (sim_load): Delete prototype of sim_load_file.
- (sim_open): Define sd to be &simulation.
-
-Fri May 16 14:35:30 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (illegal, fp_unavailable): Halt instead of abort the
- simulator.
-
- * insns: Replace calls to engine_error with sim_engine_abort.
- Ditto for engine_halt V sim_engine_halt.
-
-Tue May 13 15:24:12 1997 Andrew Cagney <cagney@b2.cygnus.com>
-
- * interp.c (engine_run_until_stop): Delete. Moved to common.
- (engine_step): Ditto.
- (engine_step): Ditto.
- (engine_halt): Ditto.
- (engine_restart): Ditto.
- (engine_halt): Ditto.
- (engine_error): Ditto.
-
- * sim-calls.c (sim_stop): Delete. Moved to common.
- (sim_stop_reason): Ditto.
- (sim_resume): Ditto.
-
- * Makefile.in (SIM_OBJS): Link in generic sim-engine, sim-run,
- sim-resume, sim-reason, sim-stop modules.
-
-Fri May 16 11:57:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ic (compute): Drop check for REG == 0, now always forced to
- zero.
-
- * cpu.h (GPR_SET): New macro update the gpr.
- * insns (do_add): Use GPR_SET to update the GPR register.
-
- * sim-calls.c (sim_fetch_register): Pretend that r0 is zero.
-
- * Makefile.in (tmp-igen): Specify zero-r0 so that every
- instruction clears r0.
-
- * interp.c (engine_run_until_stop): Igen now generates code to
- clear r0.
- (engine_step): Ditto.
-
-Thu May 15 11:45:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (do_shift): When rot==0 and zero/sign merge treat it as
- 32.
- (set_fp_reg): For interger conversion, use sim-fpu fpu2i
- functions.
- (do_fmpy): Perform iii and uuu using integer arithmetic.
-
- * Makefile.in (ENGINE_H): Assume everything depends on the fpu.
-
- * insns (get_fp_reg): Use sim_fpu_u32to to perform unsigned
- conversion.
- (do_fcmp): Update to use new fp compare functions. Make reg nr arg
- instead of reg. Stops fp overflow.
- (get_fp_reg): Assume val is valid when reg == 0.
- (set_fp_reg): Fix double conversion.
-
- * misc.c (tic80_trace_fpu1): New function, trace simple fp op.
-
- * insns (do_frnd): Add tracing.
-
- * cpu.h (TRACE_FPU1): Ditto.
-
- * insns (do_trap): Printf formatting.
-
-Wed May 14 18:05:50 1997 Mike Meissner <meissner@cygnus.com>
-
- * misc.c (tic80_trace_fpu{3,2,2i}): Align columns with other
- insns. Use %g to print floating point instead of %f in case the
- numbers are real large.
-
-Tue May 13 18:00:10 1997 Mike Meissner <meissner@cygnus.com>
-
- * insns (do_trap): For system calls that are defined, but not
- provided return EINVAL. Temporarily add traps 74-79 to just print
- the register state.
-
- * interp.c (engine_{run_until_stop,step}): Before executing
- instructions, make sure r0 == 0.
-
-Tue May 13 16:39:37 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (IMEM): Take full cia not just IP as argument.
-
- * interp.c (engine_run_until_stop): Delete handling of annuled
- instructions.
- (engine_step): Ditto.
-
- * insn (do_branch): New function.
- (do_bbo, do_bbz, do_bcnd, do_bsr, do_jsr): Use do_branch to handle
- annuled branches.
-
-Mon May 12 17:15:52 1997 Mike Meissner <meissner@cygnus.com>
-
- * insns (do_{ld,st}): Fix tracing for ld/st.
-
-Mon May 12 11:12:24 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_stop_reason): Restore keep_running after a
- CNTRL-C, don't re-clear it.
-
- * interp.c (engine_error): stop rather than signal with SIGABRT
- when an error.
-
- * insns (do_ld): For 64bit loads, always store LSW in rDest, MSW in
- rDest + 1. Also done by Michael Meissner <meissner@cygnus.com>
- (do_st): Converse for store.
-
- * misc.c (tic80_trace_fpu2i): Correct printf format for int type.
-
-Sun May 11 11:02:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_stop_reason): Return a SIGINT if keep_running
- was cleared.
-
- * interp.c (engine_step): New function. Single step the simulator
- taking care of cntrl-c during a step.
-
- * sim-calls.c (sim_resume): Differentiate between stepping and
- running so that a cntrl-c during a step is reported.
-
-Sun May 11 10:54:31 1997 Mark Alexander <marka@cygnus.com>
-
- * sim-calls.c (sim_fetch_register): Use correct reg base.
- (sim_store_register): Ditto.
-
-Sun May 11 10:25:14 1997 Michael Meissner <meissner@cygnus.com>
-
- * cpu.h (tic80_trace_shift): Add declaration.
- (TRACE_SHIFT): New macro to trace shift instructions.
-
- * misc.c (tic80_trace_alu2): Align spacing.
- (tic80_trace_shift): New function to trace shifts.
-
- * insns (lmo): Add missing 0b prefix to bits.
- (do_shift): Use ~ (unsigned32)0, instead of -1. Use TRACE_SHIFT
- instead of TRACE_ALU2.
- (sl r): Use EndMask as is, instead of using Source+1 register.
- (subu): Operands are unsigned, not signed.
- (do_{ld,st}): Fix endian problems with ld.d/st.d.
-
-Sat May 10 12:35:47 1997 Michael Meissner <meissner@cygnus.com>
-
- * insns (and{.tt,.tf,.ft,.ff}): Immediate values are unsigned, not
- signed.
-
-Fri May 9 15:47:36 1997 Mike Meissner <meissner@cygnus.com>
-
- * insns (cmp_vals,do_cmp): Produce the correct bits as specified
- by the architecture.
- (xor): Fix xor immediate patterns to use the correct bits.
-
-Fri May 9 09:55:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (long_immediate): Adjust the CIA delay-pointer as well as
- the NIA when a 64bit insn.
-
-Thu May 8 11:57:47 1997 Michael Meissner <meissner@cygnus.com>
-
- * insns (jsr,bsr): For non-allulled calls, set r31 so that the
- return address does not reexecute the instruction in the delay
- slot.
- (bbo,bbz): Complement bit number to reverse the one's complement
- that the assembler is required to do.
-
- * misc.c (tic80_trace_*): Change format slightly to accomidate
- real large decimal values.
-
-Thu May 8 14:07:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c (sim_do_command): Implement.
- (sim_store_register): Fix typo T2H v H2T.
-
-Wed May 7 11:48:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * cpu.h (TRACE_FPU2, TRACE_FPU3, TRACE_FPU2I): Add.
- * insn: Clean up fpu tracing.
-
- * sim-calls.c (sim_create_inferior): Start out with interrupts
- enabled.
-
- * cpu.h (TRACE_SINK3), misc.c (tic80_trace_sink3): Three argument
- sink
-
- * insns (rdcr, swcr, wrcr, brcr, rmo, lmo): Implement.
-
- * insns (do_*): Remove MY_INDEX/indx argument from support functions,
- igen now handles this.
-
- * cpu.h (CR): New macro - access TIc80 control registers.
-
- * misc.c: New file.
- (tic80_cr2index): New function, map control register opcode index
- into the internal CR enum.
-
- * interp.c
- (tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): Move from
- here
- * misc.c: to here.
-
- * Makefile.in (SIM_OBJS): Add misc.o.
-
-Tue May 6 15:22:58 1997 Mike Meissner <meissner@cygnus.com>
-
- * cpu.h ({,v}{S,D}P_FPR): Delete unused macros that won't work on
- big endian hosts.
- (tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): Declare
- new functions.
- (TRACE_{ALU{2,3},NOP,SINK{1,2},{,U}COND_BR,LD,ST}): New macros to
- trace various instruction types.
-
- * insns: Modify all instructions to support semantic tracing.
-
- * interp.c (toplevel): Include itable.h.
- (tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): New
- functions to provide semantic level tracing information.
-
-Mon May 5 11:50:43 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h: Update usage of core object to reflect recent changes in
- ../common/sim-*core.
- * sim-calls.c (sim_open): Ditto.
-
-Mon May 5 14:10:17 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insn (cmnd): No-op cache flushes.
-
- * insns (do_trap): Allow writes to STDERR.
-
- * Makefile.in (SIM_OBJS): Link in sim-fpu.o.
- (SIM_EXTRA_LIBS): Link in the math library.
-
- * alu.h: Add support for floating point unit using sim-alu.
-
- * insns (fadd, fsub, fmpy, fdiv, fcmp, frnd*): Implement.
-
-Fri May 2 14:57:14 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-calls.c: Include sim-utils.h and sim-options.h.
-
- * sim-main.h (sim_state): Drop sim_events and sim_core members,
- moved to simulator base type.
-
- * alu.h (IMEM, MEM, STORE): Update track changes in common
- directory.
-
- * insns: Drop cia argument from functions, igen now handles this.
-
- * interp.c (engine_init): Include string.h/strings.h to define
- memset et.al.
-
- * sim-main.h (sim_cia): Delcare, tracking common dir changes.
-
- * cpu.h (sim_cpu): Update instruction_address with sim_cia.
-
-Wed Apr 30 11:26:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-main.h (signal.h): Include so that SIG* available to all
- callers of sig_halt.
-
- * insns (do_shift): New function, implement shift operations.
- (do_trap): Add handler for trap 73 - SIGTRAP.
-
-Tue Apr 29 10:58:48 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * alu.h (MEM, STORE): Force addresses to be correctly aligned.
-
- * insns (do_jsr): Fix.
- (do_st, do_ld): Handle 64bit transfers.
- (do_trap): Match libgloss.
- (rdcr): Implement nop - Dest == r0 - variant.
-
- * sim-calls.c (sim_create_inferior): Initialize SP.
-
- * Makefile.in (ENGINE_H): Everything now depends on sim-options.h.
- (support.o): Depends on ENGINE_H.
-
- * cpu.h: Four accumulators.
-
- * Makefile.in (tmp-igen): Include line number information in
- generated files.
-
- * insns (dld, dst): Fill in.
-
-Mon Apr 28 13:02:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (vld): Fix instruction format wrong.
-
-Thu Apr 24 16:43:09 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * dc: Add additional rules so that minor opcode files are
- detected.
- * insns: Enable more instructions.
-
- * sim-calls.c (sim_fetch_register,sim_store_register, sim_write):
- Implement.
-
-Thu Apr 24 00:39:51 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure: Regenerated to track ../common/aclocal.m4 changes.
- * Makefile.in (SIM_OBJS): Add sim-module.o, sim-profile.o.
- * sim-calls.c (sim_open): Call sim_module_uninstall if argument
- parsing fails. Call sim_post_argv_init.
- (sim_close): Call sim_module_uninstall.
-
-Wed Apr 23 20:05:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * insns (and, bbo, bcnd, bsr, dcache, jsr, or, xor, nor): Enable.
- * ic: Add fields for enabled instructions.
-
+++ /dev/null
-# Makefile for blah ...
-# Copyright blah ...
-
-
-
-## COMMON_PRE_CONFIG_FRAG
-
-# These variables are given default values in COMMON_PRE_CONFIG_FRAG.
-# We override the ones we need to here.
-# Not all of these need to be mentioned, only the necessary ones.
-
-# List of object files, less common parts.
-SIM_OBJS = \
- $(SIM_NEW_COMMON_OBJS) \
- support.o idecode.o semantics.o itable.o misc.o \
- sim-engine.o \
- sim-calls.o \
- sim-hload.o \
- sim-hrw.o \
- sim-reason.o \
- sim-resume.o \
- sim-run.o \
- sim-stop.o \
-
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = itable.h idecode.h cpu.h alu.h
-
-# List of extra libraries to link with
-SIM_EXTRA_LIBS = -lm
-
-# List of generators
-SIM_GEN=tmp-igen
-
-# List of flags to always pass to $(CC).
-
-SIM_EXTRA_CFLAGS = \
- -DWITH_TARGET_WORD_MSB=31
-
-# List of main object files for `run'.
-SIM_RUN_OBJS = nrun.o
-
-# Dependency of `clean' to clean any extra files.
-SIM_EXTRA_CLEAN = clean-igen
-
-
-## COMMON_POST_CONFIG_FRAG
-
-# Rules need to build $(SIM_OBJS), plus whatever else the target wants.
-
-# ... target specific rules ...
-
-BUILT_SRC_FROM_IGEN = \
- icache.h \
- icache.c \
- idecode.h \
- idecode.c \
- semantics.h \
- semantics.c \
- model.h \
- model.c \
- support.h \
- support.c \
- itable.h itable.c
-$(BUILT_SRC_FROM_IGEN): tmp-igen
-#
-
-.PHONY: clean-igen
-clean-igen:
- rm -f $(BUILT_SRC_FROM_IGEN)
- rm -f tmp-igen tmp-insns
-
-../igen/igen:
- cd ../igen && $(MAKE)
-
-tmp-igen: $(srcdir)/tic80.dc $(srcdir)/tic80.igen $(srcdir)/tic80.ic ../igen/igen
- cd ../igen && $(MAKE)
- ../igen/igen \
- -F f \
- -G direct-access \
- -G delayed-branch \
- -G zero-r0 \
- -F short,emul \
- -B 32 -H 31 \
- -o $(srcdir)/tic80.dc \
- -k $(srcdir)/tic80.ic \
- -i $(srcdir)/tic80.igen \
- -n icache.h -hc tmp-icache.h \
- -n icache.c -c tmp-icache.c \
- -n semantics.h -hs tmp-semantics.h \
- -n semantics.c -s tmp-semantics.c \
- -n idecode.h -hd tmp-idecode.h \
- -n idecode.c -d tmp-idecode.c \
- -n model.h -hm tmp-model.h \
- -n model.c -m tmp-model.c \
- -n support.h -hf tmp-support.h \
- -n support.c -f tmp-support.c \
- -n itable.h -ht tmp-itable.h \
- -n itable.c -t tmp-itable.c
- $(srcdir)/../../move-if-change tmp-icache.h icache.h
- $(srcdir)/../../move-if-change tmp-icache.c icache.c
- $(srcdir)/../../move-if-change tmp-idecode.h idecode.h
- $(srcdir)/../../move-if-change tmp-idecode.c idecode.c
- $(srcdir)/../../move-if-change tmp-semantics.h semantics.h
- $(srcdir)/../../move-if-change tmp-semantics.c semantics.c
- $(srcdir)/../../move-if-change tmp-model.h model.h
- $(srcdir)/../../move-if-change tmp-model.c model.c
- $(srcdir)/../../move-if-change tmp-support.h support.h
- $(srcdir)/../../move-if-change tmp-support.c support.c
- $(srcdir)/../../move-if-change tmp-itable.h itable.h
- $(srcdir)/../../move-if-change tmp-itable.c itable.c
- touch tmp-igen
-
-ENGINE_H = \
- sim-main.h \
- $(srcdir)/../common/sim-basics.h \
- config.h \
- $(srcdir)/../common/sim-config.h \
- $(srcdir)/../common/sim-inline.h \
- $(srcdir)/../common/sim-types.h \
- $(srcdir)/../common/sim-bits.h \
- $(srcdir)/../common/sim-endian.h \
- $(srcdir)/../common/sim-options.h \
- itable.h \
- idecode.h \
- cpu.h \
- alu.h \
- $(srcdir)/../common/sim-alu.h \
- $(srcdir)/../common/sim-core.h \
- $(srcdir)/../common/sim-events.h \
- $(srcdir)/../common/sim-fpu.h \
- $(srcdir)/../common/sim-engine.h \
-
-idecode.o: $(ENGINE_H)
-semantics.o: $(ENGINE_H)
-support.o: $(ENGINE_H)
-interp.o: interp.c $(ENGINE_H)
-sim-calls.o: sim-calls.c $(ENGINE_H)
-cpu.o: cpu.c $(ENGINE_H)
-misc.o: $(ENGINE_H)
\ No newline at end of file
+++ /dev/null
-
-/* Define to 1 if NLS is requested. */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have catgets and don't want to use GNU gettext. */
-#undef HAVE_CATGETS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+++ /dev/null
-/* Texas Instruments TMS320C80 (MVP) Simulator.
- Copyright (C) 1997 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
-This file is part of GDB, the GNU debugger.
-
-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, 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. */
-
-
-
-#ifndef _TIC80_ALU_H_
-#define _TIC80_ALU_H_
-
-#define ALU_CARRY 0 /* FIXME */
-
-#define ALU32_END(TARG) \
-{ \
- (TARG) = ALU32_RESULT; /* FIXME */ \
-}
-
-#define ALU_END(TARG) ALU32_END(TARG)
-
-#include "sim-alu.h"
-
-
-
-/* Bring data in from the cold */
-
-#define IMEM32(CIA) \
-(sim_core_read_aligned_4(STATE_CPU (sd, 0), CIA, exec_map, (CIA).ip))
-
-#define IMEM32_IMMED(CIA, N) \
-(sim_core_read_aligned_4 (STATE_CPU (sd, 0), CIA, exec_map, (CIA).ip + 4 * (N)))
-
-#define MEM(SIGN, EA, NR_BYTES) \
-((SIGN##_##NR_BYTES) sim_core_read_unaligned_##NR_BYTES (STATE_CPU (sd, 0), cia, \
- read_map, \
- (EA)))
-
-#define STORE(EA, NR_BYTES, VAL) \
-do { \
- sim_core_write_unaligned_##NR_BYTES (STATE_CPU (sd, 0), cia, \
- write_map, \
- (EA), (VAL)); \
-} while (0)
-
-
-#define long_immediate(VARIABLE) \
- unsigned_word VARIABLE = MEM (unsigned, nia.ip, 4); \
- cia.dp += sizeof (instruction_word); \
- nia.ip += sizeof (instruction_word); \
- nia.dp += sizeof (instruction_word);
-
-
-
-/* Floating point support */
-
-#define IS_FP_AVAILABLE ((CPU)->cr[IE_CR] & IE_CR_IE)
-
-#include "sim-fpu.h"
-
-
-#endif
+++ /dev/null
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define to 1 if NLS is requested. */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the __setfpucw function. */
-#undef HAVE___SETFPUCW
-
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the getpid function. */
-#undef HAVE_GETPID
-
-/* Define if you have the getrusage function. */
-#undef HAVE_GETRUSAGE
-
-/* Define if you have the kill function. */
-#undef HAVE_KILL
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the sigaction function. */
-#undef HAVE_SIGACTION
-
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
-
-/* Define if you have the time function. */
-#undef HAVE_TIME
-
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <fpu_control.h> header file. */
-#undef HAVE_FPU_CONTROL_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
+++ /dev/null
-#! /bin/sh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-sim_inline="-DDEFAULT_INLINE=0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This file is derived from `gettext.m4'. The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-
-
-
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-
-
-
-# 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.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --disable-nls do not use Native Language Support"
-ac_help="$ac_help
- --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
- --enable-maintainer-mode Enable developer functionality."
-ac_help="$ac_help
- --enable-sim-bswap Use Host specific BSWAP instruction."
-ac_help="$ac_help
- --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
-ac_help="$ac_help
- --enable-sim-debug=opts Enable debugging flags"
-ac_help="$ac_help
- --enable-sim-stdio Specify whether to use stdio for console input/output."
-ac_help="$ac_help
- --enable-sim-trace=opts Enable tracing flags"
-ac_help="$ac_help
- --enable-sim-profile=opts Enable profiling flags"
-ac_help="$ac_help
- --enable-sim-inline=inlines Specify which functions should be inlined."
-ac_help="$ac_help
- --enable-sim-endian=endian Specify target byte endian orientation."
-ac_help="$ac_help
- --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
-ac_help="$ac_help
- --enable-sim-hostendian=end Specify host byte endian orientation."
-ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
-ac_help="$ac_help
- --enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
-ac_help="$ac_help
- --enable-sim-bitsize=N Specify target bitsize (32 or 64)."
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-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"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$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" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*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" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # 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
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- 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
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$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 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$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" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- 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" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- 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_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- 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-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-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- 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" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$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 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # 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'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*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" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- 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-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" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- 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"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; 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
-
-# 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
-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" ;;
- 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
-
-# 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
-
-# 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=Makefile.in
-
-# 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=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-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; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-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
-
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:693: checking how to run the C preprocessor" >&5
-# 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"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 708 "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:714: \"$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
- :
-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 725 "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:731: \"$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
- :
-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 742 "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:748: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:800: 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
-else
- echo "$ac_t""no" 1>&6
- ISC=
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:821: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 826 "configure"
-#include "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:834: \"$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*
- 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
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 851 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-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 869 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-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
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 890 "configure"
-#include "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); }
-
-EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:925: 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 930 "configure"
-#include "confdefs.h"
-
-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;
-}
-{ /* 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:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- 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
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1000: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1007 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1040: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1045 "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])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_off_t=yes
-else
- rm -rf conftest*
- ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
- cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1073: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1078 "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])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
-else
- rm -rf conftest*
- ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-fi
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1108: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1113 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1141: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1146 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1206: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1211 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- 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
-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:1236: 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 1241 "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:1264: \"$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
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
- 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:1291: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-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:1343: 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 1348 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1353: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1382: 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 1387 "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:1410: \"$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
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1435: 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
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- 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
- 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.
-
- 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>
-
-/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-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);
-}
-
-EOF
-if { (eval echo configure:1583: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1606: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1611 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1639: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1644 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# autoconf.info says this should be called right after AC_INIT.
-
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
-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.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# 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:1718: checking host system type" >&5
-
-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
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1739: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1757: checking build system type" >&5
-
-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
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-# 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:1801: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- 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"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1831: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- 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"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1882: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- 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="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1914: 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
-
-#line 1925 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1930: \"$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
-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
-
-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:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1961: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-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:1989: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# 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:2032: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
- CC_FOR_BUILD='$(CC)'
-else
- CC_FOR_BUILD=gcc
-fi
-
-
-
-
-AR=${AR-ar}
-
-# 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:2100: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-ALL_LINGUAS=
-
- for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2135: 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 2140 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2145: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
- for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: 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 2180 "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:2203: \"$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
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
- for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2232: 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 2237 "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:2260: \"$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
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2294: checking for LC_MESSAGES" >&5
-if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2299 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
- if test $am_cv_val_LC_MESSAGES = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
- fi
- fi
- echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2327: checking whether NLS is requested" >&5
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi
-
- echo "$ac_t""$USE_NLS" 1>&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
-
- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2347: checking whether included gettext is requested" >&5
- # Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi
-
- echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=NONE
-
- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2366: checking for libintl.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2371 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2376: \"$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"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2393: checking for gettext in libc" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2398 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- gt_cv_func_gettext_libc=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2421: checking for bindtextdomain in -lintl" >&5
-ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2456: checking for gettext in libintl" >&5
-if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2461 "configure"
-#include "confdefs.h"
-
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- gt_cv_func_gettext_libintl=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-EOF
-
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2496: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- if test "$MSGFMT" != "no"; then
- for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2530: 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 2535 "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:2558: \"$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
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2585: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$GMSGFMT" in
- /*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
- *)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CATOBJEXT=.mo
- DATADIRNAME=lib
-fi
-rm -f conftest*
- INSTOBJEXT=.mo
- fi
- fi
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
- if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2693: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$ac_t""$MSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2727: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$GMSGFMT" in
- /*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
- ;;
- *)
- 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_path_GMSGFMT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
- echo "$ac_t""$GMSGFMT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2763: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$ac_t""$XGETTEXT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2853: checking for catalogs to be installed" >&5
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$ac_t""$LINGUAS" 1>&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2881: checking for linux/version.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$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"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- msgformat=linux
-else
- echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
-
-
- if test -d $srcdir/po; then
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
-
-
-# Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2960: 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 2965 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2970: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_hdr in sys/time.h sys/resource.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3000: 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 3005 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3010: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_hdr in fcntl.h fpu_control.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3040: 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 3045 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3050: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_hdr in dlfcn.h errno.h sys/stat.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3080: 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 3085 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3090: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_func in getrusage time sigaction __setfpucw
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3119: 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 3124 "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:3147: \"$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
-
-
-# Check for socket libraries
-echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3174: checking for bind in -lsocket" >&5
-ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bind();
-
-int main() {
-bind()
-; return 0; }
-EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lsocket $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3221: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3229 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lnsl $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-. ${srcdir}/../../bfd/configure.host
-
-
-
-USE_MAINTAINER_MODE=no
-# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- case "${enableval}" in
- yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
- no) MAINT="#" ;;
- *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
-esac
-if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
- echo "Setting maintainer mode" 6>&1
-fi
-else
- MAINT="#"
-fi
-
-
-
-# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
-if test "${enable_sim_bswap+set}" = set; then
- enableval="$enable_sim_bswap"
- case "${enableval}" in
- yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
- no) sim_bswap="-DWITH_BSWAP=0";;
- *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
- echo "Setting bswap flags = $sim_bswap" 6>&1
-fi
-else
- sim_bswap=""
-fi
-
-
-
-# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
-if test "${enable_sim_cflags+set}" = set; then
- enableval="$enable_sim_cflags"
- case "${enableval}" in
- yes) sim_cflags="-O2 -fomit-frame-pointer";;
- trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
- no) sim_cflags="";;
- *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
- echo "Setting sim cflags = $sim_cflags" 6>&1
-fi
-else
- sim_cflags=""
-fi
-
-
-
-# Check whether --enable-sim-debug or --disable-sim-debug was given.
-if test "${enable_sim_debug+set}" = set; then
- enableval="$enable_sim_debug"
- case "${enableval}" in
- yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
- no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
- *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
- echo "Setting sim debug = $sim_debug" 6>&1
-fi
-else
- sim_debug=""
-fi
-
-
-
-# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
-if test "${enable_sim_stdio+set}" = set; then
- enableval="$enable_sim_stdio"
- case "${enableval}" in
- yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
- no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
- *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
- echo "Setting stdio flags = $sim_stdio" 6>&1
-fi
-else
- sim_stdio=""
-fi
-
-
-
-# Check whether --enable-sim-trace or --disable-sim-trace was given.
-if test "${enable_sim_trace+set}" = set; then
- enableval="$enable_sim_trace"
- case "${enableval}" in
- yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
- no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
- [-0-9]*)
- sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
- [a-z]*)
- sim_trace=""
- for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- if test x"$sim_trace" = x; then
- sim_trace="-DWITH_TRACE='(TRACE_$x"
- else
- sim_trace="${sim_trace}|TRACE_$x"
- fi
- done
- sim_trace="$sim_trace)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
- echo "Setting sim trace = $sim_trace" 6>&1
-fi
-else
- sim_trace=""
-fi
-
-
-
-# Check whether --enable-sim-profile or --disable-sim-profile was given.
-if test "${enable_sim_profile+set}" = set; then
- enableval="$enable_sim_profile"
- case "${enableval}" in
- yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
- no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
- [-0-9]*)
- sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
- [a-z]*)
- sim_profile=""
- for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- if test x"$sim_profile" = x; then
- sim_profile="-DWITH_PROFILE='(PROFILE_$x"
- else
- sim_profile="${sim_profile}|PROFILE_$x"
- fi
- done
- sim_profile="$sim_profile)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
- echo "Setting sim profile = $sim_profile" 6>&1
-fi
-else
- sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
-fi
-
-
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3416: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3421 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3460: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-sim_link_files=
-sim_link_links=
-
-sim_link_links=tconfig.h
-if test -f ${srcdir}/tconfig.in
-then
- sim_link_files=tconfig.in
-else
- sim_link_files=../common/tconfig.in
-fi
-
-# targ-vals.def points to the libc macro description file.
-case "${target}" in
-*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
-esac
-sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
-sim_link_links="${sim_link_links} targ-vals.def"
-
-
-
-
-default_sim_inline="-DDEFAULT_INLINE=0"
-# Check whether --enable-sim-inline or --disable-sim-inline was given.
-if test "${enable_sim_inline+set}" = set; then
- enableval="$enable_sim_inline"
- sim_inline=""
-case "$enableval" in
- no) sim_inline="-DDEFAULT_INLINE=0";;
- 0) sim_inline="-DDEFAULT_INLINE=0";;
- yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
- 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
- *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
- new_flag=""
- case "$x" in
- *_INLINE=*) new_flag="-D$x";;
- *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
- *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
- *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
- esac
- if test x"$sim_inline" = x""; then
- sim_inline="$new_flag"
- else
- sim_inline="$sim_inline $new_flag"
- fi
- done;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
- echo "Setting inline flags = $sim_inline" 6>&1
-fi
-else
-
-if test "x$cross_compiling" = "xno"; then
- if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
- sim_inline="${default_sim_inline}"
- if test x"$silent" != x"yes"; then
- echo "Setting inline flags = $sim_inline" 6>&1
- fi
- else
- sim_inline=""
- fi
-else
- sim_inline="-DDEFAULT_INLINE=0"
-fi
-fi
-
-
-wire_endian="LITTLE_ENDIAN"
-default_endian=""
-# Check whether --enable-sim-endian or --disable-sim-endian was given.
-if test "${enable_sim_endian+set}" = set; then
- enableval="$enable_sim_endian"
- case "${enableval}" in
- b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
- l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
- yes) if test x"$wire_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
- else
- if test x"$default_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
- else
- echo "No hard-wired endian for target $target" 1>&6
- sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
- fi
- fi;;
- no) if test x"$default_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
- else
- if test x"$wire_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
- else
- echo "No default endian for target $target" 1>&6
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
- fi
- fi;;
- *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
- echo "Setting endian flags = $sim_endian" 6>&1
-fi
-else
- if test x"$default_endian" != x; then
- sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-else
- if test x"$wire_endian" != x; then
- sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
- else
- sim_endian=
- fi
-fi
-fi
-
-wire_alignment="FORCED_ALIGNMENT"
-default_alignment=""
-
-# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
-if test "${enable_sim_alignment+set}" = set; then
- enableval="$enable_sim_alignment"
- case "${enableval}" in
- strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
- nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
- forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
- yes) if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
- else
- if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
- else
- echo "No hard-wired alignment for target $target" 1>&6
- sim_alignment="-DWITH_ALIGNMENT=0"
- fi
- fi;;
- no) if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
- else
- if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
- else
- echo "No default alignment for target $target" 1>&6
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
- fi
- fi;;
- *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
- echo "Setting alignment flags = $sim_alignment" 6>&1
-fi
-else
- if test x"$default_alignment" != x; then
- sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-else
- if test x"$wire_alignment" != x; then
- sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
- else
- sim_alignment=
- fi
-fi
-fi
-
-
-# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
-if test "${enable_sim_hostendian+set}" = set; then
- enableval="$enable_sim_hostendian"
- case "${enableval}" in
- no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
- b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
- l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
- *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
- echo "Setting hostendian flags = $sim_hostendian" 6>&1
-fi
-else
-
-if test "x$cross_compiling" = "xno"; then
- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3666: 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
-else
- ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3673 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3688 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- 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
-fi
-rm -f conftest*
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
- cat > conftest.$ac_ext <<EOF
-#line 3719 "configure"
-#include "confdefs.h"
-main () {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-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
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
- if test $ac_cv_c_bigendian = yes; then
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
- else
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
- fi
-else
- sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
-fi
-fi
-
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
- yes) ;;
- no) build_warnings="-w";;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-WARN_CFLAGS=""
-WERROR_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
-else
- build_warnings=""
-fi
-
-
-default_sim_reserved_bits="1"
-# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
-if test "${enable_sim_reserved_bits+set}" = set; then
- enableval="$enable_sim_reserved_bits"
- case "${enableval}" in
- yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
- no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
- *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
- echo "Setting reserved flags = $sim_reserved_bits" 6>&1
-fi
-else
- sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
-fi
-
-wire_word_bitsize="32"
-wire_word_msb="31"
-wire_address_bitsize=""
-wire_cell_bitsize=""
-# Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
-if test "${enable_sim_bitsize+set}" = set; then
- enableval="$enable_sim_bitsize"
- sim_bitsize=
-case "${enableval}" in
- 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
- 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
- 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
- 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
- 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
- sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
- else
- sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
- fi ;;
- 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
- sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
- else
- sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
- fi ;;
- *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-# address bitsize
-tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
-case x"${tmp}" in
- x ) ;;
- x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
- x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
- * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-# cell bitsize
-tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
-case x"${tmp}" in
- x ) ;;
- x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
- x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
- * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
- echo "Setting bitsize flags = $sim_bitsize" 6>&1
-fi
-else
- sim_bitsize=""
-if test x"$wire_word_bitsize" != x; then
- sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
-fi
-if test x"$wire_word_msb" != x; then
- sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
-fi
-if test x"$wire_address_bitsize" != x; then
- sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
-fi
-if test x"$wire_cell_bitsize" != x; then
- sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
-fi
-fi
-
-
-for ac_hdr in stdlib.h unistd.h string.h strings.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3881: 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 3886 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3891: \"$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"
-fi
-rm -f conftest*
-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
-fi
-done
-
-for ac_func in getpid kill
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3920: 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 3925 "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:3948: \"$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
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# 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.
-#
-# 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.
-#
-EOF
-# 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
- if test -w $cache_file; then
- 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.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-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}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# 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.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-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
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# 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%@sim_environment@%$sim_environment%g
-s%@sim_alignment@%$sim_alignment%g
-s%@sim_assert@%$sim_assert%g
-s%@sim_bitsize@%$sim_bitsize%g
-s%@sim_endian@%$sim_endian%g
-s%@sim_hostendian@%$sim_hostendian%g
-s%@sim_float@%$sim_float%g
-s%@sim_scache@%$sim_scache%g
-s%@sim_default_model@%$sim_default_model%g
-s%@sim_hw_cflags@%$sim_hw_cflags%g
-s%@sim_hw_objs@%$sim_hw_objs%g
-s%@sim_hw@%$sim_hw%g
-s%@sim_inline@%$sim_inline%g
-s%@sim_packages@%$sim_packages%g
-s%@sim_regparm@%$sim_regparm%g
-s%@sim_reserved_bits@%$sim_reserved_bits%g
-s%@sim_smp@%$sim_smp%g
-s%@sim_stdcall@%$sim_stdcall%g
-s%@sim_xor_endian@%$sim_xor_endian%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
-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%@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%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_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%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@MAINT@%$MAINT%g
-s%@sim_bswap@%$sim_bswap%g
-s%@sim_cflags@%$sim_cflags%g
-s%@sim_debug@%$sim_debug%g
-s%@sim_stdio@%$sim_stdio%g
-s%@sim_trace@%$sim_trace%g
-s%@sim_profile@%$sim_profile%g
-s%@EXEEXT@%$EXEEXT%g
-
-CEOF
-EOF
-
-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
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- 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`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
-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" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # 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=
- fi
-
- 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" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- 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= ;;
- 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*
-
-# 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_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
- # 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" ;;
- 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
-
-# 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.
-
-rm -f conftest.tail
-while :
-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
- 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
- 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
- fi
-fi; done
-
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$sim_link_files"
-ac_dests="$sim_link_links"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
- echo "linking $srcdir/$ac_source to $ac_dest"
-
- if test ! -r $srcdir/$ac_source; then
- { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
- # The dest file is in a subdirectory.
- test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dest_dir_suffix= ac_dots=
- fi
-
- case "$srcdir" in
- [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
- *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
- esac
-
- # Make a symlink if possible; otherwise try a hard link.
- if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest; then :
- else
- { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
- fi
-done
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-case "x$CONFIG_FILES" in
- xMakefile*)
- echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
- rm -f Makesim1.tmp Makesim2.tmp Makefile
- sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
- sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
- sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
- -e '/^## COMMON_POST_/ r Makesim2.tmp' \
- <Makefile.sim >Makefile
- rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
- ;;
- esac
- case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
+++ /dev/null
-dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
-AC_PREREQ(2.5)dnl
-AC_INIT(Makefile.in)
-
-SIM_AC_COMMON
-
-dnl Options available in this module
-SIM_AC_OPTION_INLINE(0)
-SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
-SIM_AC_OPTION_ALIGNMENT(FORCED_ALIGNMENT)
-SIM_AC_OPTION_HOSTENDIAN
-SIM_AC_OPTION_WARNINGS
-SIM_AC_OPTION_RESERVED_BITS(1)
-SIM_AC_OPTION_BITSIZE(32,31)
-
-dnl For UNIX emulation
-AC_CHECK_HEADERS(stdlib.h unistd.h string.h strings.h)
-AC_CHECK_FUNCS(getpid kill)
-
-SIM_AC_OUTPUT
+++ /dev/null
-/* TIc80 Simulator.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
-This file is part of GDB, the GNU debugger.
-
-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, 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. */
-
-
-
-/* TI C80 control registers */
-
-typedef enum {
- EPC_CR,
- EIP_CR,
- CONFIG_CR,
- INTPEN_CR,
- IE_CR,
- FPST_CR,
- PPERROR_CR,
- PKTREQ_CR,
- TCOUNT_CR,
- TSCALE_CR,
- FLTOP_CR,
- FLTADR_CR,
- FLTTAG_CR,
- FLTDLT_CR,
- FLTDTH_CR,
- FLT005_CR,
- FLT006_CR,
- FLT007_CR,
- FLT008_CR,
- FLT009_CR,
- FLT010_CR,
- FLT011_CR,
- FLT012_CR,
- FLT013_CR,
- FLT014_CR,
- FLT015_CR,
- SYSSTK_CR,
- SYSTMP_CR,
- MPC_CR,
- MIP_CR,
- ECOMCNTL_CR,
- ANASTAT_CR,
- BRK1_CR,
- BRK2_CR,
- ITAG0_CR,
- ITAG1_CR,
- ITAG2_CR,
- ITAG3_CR,
- ITAG4_CR,
- ITAG5_CR,
- ITAG6_CR,
- ITAG7_CR,
- ITAG8_CR,
- ITAG9_CR,
- ITAG10_CR,
- ITAG11_CR,
- ITAG12_CR,
- ITAG13_CR,
- ITAG14_CR,
- ITAG15_CR,
- ILRU_CR,
- DTAG0_CR,
- DTAG1_CR,
- DTAG2_CR,
- DTAG3_CR,
- DTAG4_CR,
- DTAG5_CR,
- DTAG6_CR,
- DTAG7_CR,
- DTAG8_CR,
- DTAG9_CR,
- DTAG10_CR,
- DTAG11_CR,
- DTAG12_CR,
- DTAG13_CR,
- DTAG14_CR,
- DTAG15_CR,
- DLRU_CR,
- IN0P_CR,
- IN1P_CR,
- OUTP_CR,
- SCRATCH_CR,
- nr_tic80_control_regs,
-} tic80_control_regs;
-
-/* extern int tic80_cr2index (tic80_control_regs reg); */
-
-/* Map an instruction CR index onto the corresponding internal cr enum
- or SCRATCH_CR if the index is invalid */
-
-extern tic80_control_regs tic80_index2cr (int index);
-
-
-/* TIc80 interrupt register bits */
-
-enum {
- IE_CR_PE = BIT32(31),
- IE_CR_X4 = BIT32(30),
- IE_CR_X3 = BIT32(29),
- IE_CR_BP = BIT32(28),
- IE_CR_PB = BIT32(27),
- IE_CR_PC = BIT32(26),
- IE_CR_MI = BIT32(25),
- /**/
- IE_CR_P3 = BIT32(19),
- IE_CR_P2 = BIT32(18),
- IE_CR_P1 = BIT32(17),
- IE_CR_P0 = BIT32(16),
- IE_CR_IO = BIT32(15),
- IE_CR_MF = BIT32(14),
- /**/
- IE_CR_X2 = BIT32(12),
- IE_CR_X1 = BIT32(11),
- IE_CR_TI = BIT32(10),
- IE_CR_F1 = BIT32(9),
- IE_CR_F0 = BIT32(8),
- IE_CR_FX = BIT32(7),
- IE_CR_FU = BIT32(6),
- IE_CR_FO = BIT32(5),
- /**/
- IE_CR_FZ = BIT32(3),
- IE_CR_FI = BIT32(2),
- /**/
- IE_CR_IE = BIT32(0),
-};
-
-
-
-
-struct _sim_cpu {
- unsigned32 reg[32];
- unsigned64 acc[4];
- unsigned32 cr[nr_tic80_control_regs];
- int is_user_mode; /* hidden mode latch */
- sim_cia cia;
- sim_cpu_base base;
-};
-
-#define CIA_GET(CPU) ((CPU)->cia)
-#define CIA_SET(CPU,VAL) ((CPU)->cia = (VAL))
-
-#define GPR(N) ((CPU)->reg[N])
-#define GPR_CLEAR(N) (GPR((N)) = 0)
-#define ACC(N) ((CPU)->acc[N])
-#define CR(N) ((CPU)->cr[tic80_index2cr ((N))])
-
-
-
-#if defined(WITH_TRACE)
-extern char *tic80_trace_alu3 PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_cmp PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_alu2 PARAMS ((int, unsigned32, unsigned32));
-extern char *tic80_trace_shift PARAMS ((int, unsigned32, unsigned32, int, int, int, int, int));
-extern void tic80_trace_fpu3 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu2 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu1 PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *));
-extern void tic80_trace_fpu2i PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu2cmp PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
-extern char *tic80_trace_nop PARAMS ((int));
-extern char *tic80_trace_sink1 PARAMS ((int, unsigned32));
-extern char *tic80_trace_sink2 PARAMS ((int, unsigned32, unsigned32));
-extern char *tic80_trace_sink3 PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_cond_br PARAMS ((int, int, unsigned32, unsigned32, int, int));
-extern char *tic80_trace_ucond_br PARAMS ((int, unsigned32));
-extern void tic80_trace_ldst PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, int, int, int, unsigned32, unsigned32, unsigned32));
-
-#define TRACE_ALU3(indx, result, input1, input2) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "alu", \
- tic80_trace_alu3 (indx, result, input1, input2)); \
- } \
-} while (0)
-
-#define TRACE_CMP(indx, result, input1, input2) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "alu", \
- tic80_trace_cmp (indx, result, input1, input2)); \
- } \
-} while (0)
-
-#define TRACE_ALU2(indx, result, input) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "alu", \
- tic80_trace_alu2 (indx, result, input)); \
- } \
-} while (0)
-
-#define TRACE_SHIFT(indx, result, input, i, n, merge, endmask, rotate) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "shift", \
- tic80_trace_shift (indx, result, input, i, n, \
- merge, endmask, rotate)); \
- } \
-} while (0)
-
-#define TRACE_FPU3(result, input1, input2) \
-do { \
- if (TRACE_FPU_P (CPU)) { \
- tic80_trace_fpu3 (SD, CPU, cia, MY_INDEX, \
- &result, &input1, &input2); \
- } \
-} while (0)
-
-#define TRACE_FPU2(result, input) \
-do { \
- if (TRACE_FPU_P (CPU)) { \
- tic80_trace_fpu2 (SD, CPU, cia, MY_INDEX, \
- &result, &input); \
- } \
-} while (0)
-
-#define TRACE_FPU1(result) \
-do { \
- if (TRACE_FPU_P (CPU)) { \
- tic80_trace_fpu1 (SD, CPU, cia, MY_INDEX, \
- &result); \
- } \
-} while (0)
-
-#define TRACE_FPU2I(result, input1, input2) \
-do { \
- if (TRACE_FPU_P (CPU)) { \
- tic80_trace_fpu2i (SD, CPU, cia, MY_INDEX, \
- result, &input1, &input2); \
- } \
-} while (0)
-
-#define TRACE_FPU2CMP(result, input1, input2) \
-do { \
- if (TRACE_FPU_P (CPU)) { \
- tic80_trace_fpu2cmp (SD, CPU, cia, MY_INDEX, \
- result, &input1, &input2); \
- } \
-} while (0)
-
-#define TRACE_NOP(indx) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "nop", \
- tic80_trace_nop (indx)); \
- } \
-} while (0)
-
-#define TRACE_SINK1(indx, input) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "nop", \
- tic80_trace_sink1 (indx, input)); \
- } \
-} while (0)
-
-#define TRACE_SINK2(indx, input1, input2) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "nop", \
- tic80_trace_sink2 (indx, input1, input2)); \
- } \
-} while (0)
-
-#define TRACE_SINK3(indx, input1, input2, input3) \
-do { \
- if (TRACE_ALU_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "nop", \
- tic80_trace_sink3 (indx, input1, input2, input3)); \
- } \
-} while (0)
-
-#define TRACE_COND_BR(indx, jump_p, cond, target, size, code) \
-do { \
- if (TRACE_BRANCH_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "branch", \
- tic80_trace_cond_br (indx, jump_p, cond, target, \
- size, code)); \
- } \
-} while (0)
-
-#define TRACE_UCOND_BR(indx, target) \
-do { \
- if (TRACE_BRANCH_P (CPU)) { \
- trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file, \
- itable[indx].line_nr, "branch", \
- tic80_trace_ucond_br (indx, target)); \
- } \
-} while (0)
-
-#define TRACE_LD(result, m, s, addr1, addr2) \
-do { \
- if (TRACE_MEMORY_P (CPU)) { \
- tic80_trace_ldst (SD, CPU, cia, MY_INDEX, \
- 0, m, s, result, addr1, addr2); \
- } \
-} while (0)
-
-#define TRACE_ST(value, m, s, addr1, addr2) \
-do { \
- if (TRACE_MEMORY_P (CPU)) { \
- tic80_trace_ldst (SD, CPU, cia, MY_INDEX, \
- 1, m, s, value, addr1, addr2); \
- } \
-} while (0)
-
-#else
-#define TRACE_ALU3(indx, result, input1, input2)
-#define TRACE_ALU2(indx, result, input)
-#define TRACE_FPU3(result, input1, input2)
-#define TRACE_FPU2(result, input)
-#define TRACE_FPU1(result)
-#define TRACE_FPU2I(result, input1, input2)
-#define TRACE_NOP(indx)
-#define TRACE_SINK1(indx, input)
-#define TRACE_SINK2(indx, input1, input2)
-#define TRACE_SINK3(indx, input1, input2, input3)
-#define TRACE_COND_BR(indx, jump_p, cond, target, size, code)
-#define TRACE_UCOND_BR(indx, target)
-#define TRACE_LD(m, s, result, addr1, addr2)
-#define TRACE_ST(m, s, value, addr1, addr2)
-#endif
+++ /dev/null
-/* This file is part of the GDB simulators.
-
- Copyright (C) 1997, Free Software Foundation
- Condtributed by Cyngnus Solutions.
-
- 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 "sim-main.h"
-
-#include "idecode.h"
-#include "itable.h"
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-#if 0
-
-void
-engine_error (SIM_DESC sd,
- sim_cpu *cpu,
- instruction_address cia,
- const char *fmt,
- ...)
-{
- va_list ap;
- va_start (ap, fmt);
- sim_io_evprintf (sd, fmt, ap);
- va_end (ap);
-
- sim_halt (sd, cpu, NULL, cia, sim_stopped, SIGABRT);
-}
-
-void
-engine_halt (SIM_DESC sd,
- sim_cpu *cpu,
- instruction_address cia,
- enum sim_stop reason,
- int siggnal)
-{
- if (!sd->halt_ok)
- sim_io_error (sd, "engine_halt - bad longjmp");
- sd->reason = reason;
- sd->siggnal = siggnal;
- sd->halt_ok = 0;
- sd->restart_ok = 0;
- if (cpu != NULL)
- cpu->cia = cia;
- longjmp (sd->path_to_halt, 1);
-}
-
-void
-engine_restart (SIM_DESC sd,
- sim_cpu *cpu,
- instruction_address cia)
-{
- if (!sd->restart_ok)
- sim_io_error (sd, "engine_restart - bad longjmp");
- sd->restart_ok = 0;
- cpu->cia = cia;
- longjmp(sd->path_to_restart, 1);
-}
-
-
-void
-engine_run_until_stop (SIM_DESC sd,
- volatile int *keep_running)
-{
- if (!setjmp (sd->path_to_halt))
- {
- instruction_address cia;
- sim_cpu *cpu = STATE_CPU (sd, 0);
- sd->halt_ok = 1;
- setjmp (sd->path_to_restart);
- sd->restart_ok = 1;
- cia = cpu->cia;
- do
- {
- instruction_word insn = IMEM (cia);
- cia = idecode_issue (sd, insn, cia);
- }
- while (*keep_running);
- engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGINT);
- }
-}
-
-
-void
-engine_step (SIM_DESC sd)
-{
- if (!setjmp (sd->path_to_halt))
- {
- instruction_address cia;
- instruction_word insn;
- sim_cpu *cpu = STATE_CPU (sd, 0);
- sd->halt_ok = 1;
- setjmp (sd->path_to_restart);
- sd->restart_ok = 1;
- cia = cpu->cia;
- insn = IMEM (cia);
- cia = idecode_issue (sd, insn, cia);
- engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGTRAP);
- }
-}
-
-#endif
+++ /dev/null
-/* TIc80 Simulator.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
-This file is part of GDB, the GNU debugger.
-
-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, 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 "sim-main.h"
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-tic80_control_regs
-tic80_index2cr (int index)
-{
- switch (index)
- {
- case 0x0000: return EPC_CR;
- case 0x0001: return EIP_CR;
- case 0x0002: return CONFIG_CR;
- case 0x0004: return INTPEN_CR;
- case 0x0006: return IE_CR;
- case 0x0008: return FPST_CR;
- case 0x000A: return PPERROR_CR;
- case 0x000D: return PKTREQ_CR;
- case 0x000E: return TCOUNT_CR;
- case 0x000F: return TSCALE_CR;
- case 0x0010: return FLTOP_CR;
- case 0x0011: return FLTADR_CR;
- case 0x0012: return FLTTAG_CR;
- case 0x0013: return FLTDLT_CR;
- case 0x0014: return FLTDTH_CR;
- case 0x0015: return FLT005_CR;
- case 0x0016: return FLT006_CR;
- case 0x0017: return FLT007_CR;
- case 0x0018: return FLT008_CR;
- case 0x0019: return FLT009_CR;
- case 0x001a: return FLT010_CR;
- case 0x001b: return FLT011_CR;
- case 0x001c: return FLT012_CR;
- case 0x001d: return FLT013_CR;
- case 0x001e: return FLT014_CR;
- case 0x001f: return FLT015_CR;
- case 0x0020: return SYSSTK_CR;
- case 0x0021: return SYSTMP_CR;
- case 0x0030: return MPC_CR;
- case 0x0031: return MIP_CR;
- case 0x0033: return ECOMCNTL_CR;
- case 0x0034: return ANASTAT_CR;
- case 0x0039: return BRK1_CR;
- case 0x003A: return BRK2_CR;
- case 0x0200: return ITAG0_CR;
- case 0x0201: return ITAG1_CR;
- case 0x0202: return ITAG2_CR;
- case 0x0203: return ITAG3_CR;
- case 0x0204: return ITAG4_CR;
- case 0x0205: return ITAG5_CR;
- case 0x0206: return ITAG6_CR;
- case 0x0207: return ITAG7_CR;
- case 0x0208: return ITAG8_CR;
- case 0x0209: return ITAG9_CR;
- case 0x020a: return ITAG10_CR;
- case 0x020b: return ITAG11_CR;
- case 0x020c: return ITAG12_CR;
- case 0x020d: return ITAG13_CR;
- case 0x020e: return ITAG14_CR;
- case 0x020f: return ITAG15_CR;
- case 0x0300: return ILRU_CR;
- case 0x0400: return DTAG0_CR;
- case 0x0401: return DTAG1_CR;
- case 0x0402: return DTAG2_CR;
- case 0x0403: return DTAG3_CR;
- case 0x0404: return DTAG4_CR;
- case 0x0405: return DTAG5_CR;
- case 0x0406: return DTAG6_CR;
- case 0x0407: return DTAG7_CR;
- case 0x0408: return DTAG8_CR;
- case 0x0409: return DTAG9_CR;
- case 0x040a: return DTAG10_CR;
- case 0x040b: return DTAG11_CR;
- case 0x040c: return DTAG12_CR;
- case 0x040d: return DTAG13_CR;
- case 0x040e: return DTAG14_CR;
- case 0x040f: return DTAG15_CR;
- case 0x0500: return DLRU_CR;
- case 0x4000: return IN0P_CR;
- case 0x4001: return IN1P_CR;
- case 0x4002: return OUTP_CR;
- default: return SCRATCH_CR;
- }
-}
-
-
-\f
-#if defined(WITH_TRACE)
-/* Tracing support routines */
-
-static char tic80_trace_buffer[1024];
-static int tic80_size_name;
-
-#define SIZE_HEX 8
-#define SIZE_DECIMAL 11
-
-/* Initialize tracing by calculating the maximum name size */
-static void
-tic80_init_trace (void)
-{
- int i;
- int len, max_len = 0;
-
- for (i = 0; i < (int)nr_itable_entries; i++) {
- len = strlen (itable[i].name);
- if (len > max_len)
- max_len = len;
- }
-
- tic80_size_name = max_len + sizeof(":m") - 1 + sizeof (":s") - 1;
-}
-
-/* Given an integer which is the result of a comparison, return a string
- giving which bits are set. */
-
-static char *
-tic80_trace_cmp_internal (unsigned32 flag)
-{
- struct cmp_bits { unsigned32 bit; char *string; };
- static char buffer[32*8];
- static struct cmp_bits bits[] =
- {
- { BIT32(29), "hs" },
- { BIT32(28), "lo" },
- { BIT32(27), "ls" },
- { BIT32(26), "hi" },
- { BIT32(25), "ge" },
- { BIT32(24), "lt" },
- { BIT32(23), "le" },
- { BIT32(22), "gt" },
- { BIT32(21), "ne" },
- { BIT32(20), "eq" },
-
- { BIT32(19), "hs.h" },
- { BIT32(18), "lo.h" },
- { BIT32(17), "ls.h" },
- { BIT32(16), "hi.h" },
- { BIT32(15), "ge.h" },
- { BIT32(14), "lt.h" },
- { BIT32(13), "le.h" },
- { BIT32(12), "gt.h" },
- { BIT32(11), "ne.h" },
- { BIT32(10), "eq.h" },
-
- { BIT32( 9), "hs.b" },
- { BIT32( 8), "lo.b" },
- { BIT32( 7), "ls.b" },
- { BIT32( 6), "hi.b" },
- { BIT32( 5), "ge.b" },
- { BIT32( 4), "lt.b" },
- { BIT32( 3), "le.b" },
- { BIT32( 2), "gt.b" },
- { BIT32( 1), "ne.b" },
- { BIT32( 0), "eq.b" },
- { 0, (char *)0 },
- };
-
- int i;
- char *p = buffer;
-
- for (i = 0; bits[i].bit != 0; i++)
- {
- if ((flag & bits[i].bit) != 0)
- {
- if (p != buffer)
- *p++ = ' ';
-
- strcpy (p, bits[i].string);
- p += strlen (p);
- }
- }
-
- *p = '\0';
- return buffer;
-}
-
-/* Trace the result of an ALU operation with 2 integer inputs and an integer output */
-char *
-tic80_trace_alu3 (int indx,
- unsigned32 result,
- unsigned32 input1,
- unsigned32 input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld => 0x%.*lx/%*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
- SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
- SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of an ALU operation with 2 integer inputs and an integer output
- that sets the bits from a compare instruction. */
-char *
-tic80_trace_cmp (int indx,
- unsigned32 result,
- unsigned32 input1,
- unsigned32 input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld => 0x%.*lx %s",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
- SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
- SIZE_HEX, result, tic80_trace_cmp_internal (result));
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of an ALU operation with 1 integer input and an integer output */
-char *
-tic80_trace_alu2 (int indx,
- unsigned32 result,
- unsigned32 input)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld %*s => 0x%.*lx/%*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input,
- SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a shift instruction */
-char *
-tic80_trace_shift (int indx,
- unsigned32 result,
- unsigned32 input,
- int i,
- int n,
- int merge,
- int endmask,
- int rotate)
-{
- const char *merge_name;
- char name[40];
- char *p;
-
- if (!tic80_size_name)
- tic80_init_trace ();
-
- switch (merge)
- {
- default: merge_name = ".??"; break;
- case 0: merge_name = ".dz"; break;
- case 1: merge_name = ".dm"; break;
- case 2: merge_name = ".ds"; break;
- case 3: merge_name = ".ez"; break;
- case 4: merge_name = ".em"; break;
- case 5: merge_name = ".es"; break;
- case 6: merge_name = ".iz"; break;
- case 7: merge_name = ".im"; break;
- }
-
- /* Don't use itable[indx].name, which is just sl {r,i}. Instead reconstruct
- the name, using the i and n fields. */
- p = strchr (itable[indx].name, ' ');
- sprintf (name, "s%s%s%s%s",
- (n) ? "r" : "l",
- (i) ? "i" : "",
- merge_name,
- (p) ? p : "");
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld %*s%2d,%2d => 0x%.*lx/%*ld",
- tic80_size_name, name,
- SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input,
- SIZE_HEX + SIZE_DECIMAL - 2, "",
- rotate, endmask,
- SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and a floating point output */
-void
-tic80_trace_fpu3 (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- sim_fpu *result,
- sim_fpu *input1,
- sim_fpu *input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*g %*g => %*g",
- tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
-void
-tic80_trace_fpu2 (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- sim_fpu *result,
- sim_fpu *input)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*g %-*s => %*g",
- tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input),
- SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
-void
-tic80_trace_fpu1 (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- sim_fpu *result)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %-*s %-*s => %*g",
- tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX + SIZE_DECIMAL + 3, "",
- SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and an integer output */
-void
-tic80_trace_fpu2i (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- unsigned32 result,
- sim_fpu *input1,
- sim_fpu *input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*g %*g => 0x%.*lx %-*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
- SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and an integer output
- that is the result of a comparison. */
-void
-tic80_trace_fpu2cmp (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- unsigned32 result,
- sim_fpu *input1,
- sim_fpu *input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "fpu",
- "%-*s %*g %*g => 0x%.*lx %s",
- tic80_size_name, itable[indx].name,
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
- SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
- SIZE_HEX, result, tic80_trace_cmp_internal (result));
-}
-
-/* Trace the result of a NOP operation */
-char *
-tic80_trace_nop (int indx)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%s", itable[indx].name);
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with one input */
-char *
-tic80_trace_sink1 (int indx, unsigned32 input)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with two inputs */
-char *
-tic80_trace_sink2 (int indx, unsigned32 input1, unsigned32 input2)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
- SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with three inputs */
-char *
-tic80_trace_sink3 (int indx, unsigned32 input1, unsigned32 input2, unsigned32 input3)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld 0x%.*lx/%*ld",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
- SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
- SIZE_HEX, input3, SIZE_DECIMAL, (long)(signed32)input3);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a conditional branch operation */
-char *
-tic80_trace_cond_br (int indx,
- int jump_p,
- unsigned32 cond,
- unsigned32 target,
- int size,
- int code)
-{
- char *suffix1, *suffix2;
-
- if (!tic80_size_name)
- tic80_init_trace ();
-
- if (size >= 0 && code >= 0)
- { /* BCND */
- switch (code)
- {
- default: suffix1 = "???"; break;
- case 0: suffix1 = "nev"; break;
- case 1: suffix1 = "gt0"; break;
- case 2: suffix1 = "eq0"; break;
- case 3: suffix1 = "ge0"; break;
- case 4: suffix1 = "lt0"; break;
- case 5: suffix1 = "ne0"; break;
- case 6: suffix1 = "le0"; break;
- case 7: suffix1 = "alw"; break;
- }
-
- switch (size)
- {
- default: suffix2 = ".?"; break;
- case 0: suffix2 = ".b"; break;
- case 1: suffix2 = ".h"; break;
- case 2: suffix2 = ".w"; break;
- }
-
- } else { /* BBO/BBZ */
-
- suffix2 = "";
- switch (cond)
- {
- default: suffix1 = "??.?"; break;
- case 29: suffix1 = "hs.w"; break;
- case 28: suffix1 = "lo.w"; break;
- case 27: suffix1 = "ls.w"; break;
- case 26: suffix1 = "hi.w"; break;
- case 25: suffix1 = "ge.w"; break;
- case 24: suffix1 = "lt.w"; break;
- case 23: suffix1 = "le.w"; break;
- case 22: suffix1 = "gt.w"; break;
- case 21: suffix1 = "ne.w"; break;
- case 20: suffix1 = "eq.w"; break;
- case 19: suffix1 = "hs.h"; break;
- case 18: suffix1 = "lo.h"; break;
- case 17: suffix1 = "ls.h"; break;
- case 16: suffix1 = "hi.h"; break;
- case 15: suffix1 = "ge.h"; break;
- case 14: suffix1 = "lt.h"; break;
- case 13: suffix1 = "le.h"; break;
- case 12: suffix1 = "gt.h"; break;
- case 11: suffix1 = "ne.h"; break;
- case 10: suffix1 = "eq.h"; break;
- case 9: suffix1 = "hs.b"; break;
- case 8: suffix1 = "lo.b"; break;
- case 7: suffix1 = "ls.b"; break;
- case 6: suffix1 = "hi.b"; break;
- case 5: suffix1 = "ge.b"; break;
- case 4: suffix1 = "lt.b"; break;
- case 3: suffix1 = "le.b"; break;
- case 2: suffix1 = "gt.b"; break;
- case 1: suffix1 = "ne.b"; break;
- case 0: suffix1 = "eq.b"; break;
- }
- }
-
- if (jump_p)
- sprintf (tic80_trace_buffer,
- "%-*s 0x%.*lx %*s 0x%.*lx/%*ld => 0x%.*lx %s%s",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, target, SIZE_DECIMAL, "",
- SIZE_HEX, cond, SIZE_DECIMAL, (long)(signed32)cond,
- SIZE_HEX, target,
- suffix1, suffix2);
- else
- sprintf (tic80_trace_buffer,
- "%-*s 0x%.*lx %*s 0x%.*lx/%*ld => %-*s %s%s",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, target, SIZE_DECIMAL, "",
- SIZE_HEX, cond, SIZE_DECIMAL, (long)(signed32)cond,
- SIZE_HEX + 2, "[no jump]",
- suffix1, suffix2);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a unconditional branch operation */
-char *
-tic80_trace_ucond_br (int indx,
- unsigned32 target)
-{
- if (!tic80_size_name)
- tic80_init_trace ();
-
- sprintf (tic80_trace_buffer,
- "%-*s 0x%.*lx %*s => 0x%.*lx",
- tic80_size_name, itable[indx].name,
- SIZE_HEX, target, (SIZE_DECIMAL*2) + SIZE_HEX + 4, "",
- SIZE_HEX, target);
-
- return tic80_trace_buffer;
-}
-
-/* Trace the result of a load or store operation with 2 integer addresses
- and an integer output or input */
-void
-tic80_trace_ldst (SIM_DESC sd,
- sim_cpu *cpu,
- sim_cia cia,
- int indx,
- int st_p,
- int m_p,
- int s_p,
- unsigned32 value,
- unsigned32 input1,
- unsigned32 input2)
-{
- char name[40];
-
- if (!tic80_size_name)
- tic80_init_trace ();
-
- strcpy (name, itable[indx].name);
- if (m_p)
- strcat (name, ":m");
-
- if (s_p)
- strcat (name, ":s");
-
- trace_one_insn (sd, cpu, cia.ip, 1,
- itable[indx].file, itable[indx].line_nr, "memory",
- "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld %s 0x%.*lx/%*ld",
- tic80_size_name, name,
- SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
- SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
- (!st_p) ? "=>" : "<=",
- SIZE_HEX, value, SIZE_DECIMAL, (long)(signed32)value);
-}
-
-#endif /* WITH_TRACE */
+++ /dev/null
-/* This file is part of the program psim.
-
- Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
- Copyright (C) 1997, Free Software Foundation
-
- 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 <stdarg.h>
-#include <ctype.h>
-
-#include "bfd.h"
-#include "sim-main.h"
-#include "sim-utils.h"
-#include "sim-options.h"
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-#define SIM_ADDR unsigned
-
-SIM_DESC
-sim_open (SIM_OPEN_KIND kind,
- host_callback *callback,
- struct _bfd *abfd,
- char **argv)
-{
- char *buf;
- SIM_DESC sd = sim_state_alloc (kind, callback);
-
- if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
- return 0;
-
-#define TIC80_MEM_START 0x2000000
-#define TIC80_MEM_SIZE 0x100000
-
- /* main memory */
- asprintf (&buf, "memory region 0x%lx,0x%lx",
- TIC80_MEM_START, TIC80_MEM_SIZE);
- sim_do_command (sd, buf);
- free (buf);
- /* interrupt memory */
- sim_do_command (sd, "memory region 0x1010000,0x1000");
- /* some memory at zero */
- sim_do_command (sd, "memory region 0,0x100000");
-
- /* getopt will print the error message so we just have to exit if this fails.
- FIXME: Hmmm... in the case of gdb we need getopt to call
- print_filtered. */
- if (sim_parse_args (sd, argv) != SIM_RC_OK)
- {
- /* Uninstall the modules to avoid memory leaks,
- file descriptor leaks, etc. */
- sim_module_uninstall (sd);
- return 0;
- }
-
- /* check for/establish the a reference program image */
- if (sim_analyze_program (sd,
- (STATE_PROG_ARGV (sd) != NULL
- ? *STATE_PROG_ARGV (sd)
- : NULL),
- abfd) != SIM_RC_OK)
- {
- sim_module_uninstall (sd);
- return 0;
- }
-
- /* establish any remaining configuration options */
- if (sim_config (sd) != SIM_RC_OK)
- {
- sim_module_uninstall (sd);
- return 0;
- }
-
- if (sim_post_argv_init (sd) != SIM_RC_OK)
- {
- /* Uninstall the modules to avoid memory leaks,
- file descriptor leaks, etc. */
- sim_module_uninstall (sd);
- return 0;
- }
-
- /* FIXME: for now */
- return sd;
-}
-
-
-void
-sim_close (SIM_DESC sd, int quitting)
-{
- /* Uninstall the modules to avoid memory leaks,
- file descriptor leaks, etc. */
- sim_module_uninstall (sd);
-}
-
-
-/* FIXME - these magic numbers need to be moved elsewhere */
-
-#define SP_REGNUM 1 /* Contains address of top of stack */
-#define FP_REGNUM 31 /* Contains address of executing stack frame */
-#define PC_REGNUM 32 /* Contains program counter (FIXME?) */
-#define NPC_REGNUM 33 /* Contains the next program counter (FIXME?) */
-#define A0_REGNUM 34 /* Accumulator register 0 */
-#define A3_REGNUM 37 /* Accumulator register 1 */
-
-#define R0_REGNUM 0 /* General Purpose Register 0 - for sim */
-#define Rn_REGNUM 31 /* Last General Purpose Register - for sim */
-#define An_REGNUM A3_REGNUM /* Last Accumulator register - for sim */
-
-int
-sim_fetch_register (SIM_DESC sd, int regnr, unsigned char *buf, int length)
-{
- if (regnr == R0_REGNUM)
- memset (buf, 0, sizeof (unsigned32));
- else if (regnr > R0_REGNUM && regnr <= Rn_REGNUM)
- *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->reg[regnr - R0_REGNUM]);
- else if (regnr == PC_REGNUM)
- *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->cia.ip);
- else if (regnr == NPC_REGNUM)
- *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->cia.dp);
- else if (regnr >= A0_REGNUM && regnr <= An_REGNUM)
- *(unsigned64*)buf = H2T_8 (STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM]);
- else
- sim_io_error (sd, "sim_fetch_register - unknown register nr %d", regnr);
- return -1;
-}
-
-
-int
-sim_store_register (SIM_DESC sd, int regnr, unsigned char *buf, int length)
-{
- if (regnr >= R0_REGNUM && regnr <= Rn_REGNUM)
- STATE_CPU (sd, 0)->reg[regnr - R0_REGNUM] = T2H_4 (*(unsigned32*)buf);
- else if (regnr == PC_REGNUM)
- STATE_CPU (sd, 0)->cia.ip = T2H_4 (*(unsigned32*)buf);
- else if (regnr == NPC_REGNUM)
- STATE_CPU (sd, 0)->cia.dp = T2H_4 (*(unsigned32*)buf);
- else if (regnr >= A0_REGNUM && regnr <= An_REGNUM)
- STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM] = T2H_8 (*(unsigned64*)buf);
- else
- sim_io_error (sd, "sim_store_register - unknown register nr %d", regnr);
- return -1;
-}
-
-
-SIM_RC
-sim_create_inferior (SIM_DESC sd,
- struct _bfd *abfd,
- char **argv,
- char **envp)
-{
- /* clear all registers */
- memset (&STATE_CPU (sd, 0)->reg, 0, sizeof (STATE_CPU (sd, 0)->reg));
- memset (&STATE_CPU (sd, 0)->acc, 0, sizeof (STATE_CPU (sd, 0)->acc));
- memset (&STATE_CPU (sd, 0)->cr, 0, sizeof (STATE_CPU (sd, 0)->cr));
- STATE_CPU (sd, 0)->is_user_mode = 0;
- memset (&STATE_CPU (sd, 0)->cia, 0, sizeof (STATE_CPU (sd, 0)->cia));
- /* initialize any modules */
- sim_module_init (sd);
- /* set the stack-pointer/program counter */
- if (abfd != NULL)
- STATE_CPU (sd, 0)->cia.ip = bfd_get_start_address (abfd);
- else
- STATE_CPU (sd, 0)->cia.ip = 0;
- STATE_CPU (sd, 0)->cia.dp = (STATE_CPU (sd, 0)->cia.ip
- + sizeof (instruction_word));
- STATE_CPU (sd, 0)->cr[IE_CR] |= IE_CR_IE;
- STATE_CPU (sd, 0)->reg[1] = TIC80_MEM_START + TIC80_MEM_SIZE - 16;
- return SIM_RC_OK;
-}
-
-
-void
-sim_do_command (SIM_DESC sd, char *cmd)
-{
- if (sim_args_command (sd, cmd) != SIM_RC_OK)
- sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
-}
+++ /dev/null
-/* This file is part of the program psim.
-
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
- Copyright (C) 1997, Free Software Foundation
-
- 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.
-
- */
-
-
-#ifndef _SIM_MAIN_H_
-#define _SIM_MAIN_H_
-
-
-#include "sim-basics.h"
-#include "sim-signal.h"
-
-#include <signal.h> /* For kill() in insns:do_trap */
-
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* These are generated files. */
-#include "itable.h"
-#include "idecode.h"
-#include "idecode.h"
-
-typedef instruction_address sim_cia;
-static const sim_cia null_cia = {0}; /* Dummy */
-#define NULL_CIA null_cia
-/* FIXME: Perhaps igen should generate access macros for
- `instruction_address' that we could use. */
-#define CIA_ADDR(cia) ((cia).ip)
-
-#define WITH_WATCHPOINTS 1
-
-#include "sim-base.h"
-
-#include "alu.h"
-#include "cpu.h"
-
-
-struct sim_state {
-
- /* the processors proper */
- sim_cpu cpu;
-#define STATE_CPU(sd, n) (&(sd)->cpu)
-
- /* The base class. */
- sim_state_base base;
-
-};
-
-/* (re) initialize the simulator */
-
-extern void engine_init
-(SIM_DESC sd);
-
-
-#ifndef HAVE_GETPID
-#define getpid() 42
-#endif
-
-#ifndef HAVE_KILL
-#define kill(sig, pid) (errno = EINVAL, -1)
-#endif
-#endif
+++ /dev/null
-# most instructions
-switch: 21: 12: 21: 12
-switch: 11: 7: 6: 12
-#switch: 21: 13: 21: 13
-#switch: 12: 7: 6: 13
-switch: 27: 27: 27: 27
+++ /dev/null
-cache:Dest:Dest:
-cache:Dest:rDest:signed_word *:(&(CPU)->reg[Dest])
-#
-cache:Source1:Source1:
-cache:Source1:vSource1:signed_word:(GPR (Source1) + 0)
-#cache:Source1:vSource1:signed_word:(Source1 == 0 ? 0 : (CPU)->reg[Source1])
-#
-cache:Source2:Source2:
-cache:Source2:vSource2:signed_word:(GPR (Source2) + 0)
-#cache:Source2:vSource2:signed_word:(Source2 == 0 ? 0 : (CPU)->reg[Source2])
-#
-cache:Source:Source:
-cache:Source:vSource:signed_word:(GPR (Source) + 0)
-#cache:Source:vSource:signed_word:(Source == 0 ? 0 : (CPU)->reg[Source])
-#
-cache:IndOff:IndOff:
-cache:IndOff:rIndOff:signed_word:(GPR (IndOff) + 0)
-#cache:IndOff:rIndOff:signed_word:(IndOff == 0 ? 0 : (CPU)->reg[IndOff])
-#
-cache:Base:Base:
-cache:Base:vBase:signed_word:(GPR (Base) + 0)
-cache:Base:rBase:signed_word*:(&GPR (Base))
-#cache:Base:vBase:signed_word:(Base == 0 ? 0 : (CPU)->reg[Base])
-#
-cache:Link:Link:
-cache:Link:rLink:signed_word*:(&(CPU)->reg[Link])
-#
-# Trap Number
-cache:UTN:UTN:
-cache:INDTR:INDTR:
-cache:INDTR:UTN:unsigned_word:(INDTR == 0 ? 0 : (CPU)->reg[INDTR])
-#
-cache:A:A:
-#
-cache:SignedImmediate:SignedImmediate:
-cache:SignedImmediate:vSource1:signed_word:SEXT (SignedImmediate, 14)
-#
-cache:UnsignedImmediate:UnsignedImmediate:
-cache:UnsignedImmediate:vSource1:signed_word:UnsignedImmediate
-#
-cache:BITNUM:BITNUM:
-cache:Code:Code:
-cache:BITNUM:bitnum:int:(~BITNUM) & 0x1f
-
-#
-cache:SignedOffset:SignedOffset:
-cache:SignedOffset:vSignedOffset:signed_word:SEXT (SignedOffset, 14)
-#
-cache:UCRN:UCRN:
-cache:INDCR:INDCR:
-cache:INDCR:UCRN:unsigned32:(GPR (INDCR) + 0)
-#cache:INDCR:UCRN:unsigned32:(INDCR == 0 ? 0 : (CPU)->reg[INDCR])
+++ /dev/null
-// Texas Instruments TMS320C80 (MVP) Simulator.
-
-
-// The following is called when ever an illegal instruction is encountered.
-:internal::::illegal:
-{
- sim_io_eprintf (SD, "0x%lx: illegal instruction\n", (unsigned long) cia.ip);
- sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
-}
-
-// The following is called when ever an FP op is attempted with FPU disabled.
-:internal::::fp_unavailable:
-{
- sim_io_eprintf (SD, "0x%lx: floating-point unavailable\n", (unsigned long) cia.ip);
- sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGFPE);
-}
-
-// Handle a branch instruction
-:function:::instruction_address:do_branch:int annul, address_word target, int rLink_p, unsigned32 *rLink
-{
- instruction_address nia;
- if (annul)
- {
- if (rLink_p)
- *rLink = cia.dp;
- nia.ip = target;
- nia.dp = target + 4;
- }
- else
- {
- if (rLink_p)
- *rLink = cia.dp + sizeof (instruction_word);
- nia.ip = cia.dp;
- nia.dp = target;
- }
- return nia;
-}
-
-// Signed Integer Add - add source1, source2, dest
-:function:::void:do_add:unsigned32 *rDest, signed32 source1, signed32 source2
-{
- unsigned32 result;
- ALU_BEGIN (source1);
- ALU_ADD (source2);
- ALU_END (result);
- *rDest = result;
- TRACE_ALU3 (MY_INDEX, result, source1, source2);
- /* FIXME - a signed add may cause an exception */
-}
-31.Dest,26.Source2,21.0b101100,15.0,14.SignedImmediate::::add i
-"add <SignedImmediate>, r<Source2>, r<Dest>"
-{
- do_add (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.0,12.0,11./,4.Source1::::add r
-"add r<Source1>, r<Source2>, r<Dest>"
-{
- do_add (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.0,12.1,11./+LongSignedImmediate::::add l
-"add 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_add (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-
-// Unsigned Integer Add - addu source1, source2, dest
-:function:::void:do_addu:unsigned32 *rDest, unsigned32 source1, unsigned32 source2
-{
- unsigned32 result = source1 + source2;
- TRACE_ALU3 (MY_INDEX, result, source1, source2);
- *rDest = result;
-}
-
-31.Dest,26.Source2,21.0b101100,15.1,14.SignedImmediate::::addu i
-"addu <SignedImmediate>, r<Source2>, r<Dest>"
-{
- do_addu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.1,12.0,11./,4.Source1::::addu r
-"addu r<Source1>, r<Source2>, r<Dest>"
-{
- do_addu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.1,12.1,11./+LongSignedImmediate::::addu l
-"addu 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_addu (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-
-:function:::void:do_and:signed32 *rDest, signed32 source1, signed32 source2
-{
- unsigned32 result = source1 & source2;
- TRACE_ALU3 (MY_INDEX, result, source1, source2);
- *rDest = result;
-}
-
-
-// and, and.tt
-31.Dest,26.Source2,21.0b0010001,14.UnsignedImmediate::::and.tt i
-"and.tt <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010001,12.0,11./,4.Source1::::and.tt r
-"and.tt r<Source1>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010001,12.1,11./+LongSignedImmediate::::and.tt l
-"and.tt 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, LongSignedImmediate, vSource2);
-
-}
-
-// and.ff
-31.Dest,26.Source2,21.0b0011000,14.UnsignedImmediate::::and.ff i
-"and.ff <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011000,12.0,11./,4.Source1::::and.ff r
-"and.ff r<Source1>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011000,12.1,11./+LongSignedImmediate::::and.ff l
-"and.ff 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~LongSignedImmediate, ~vSource2);
-}
-
-// and.ft
-31.Dest,26.Source2,21.0b0010100,14.UnsignedImmediate::::and.ft i
-"and.ft <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010100,12.0,11./,4.Source1::::and.ft r
-"and.ft r<Source1>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010100,12.1,11./+LongSignedImmediate::::and.ft l
-"and.ft 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, ~LongSignedImmediate, vSource2);
-}
-
-// and.tf
-31.Dest,26.Source2,21.0b0010010,14.UnsignedImmediate::::and.tf i
-"and.tf <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110010010,12.0,11./,4.Source1::::and.tf r
-"and.tf r<Source1>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110010010,12.1,11./+LongSignedImmediate::::and.tf l
-"and.tf 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_and (_SD, rDest, LongSignedImmediate, ~vSource2);
-}
-
-// bbo[.a]
-:function:::instruction_address:do_bbo:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset
-{
- int jump_p;
- address_word target = cia.ip + 4 * offset;
- if (MASKED32 (source, bitnum, bitnum))
- {
- nia = do_branch (_SD, annul, target, 0, NULL);
- jump_p = 1;
- }
- else
- jump_p = 0;
- TRACE_COND_BR(MY_INDEX, jump_p, bitnum, target, -1, -1);
- return nia;
-}
-:%s::::A:int A
-{
- if (A)
- return ".a";
- else
- return "";
-}
-31.BITNUM,26.Source,21.0b100101,15.A,14.SignedOffset::::bbo i
-"bbo%s<A> <SignedOffset>, r<Source>, <bitnum>"
-{
- nia = do_bbo (_SD, nia, bitnum, vSource, A, vSignedOffset);
-}
-31.BITNUM,26.Source,21.0b11100101,13.A,12.0,11./,4.IndOff::::bbo r
-"bbo%s<A> r<IndOff>, r<Source>, <bitnum>"
-{
- nia = do_bbo (_SD, nia, bitnum, vSource, A, rIndOff);
-}
-31.BITNUM,26.Source,21.0b11100101,13.A,12.1,11./+LongSignedImmediate::::bbo l
-"bbo%s<A> <LongSignedImmediate>, r<Source>, <bitnum>"
-{
- nia = do_bbo (_SD, nia, bitnum, vSource, A, LongSignedImmediate);
-}
-
-// bbz[.a]
-:function:::instruction_address:do_bbz:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset
-{
- int jump_p;
- address_word target = cia.ip + 4 * offset;
- if (!MASKED32 (source, bitnum, bitnum))
- {
- nia = do_branch (_SD, annul, target, 0, NULL);
- jump_p = 1;
- }
- else
- jump_p = 0;
- TRACE_COND_BR(MY_INDEX, jump_p, bitnum, target, -1, -1);
- return nia;
-}
-31.BITNUM,26.Source,21.0b100100,15.A,14.SignedOffset::::bbz i
-"bbz%s<A> <SignedOffset>, r<Source>, <bitnum>"
-{
- nia = do_bbz (_SD, nia, bitnum, vSource, A, vSignedOffset);
-}
-31.BITNUM,26.Source,21.0b11100100,13.A,12.0,11./,4.IndOff::::bbz r
-"bbz%s<A> r<IndOff>, r<Source>, <bitnum>"
-{
- nia = do_bbz (_SD, nia, bitnum, vSource, A, rIndOff);
-}
-31.BITNUM,26.Source,21.0b11100100,13.A,12.1,11./+LongSignedImmediate::::bbz l
-"bbz%s<A> <LongSignedImmediate>, r<Source>, <bitnum>"
-{
- nia = do_bbz (_SD, nia, bitnum, vSource, A, LongSignedImmediate);
-}
-
-// bcnd[.a]
-:function:::instruction_address:do_bcnd:instruction_address nia, int Cond, unsigned32 source, int annul, unsigned32 offset
-{
- int condition;
- int size = EXTRACTED32 (Cond, 31 - 27, 30 - 27);
- int code = EXTRACTED32 (Cond, 29 - 27, 27 - 27);
- signed32 val = 0;
- address_word target = cia.ip + 4 * offset;
- switch (size)
- {
- case 0: val = SEXT32 (source, 7); break;
- case 1: val = SEXT32 (source, 15); break;
- case 2: val = source; break;
- default: sim_engine_abort (SD, CPU, cia, "bcnd - reserved size");
- }
- switch (code)
- {
- case 0: condition = 0; break;
- case 1: condition = val > 0; break;
- case 2: condition = val == 0; break;
- case 3: condition = val >= 0; break;
- case 4: condition = val < 0; break;
- case 5: condition = val != 0; break;
- case 6: condition = val <= 0; break;
- default: condition = 1; break;
- }
- if (condition)
- {
- nia = do_branch (_SD, annul, target, 0, NULL);
- }
- TRACE_COND_BR(MY_INDEX, condition, val, target, size, code);
- return nia;
-}
-31.Code,26.Source,21.0b100110,15.A,14.SignedOffset::::bcnd i
-"bcnd%s<A> <SignedOffset>, r<Source>, <Code>"
-{
- nia = do_bcnd (_SD, nia, Code, vSource, A, vSignedOffset);
-}
-31.Code,26.Source,21.0b11100110,13.A,12.0,11./,4.IndOff::::bcnd r
-"bcnd%s<A> r<IndOff>, r<Source>, <Code>"
-{
- nia = do_bcnd (_SD, nia, Code, vSource, A, rIndOff);
-}
-31.Code,26.Source,21.0b11100110,13.A,12.1,11./+LongSignedImmediate::::bcnd l
-"bcnd%s<A> <LongSignedImmediate>, r<Source>, <Code>"
-{
- nia = do_bcnd (_SD, nia, Code, vSource, A, LongSignedImmediate);
-}
-
-// br[.a] - see bbz[.a]
-
-
-// brcr
-:function:::sim_cia:do_brcr:instruction_address nia, int cr
-{
- if (cr >= 0x4000 || !(CPU)->is_user_mode)
- {
- unsigned32 control = CR (cr);
- unsigned32 ie = control & 0x00000001;
- unsigned32 pc = control & 0xfffffffc;
- unsigned32 is_user_mode = control & 0x00000002;
- (CPU)->is_user_mode = is_user_mode;
- nia.dp = pc;
- if (ie)
- (CPU)->cr[IE_CR] |= IE_CR_IE;
- else
- (CPU)->cr[IE_CR] &= ~IE_CR_IE;
- }
- TRACE_UCOND_BR (MY_INDEX, nia.dp);
- return nia;
-}
-31.//,27.0,26.//,21.0b0000110,14.UCRN::::brcr i
-"brcr CR[<UCRN>]"
-{
- nia = do_brcr (_SD, nia, UCRN);
-}
-31.//,27.0,26.//,21.0b110000110,12.0,11./,4.INDCR::::brcr r
-"brcr CR[r<INDCR>]"
-{
- nia = do_brcr (_SD, nia, UCRN);
-}
-31.//,27.0,26.//,21.0b110000110,12.1,11./+UnsignedControlRegisterNumber::::brcr l
-"brcr CR[<UnsignedControlRegisterNumber>]"
-{
- nia = do_brcr (_SD, nia, UnsignedControlRegisterNumber);
-}
-
-// bsr[.a]
-:function:::instruction_address:do_bsr:instruction_address nia, signed32 *rLink, int annul, unsigned32 offset
-{
- address_word target = cia.ip + 4 * offset;
- nia = do_branch (_SD, annul, target, 1, rLink);
- TRACE_UCOND_BR (MY_INDEX, target);
- return nia;
-}
-31.Link,26./,21.0b100000,15.A,14.SignedOffset::::bsr i
-"bsr%s<A> <SignedOffset>, r<Link>"
-{
- nia = do_bsr (_SD, nia, rLink, A, vSignedOffset);
-}
-31.Link,26./,21.0b11100000,13.A,12.0,11./,4.IndOff::::bsr r
-"bsr%s<A> r<IndOff>, r<Link>"
-{
- nia = do_bsr (_SD, nia, rLink, A, rIndOff);
-}
-31.Link,26./,21.0b11100000,13.A,12.1,11./+LongSignedImmediate::::bsr l
-"bsr%s<A> <LongSignedImmediate>, r<Link>"
-{
- nia = do_bsr (_SD, nia, rLink, A, LongSignedImmediate);
-}
-
-// cmnd
-:function:::void:do_cmnd:signed32 source
-{
- int Reset = EXTRACTED32 (source, 31, 31);
- int Halt = EXTRACTED32 (source, 30, 30);
- int Unhalt = EXTRACTED32 (source, 29, 29);
- /* int ICR = EXTRACTED32 (source, 28, 28); */
- /* int DCR = EXTRACTED32 (source, 27, 27); */
- int Task = EXTRACTED32 (source, 14, 14);
- int Msg = EXTRACTED32 (source, 13, 13);
- int VC = EXTRACTED32 (source, 10, 10);
- int TC = EXTRACTED32 (source, 9, 9);
- int MP = EXTRACTED32 (source, 8, 8);
- int PP = EXTRACTED32 (source, 3, 0);
- /* what is implemented? */
- if (PP != 0)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - PPs not supported",
- (unsigned long) cia.ip);
- if (VC != 0)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - VC not supported",
- (unsigned long) cia.ip);
- if (TC != 0)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - TC not supported",
- (unsigned long) cia.ip);
- if (MP)
- {
- if (Reset || Halt)
- sim_engine_halt (SD, CPU, NULL, cia, sim_exited, 0);
- if (Unhalt)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Can not unhalt the MP",
- (unsigned long) cia.ip);
- /* if (ICR || DCR); */
- if (Task)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Can not Task the MP",
- (unsigned long) cia.ip);
- if (Msg)
- sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Msg to MP not suported",
- (unsigned long) cia.ip);
- }
- TRACE_SINK1 (MY_INDEX, source);
-}
-31./,21.0b0000010,14.UI::::cmnd i
-"cmnd <UI>"
-{
- do_cmnd (_SD, UI);
-}
-31./,21.0b110000010,12.0,11./,4.Source::::cmnd r
-"cmnd r<Source>"
-{
- do_cmnd (_SD, vSource);
-}
-31./,21.0b110000010,12.1,11./+LongUnsignedImmediate::::cmnd l
-"cmnd <LongUnsignedImmediate>"
-{
- do_cmnd (_SD, LongUnsignedImmediate);
-}
-
-// cmp
-:function:::unsigned32:cmp_vals:signed32 s1, unsigned32 u1, signed32 s2, unsigned32 u2
-{
- unsigned32 field = 0;
- if (s1 == s2) field |= 0x001;
- if (s1 != s2) field |= 0x002;
- if (s1 > s2) field |= 0x004;
- if (s1 <= s2) field |= 0x008;
- if (s1 < s2) field |= 0x010;
- if (s1 >= s2) field |= 0x020;
- if (u1 > u2) field |= 0x040;
- if (u1 <= u2) field |= 0x080;
- if (u1 < u2) field |= 0x100;
- if (u1 >= u2) field |= 0x200;
- return field;
-}
-:function:::void:do_cmp:unsigned32 *rDest, unsigned32 source1, unsigned32 source2
-{
- unsigned32 field = 0;
- field |= cmp_vals (_SD, source1, source1, source2, source2) << 20;
- field |= cmp_vals (_SD, (signed16)source1, (unsigned16)source1,
- (signed16)source2, (unsigned16)source2) << 10;
- field |= cmp_vals (_SD, (signed8)source1, (unsigned8)source1,
- (signed8)source2, (unsigned8)source2);
- TRACE_CMP (MY_INDEX, field, source1, source2);
- *rDest = field;
-}
-31.Dest,26.Source2,21.0b1010000,14.SignedImmediate::::cmp i
-"cmp <SignedImmediate>, r<Source2>, r<Dest>"
-{
- do_cmp (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b111010000,12.0,11./,4.Source1::::cmp r
-"cmp r<Source1>, r<Source2>, r<Dest>"
-{
- do_cmp (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b111010000,12.1,11./+LongSignedImmediate::::cmp l
-"cmp 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_cmp (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// dcache
-:%s::::F:int F
-{
- if (F)
- return "f";
- else
- return "c";
-}
-31./,27.F,26.Source2,21.0b0111,17.m,16.0b00,14.SignedOffset::::dcache i
-"dcache%s<F> <SignedOffset> (r<Source2>%s<m>)"
-{
- TRACE_NOP (MY_INDEX);
- /* NOP */
-}
-31./,27.F,26.Source2,21.0b110111,15.m,14.0b00,12.0,11./,4.Source1::::dcache r
-"dcache%s<F> r<Source1> (r<Source2>%s<m>)"
-{
- TRACE_NOP (MY_INDEX);
- /* NOP */
-}
-31./,27.F,26.Source2,21.0b110111,15.m,14.0b00,12.1,11./+LongSignedImmediate::::dcache l
-"dcache%s<F> <LongSignedImmediate> (r<Source2>%s<m>)"
-{
- TRACE_NOP (MY_INDEX);
- /* NOP */
-}
-
-// dld[{.b|.h|.d}]
-void::function::do_dld:int Dest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- do_ld (_SD, Dest, base, rBase, m, sz, S, offset);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dld r
-"dld%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_dld (_SD, Dest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dld l
-"dld%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_dld (_SD, Dest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// dld.u[{.b|.h|.d}]
-void::function::do_dld_u:unsigned32 *rDest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- do_ld_u (_SD, rDest, base, rBase, m, sz, S, offset);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dld.u r
-"dld.u%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_dld_u (_SD, rDest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dld.u l
-"dld.u%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_dld_u (_SD, rDest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// dst[{.b|.h|.d}]
-void::function::do_dst:int Source, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- do_st (_SD, Source, base, rBase, m, sz, S, offset);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dst r
-"dst%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Source>"
-{
- do_dst (_SD, Source, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dst l
-"dst%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Source>"
-{
- do_dst (_SD, Source, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// estop
-31./,21.0b1111111,14.1,13.0,12.0,11./::::estop
-
-// etrap
-31./,27.1,26./,21.0b0000001,14.UTN::::etrap i
-31./,27.1,26./,21.0b110000001,12.0,11./,4.iUTN::::etrap r
-31./,27.1,26./,21.0b110000001,12.1,11./::::etrap l
-
-
-// exts - see shift.ds
-
-
-// extu - see shift.dz
-
-
-sim_fpu::function::get_fp_reg:int reg, unsigned32 val, int precision
-{
- sim_fpu ans;
- switch (precision)
- {
- case 0: /* single */
- sim_fpu_32to (&ans, val);
- break;
- case 1: /* double */
- if (reg < 0)
- sim_engine_abort (SD, CPU, cia, "DP immediate invalid");
- if (reg & 1)
- sim_engine_abort (SD, CPU, cia, "DP FP register must be even");
- if (reg <= 1)
- sim_engine_abort (SD, CPU, cia, "DP FP register must be >= 2");
- sim_fpu_232to (&ans, GPR (reg + 1), GPR (reg));
- break;
- case 2: /* 32 bit signed integer */
- sim_fpu_i32to (&ans, val, 0);
- break;
- case 3: /* 32 bit unsigned integer */
- sim_fpu_u32to (&ans, val, 0);
- break;
- default:
- sim_engine_abort (SD, CPU, cia, "Unsupported FP precision");
- }
- return ans;
-}
-void::function::set_fp_reg:int Dest, sim_fpu val, int PD
-{
- switch (PD)
- {
- case 0: /* single */
- {
- sim_fpu_to32 (&GPR (Dest), &val);
- break;
- }
- case 1: /* double */
- {
- if (Dest & 1)
- sim_engine_abort (SD, CPU, cia, "DP FP Dest register must be even");
- if (Dest <= 1)
- sim_engine_abort (SD, CPU, cia, "DP FP Dest register must be >= 2");
- sim_fpu_to232 (&GPR (Dest + 1), &GPR (Dest + 0), &val);
- break;
- }
- case 2: /* signed */
- {
- sim_fpu_to32i (&GPR (Dest), &val, 0);
- break;
- }
- case 3: /* unsigned */
- {
- sim_fpu_to32u (&GPR (Dest), &val, 0);
- break;
- }
- default:
- sim_engine_abort (SD, CPU, cia, "Unsupported FP precision");
- }
-
-}
-// fadd.{s|d}{s|d}{s|d}
-void::function::do_fadd:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
- sim_fpu ans;
- sim_fpu_add (&ans, &s1, &s2);
- TRACE_FPU3 (ans, s1, s2);
- set_fp_reg (_SD, Dest, ans, PD);
-}
-const char *::function::str_PX:int PX
-{
- switch (PX)
- {
- case 0: return "s";
- case 1: return "d";
- case 2: return "i";
- case 3: return "u";
- default: return "?";
- }
-}
-31.Dest,26.Source2,21.0b111110000,12.0,11.r,10.PD,8.P2,6.P1,4.Source1::f::fadd r
-"fadd.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
- do_fadd (_SD, Dest, PD,
- get_fp_reg (_SD, Source1, vSource1, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110000,12.1,11.r,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fadd l
-"fadd.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
- do_fadd (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-
-}
-
-// fcmp.{s|d}{s|d}{s|d}
-void::function::do_fcmp:unsigned32 *rDest, sim_fpu s1, sim_fpu s2
-{
- unsigned32 result = 0;
- if (sim_fpu_is_nan (&s1) || sim_fpu_is_nan (&s2))
- result |= BIT32 (30);
- else
- {
- result |= BIT32 (31);
- if (sim_fpu_is_eq (&s1, &s2)) result |= BIT32(20);
- if (sim_fpu_is_ne (&s1, &s2)) result |= BIT32(21);
- if (sim_fpu_is_gt (&s1, &s2)) result |= BIT32(22);
- if (sim_fpu_is_le (&s1, &s2)) result |= BIT32(23);
- if (sim_fpu_is_lt (&s1, &s2)) result |= BIT32(24);
- if (sim_fpu_is_ge (&s1, &s2)) result |= BIT32(25);
- if (sim_fpu_is_lt (&s1, &sim_fpu_zero)
- || sim_fpu_is_gt (&s1, &s2)) result |= BIT32(26);
- if (sim_fpu_is_lt (&sim_fpu_zero, &s1)
- && sim_fpu_is_lt (&s1, &s2)) result |= BIT32(27);
- if (sim_fpu_is_le (&sim_fpu_zero, &s1)
- && sim_fpu_is_le (&s1, &s2)) result |= BIT32(28);
- if (sim_fpu_is_le (&s1, &sim_fpu_zero)
- || sim_fpu_is_ge (&s1, &s2)) result |= BIT32(29);
- }
- *rDest = result;
- TRACE_FPU2CMP (result, s1, s2);
-}
-31.Dest,26.Source2,21.0b111110101,12.0,11./,10.0,8.P2,6.P1,4.Source1::f::fcmp r
-"fcmp.%s<PX#P1>%s<PX#P2> r<Source1>, r<Source2>, r<Dest>"
-{
- do_fcmp (_SD, rDest,
- get_fp_reg (_SD, Source1, vSource1, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110101,12.1,11./,10.0,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fcmp l
-"fcmp.%s<PX#P1>%s<PX#P2> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
- do_fcmp (_SD, rDest,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-
-// fdiv.{s|d}{s|d}{s|d}
-void::function::do_fdiv:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
- sim_fpu ans;
- sim_fpu_div (&ans, &s1, &s2);
- TRACE_FPU3 (ans, s1, s2);
- set_fp_reg (_SD, Dest, ans, PD);
-}
-31.Dest,26.Source2,21.0b111110011,12.0,11./,10.PD,8.P2,6.P1,4.Source1::f::fdiv r
-"fdiv.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
- do_fdiv (_SD, Dest, PD,
- get_fp_reg (_SD, Source1, vSource1, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110011,12.1,11./,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fdiv l
-"fdiv.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
- do_fdiv (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// fmpy.{s|d|i|u}{s|d|i|u}{s|d|i|u}
-void::function::do_fmpy:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
- switch (PD)
- {
- case 2: /* signed */
- {
- signed64 i1;
- signed64 i2;
- sim_fpu_to64i (&i1, &s1, 0);
- sim_fpu_to64i (&i2, &s2, 0);
- GPR (Dest) = i1 * i2;
- TRACE_FPU2I (GPR (Dest), s1, s2);
- break;
- }
- case 3: /* unsigned */
- {
- unsigned64 u1;
- unsigned64 u2;
- sim_fpu_to64u (&u1, &s1, 0);
- sim_fpu_to64u (&u2, &s2, 0);
- GPR (Dest) = u1 * u2;
- TRACE_FPU2I (GPR (Dest), s1, s2);
- break;
- }
- default:
- {
- sim_fpu ans;
- sim_fpu_mul (&ans, &s1, &s2);
- set_fp_reg (_SD, Dest, ans, PD);
- TRACE_FPU3 (ans, s1, s2);
- }
- }
-}
-31.Dest,26.Source2,21.0b111110010,12.0,11./,10.PD,8.P2,6.P1,4.Source1::f::fmpy r
-"fmpy.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
- do_fmpy (_SD, Dest, PD,
- get_fp_reg (_SD, Source1, vSource1, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110010,12.1,11./,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fmpy l
-"fmpy.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
- do_fmpy (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// frndm.{s|d|i|u}{s|d|i|u}
-void::function::do_frnd:int Dest, int PD, sim_fpu s1
-{
- set_fp_reg (_SD, Dest, s1, PD);
- TRACE_FPU1 (s1);
-}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b11,6.P1,4.Source::f::frndm r
-"frndm.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b11,6.P1,4./+SinglePrecisionFloatingPoint::f::frndm l
-"frndm.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndn.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b00,6.P1,4.Source::f::frndn r
-"frndn.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b00,6.P1,4./+SinglePrecisionFloatingPoint::f::frndn l
-"frndn.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndp.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b10,6.P1,4.Source::f::frndp r
-"frndp.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b10,6.P1,4./+SinglePrecisionFloatingPoint::f::frndp l
-"frndp.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndz.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b01,6.P1,4.Source::f::frndz r
-"frndz.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b01,6.P1,4./+SinglePrecisionFloatingPoint::f::frndz l
-"frndz.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
- do_frnd (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// fsqrt.{s|d}{s|d}{s|d}
-#void::function::do_fsqrt:unsigned32 *rDest, unsigned32 Source, unsigned32 Source2
-# sim_io_error ("fsqrt");
-31.Dest,26./,21.0b111110111,12.0,11./,10.PD,8.//,6.P1,4.Source::f::fsqrt r
-"fsqrt.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-# do_fsqrt (_SD, rDest, vSource);
-31.Dest,26./,21.0b111110111,12.1,11./,10.PD,8.//,6.P1,4./+SinglePrecisionFloatingPoint::f::fsqrt l
-"fsqrt.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-# do_fsqrt (_SD, rDest, SinglePrecisionFloatingPoint);
-
-
-// fsub.{s|d}{s|d}{s|d}
-void::function::do_fsub:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
- sim_fpu ans;
- sim_fpu_sub (&ans, &s1, &s2);
- TRACE_FPU3 (ans, s1, s2);
- set_fp_reg (_SD, Dest, ans, PD);
-}
-31.Dest,26.Source2,21.0b111110001,12.0,11.r,10.PD,8.P2,6.P1,4.Source1::f::fsub r
-"fsub.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
- do_fsub (_SD, Dest, PD,
- get_fp_reg (_SD, Source1, vSource1, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110001,12.1,11.r,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fsub l
-"fsub.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
- do_fsub (_SD, Dest, PD,
- get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
- get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// illop
-31./,21.0b0000000,14./::::illop
-"illop"
-31./,21.0b111111111,12./::::illop l
-"illop"
-
-
-// ins - see sl.im
-
-
-// jsr[.a]
-instruction_address::function::do_jsr:instruction_address nia, signed32 *rLink, int annul, unsigned32 offset, unsigned32 base
-{
- address_word target = offset + base;
- TRACE_UCOND_BR (MY_INDEX, target);
- nia = do_branch (_SD, annul, target, 1, rLink);
- if (nia.dp & 0x3)
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: destination address 0x%lx misaligned",
- (unsigned long) cia.ip,
- (unsigned long) nia.dp);
- return nia;
-}
-31.Link,26.Base,21.0b100010,15.A,14.SignedOffset::::jsr i
-"jsr%s<A> <SignedOffset>, r<Link>"
-{
- nia = do_jsr (_SD, nia, rLink, A, vSignedOffset, vBase);
-}
-31.Link,26.Base,21.0b11100010,13.A,12.0,11./,4.IndOff::::jsr r
-"jsr%s<A> r<IndOff>, r<Link>"
-{
- nia = do_jsr (_SD, nia, rLink, A, rIndOff, vBase);
-}
-31.Link,26.Base,21.0b11100010,13.A,12.1,11./+LongSignedImmediate::::jsr l
-"jsr%s<A> <LongSignedImmediate>, r<Link>"
-{
- nia = do_jsr (_SD, nia, rLink, A, LongSignedImmediate, vBase);
-}
-
-// ld[{.b.h.d}]
-void::function::do_ld:int Dest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- unsigned32 addr;
- switch (sz)
- {
- case 0:
- addr = base + (S ? (offset << 0) : offset);
- if (m)
- *rBase = addr;
- GPR(Dest) = MEM (signed, addr, 1);
- break;
- case 1:
- addr = base + (S ? (offset << 1) : offset);
- if (m)
- *rBase = addr;
- GPR(Dest) = MEM (signed, addr, 2);
- break;
- case 2:
- addr = base + (S ? (offset << 2) : offset);
- if (m)
- *rBase = addr;
- GPR(Dest) = MEM (signed, addr, 4);
- break;
- case 3:
- {
- signed64 val;
- if (Dest & 0x1)
- sim_engine_abort (SD, CPU, cia, "0x%lx: ld.d to odd register %d",
- cia.ip, Dest);
- addr = base + (S ? (offset << 3) : offset);
- if (m)
- *rBase = addr;
- val = MEM (signed, addr, 8);
- GPR(Dest + 1) = VH4_8 (val);
- GPR(Dest + 0) = VL4_8 (val);
- }
- break;
- default:
- addr = -1;
- sim_engine_abort (SD, CPU, cia, "ld - invalid sz %d", sz);
- }
- TRACE_LD (GPR(Dest), m, S, base, offset);
-}
-const char *::function::str_sz:int sz
-{
- switch (sz)
- {
- case 0: return ".b";
- case 1: return ".h";
- case 2: return "";
- case 3: return ".d";
- default: return "?";
- }
-}
-const char *::function::str_m:int m
-{
- if (m)
- return ":m";
- else
- return "";
-}
-const char *::function::str_S:int S
-{
- if (S)
- return ":s";
- else
- return "";
-}
-31.Dest,26.Base,21.0b0100,17.m,16.sz,14.SignedOffset::::ld i
-"ld%s<sz> <SignedOffset> (r<Base>%s<m>), r<Dest>"
-{
- do_ld (_SD, Dest, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::ld r
-"ld%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_ld (_SD, Dest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::ld l
-"ld%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_ld (_SD, Dest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// ld.u[{.b.h.d}]
-void::function::do_ld_u:unsigned32 *rDest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- unsigned32 addr;
- switch (sz)
- {
- case 0:
- addr = base + (S ? (offset << 0) : offset);
- *rDest = MEM (unsigned, addr, 1);
- break;
- case 1:
- addr = base + (S ? (offset << 1) : offset);
- *rDest = MEM (unsigned, addr, 2);
- break;
- default:
- addr = -1;
- sim_engine_abort (SD, CPU, cia, "ld.u - invalid sz %d", sz);
- }
- if (m)
- *rBase = addr;
- TRACE_LD (m, S, *rDest, base, offset);
-}
-31.Dest,26.Base,21.0b0101,17.m,16.sz,14.SignedOffset::::ld.u i
-"ld.u%s<sz> <SignedOffset> (r<Base>%s<m>), r<Dest>"
-{
- do_ld_u (_SD, rDest, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::ld.u r
-"ld.u%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_ld_u (_SD, rDest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::ld.u l
-"ld.u%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
- do_ld_u (_SD, rDest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// lmo
-31.Dest,26.Source,21.0b111111000,12.0,11./::::lmo
-"lmo r<Source>, r<Dest>"
-{
- int b;
- for (b = 0; b < 32; b++)
- if (vSource & BIT32 (31 - b))
- break;
- TRACE_ALU2 (MY_INDEX, b, vSource);
- *rDest = b;
-}
-
-
-// nop - see rdcr 0, r0
-
-
-void::function::do_or:unsigned32 *rDest, unsigned32 Source1, unsigned32 Source2
-{
- unsigned32 result = Source1 | Source2;
- TRACE_ALU3 (MY_INDEX, result, Source1, Source2);
- *rDest = result;
-}
-
-// or, or.tt
-31.Dest,26.Source2,21.0b0010111,14.UnsignedImmediate::::or.tt i
-"or.tt <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010111,12.0,11./,4.Source1::::or.tt r
-"or.tt r<Source1>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010111,12.1,11./+LongUnsignedImmediate::::or.tt l
-"or.tt 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
-
-// or.ff
-31.Dest,26.Source2,21.0b0011110,14.UnsignedImmediate::::or.ff i
-"or.ff <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011110,12.0,11./,4.Source1::::or.ff r
-"or.ff r<Source1>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011110,12.1,11./+LongUnsignedImmediate::::or.ff l
-"or.ff 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~LongUnsignedImmediate, ~vSource2);
-}
-
-// or.ft
-31.Dest,26.Source2,21.0b0011101,14.UnsignedImmediate::::or.ft i
-"or.ft <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011101,12.0,11./,4.Source1::::or.ft r
-"or.ft r<Source1>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011101,12.1,11./+LongUnsignedImmediate::::or.ft l
-"or.ft 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, ~LongUnsignedImmediate, vSource2);
-}
-
-// or.tf
-31.Dest,26.Source2,21.0b0011011,14.UnsignedImmediate::::or.tf i
-"or.tf <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011011,12.0,11./,4.Source1::::or.tf r
-"or.tf r<Source1>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011011,12.1,11./+LongUnsignedImmediate::::or.tf l
-"or.tf 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_or (_SD, rDest, LongUnsignedImmediate, ~vSource2);
-}
-
-// rdcr
-void::function::do_rdcr:unsigned32 Dest, int cr
-{
- TRACE_SINK2 (MY_INDEX, Dest, cr);
- GPR (Dest) = CR (cr);
-}
-31.Dest,26.0,21.0b0000100,14.UCRN::::rdcr i
-"rdcr CR[<UCRN>], r<Dest>"
-{
- do_rdcr (_SD, Dest, UCRN);
-}
-31.Dest,26.0,21.0b110000100,12.0,11./,4.INDCR::::rdcr r
-"rdcr CR[r<INDCR>], r<Dest>"
-{
- do_rdcr (_SD, Dest, UCRN);
-}
-31.Dest,26.0,21.0b110000100,12.1,11./+UnsignedControlRegisterNumber::::rdcr l
-"rdcr CR[<UnsignedControlRegisterNumber>], r<Dest>"
-{
- do_rdcr (_SD, Dest, UnsignedControlRegisterNumber);
-}
-
-// rmo
-31.Dest,26.Source,21.0b111111001,12.0,11./::::rmo
-"rmo r<Source>, r<Dest>"
-{
- int b;
- for (b = 0; b < 32; b++)
- if (vSource & BIT32 (b))
- break;
- if (b < 32)
- b = 31 - b;
- TRACE_ALU2 (MY_INDEX, b, vSource);
- *rDest = b;
-}
-
-// rotl - see sl.dz
-
-
-// rotr - see sl.dz
-
-
-// shl - see sl.iz
-
-
-// sl.{d|e|i}{m|s|z}
-void::function::do_shift:int Dest, unsigned32 source, int Merge, int i, int n, int EndMask, int Rotate
-{
- /* see 10-30 for a reasonable description */
- unsigned32 input = source;
- unsigned32 rotated;
- unsigned32 endmask;
- unsigned32 shiftmask;
- unsigned32 cm;
- int nRotate;
- /* rotate the source */
- if (n)
- {
- rotated = ROTR32 (source, Rotate);
- nRotate = (- Rotate) & 31;
- }
- else
- {
- rotated = ROTL32 (source, Rotate);
- nRotate = Rotate;
- }
- /* form the end mask */
- if (EndMask == 0)
- endmask = ~ (unsigned32)0;
- else
- endmask = (1 << EndMask) - 1;
- if (i)
- endmask = ~endmask;
- /* form the shiftmask */
- switch (Merge)
- {
- case 0: case 1: case 2:
- shiftmask = ~ (unsigned32)0; /* disabled */
- break;
- case 3: case 5: /* enabled - 0 -> 32 */
- if (nRotate == 0)
- shiftmask = ~ (unsigned32)0;
- else
- shiftmask = ((1 << nRotate) - 1); /* enabled - 0 -> 0 */
- break;
- case 4:
- shiftmask = ((1 << nRotate) - 1); /* enabled - 0 -> 0 */
- break;
- case 6: case 7:
- shiftmask = ~((1 << nRotate) - 1); /* inverted */
- break;
- default:
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: Invalid merge (%d) for shift",
- (long) cia.ip, (int) source);
- shiftmask = 0;
- }
- /* and the composite mask */
- cm = shiftmask & endmask;
- /* and merge */
- switch (Merge)
- {
- case 0: case 3: case 6: /* zero */
- GPR (Dest) = rotated & cm;
- break;
- case 1: case 4: case 7: /* merge */
- GPR (Dest) = (rotated & cm) | (GPR (Dest) & ~cm);
- break;
- case 2: case 5: /* sign */
- {
- int b;
- GPR (Dest) = rotated & cm;
- for (b = 1; b <= 31; b++)
- if (!MASKED32 (cm, b, b))
- GPR (Dest) |= INSERTED32 (EXTRACTED32 (GPR (Dest), b - 1, b - 1),
- b, b);
- }
- break;
- default:
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: Invalid merge (%d)",
- (long) cia.ip, (int) source);
- }
- TRACE_SHIFT (MY_INDEX, GPR (Dest), input, i, n, Merge, EndMask, Rotate);
-}
-const char *::function::str_Merge:int Merge
-{
- switch (Merge)
- {
- case 0: return "dz";
- case 1: return "dm";
- case 2: return "ds";
- case 3: return "ez";
- case 4: return "em";
- case 5: return "es";
- case 6: return "iz";
- case 7: return "im";
- default: return "?";
- }
-}
-31.Dest,26.Source,21.0b0001,17.Merge,14./,11.i,10.n,9.EndMask,4.Rotate::::sl i
-"sl.%s<Merge> <Rotate>, <EndMask>, r<Source>, r<Dest>"
-{
- do_shift (_SD, Dest, vSource, Merge, i, n, EndMask, Rotate);
-}
-31.Dest,26.Source,21.0b110001,15.Merge,12.0,11.i,10.n,9.EndMask,4.RotReg::::sl r
-"sl.%s<Merge> r<RotReg>, <EndMask>, r<Source>, r<Dest>"
-{
- do_shift (_SD, Dest, vSource, Merge, i, n, EndMask, GPR (RotReg) & 31);
-}
-
-// sli.{d|e|i}{m|s|z} - see shift
-
-
-// sr.{d|e|i}{m|s|z} - see shift
-
-
-// sra - see sr.es - see shift
-
-
-// sri.{d|e|i}{m|s|z} - see shift
-
-
-// srl - see sr.ez
-
-
-// st[{.b|.h|.d}]
-void::function::do_st:int Source, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
- unsigned32 addr;
- switch (sz)
- {
- case 0:
- addr = base + (S ? (offset << 0) : offset);
- STORE (addr, 1, GPR(Source));
- break;
- case 1:
- addr = base + (S ? (offset << 1) : offset);
- STORE (addr, 2, GPR(Source));
- break;
- case 2:
- addr = base + (S ? (offset << 2) : offset);
- STORE (addr, 4, GPR(Source));
- break;
- case 3:
- {
- signed64 val;
- if (Source & 0x1)
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: st.d with odd source register %d",
- cia.ip, Source);
- addr = base + (S ? (offset << 3) : offset);
- val = U8_4 (GPR(Source + 1), GPR(Source));
- STORE (addr, 8, val);
- }
- break;
- default:
- addr = -1;
- sim_engine_abort (SD, CPU, cia, "st - invalid sz %d", sz);
- }
- if (m)
- *rBase = addr;
- TRACE_ST (Source, m, S, base, offset);
-}
-31.Source,26.Base,21.0b0110,17.m,16.sz,14.SignedOffset::::st i
-"st%s<sz> <SignedOffset> (r<Base>%s<m>), r<Source>"
-{
- do_st (_SD, Source, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::st r
-"st%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Source>"
-{
- do_st (_SD, Source, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::st l
-"st%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Source>"
-{
- do_st (_SD, Source, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// sub
-void::function::do_sub:signed32 *rDest, signed32 Source1, signed32 Source2
-{
- ALU_BEGIN (Source1);
- ALU_SUB (Source2);
- ALU_END (*rDest);
- TRACE_ALU3 (MY_INDEX, *rDest, Source1, Source2);
-}
-31.Dest,26.Source2,21.0b101101,15.0,14.SignedImmediate::::sub i
-"sub <SignedImmediate>, r<Source2>, r<Dest>"
-{
- do_sub (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.0,12.0,11./,4.Source1::::sub r
-"sub r<Source1>, r<Source2>, r<Dest>"
-{
- do_sub (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.0,12.1,11./+LongSignedImmediate::::sub l
-"sub 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_sub (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// subu
-void::function::do_subu:unsigned32 *rDest, unsigned32 Source1, signed32 Source2
-{
- unsigned32 result = Source1 - Source2;
- TRACE_ALU3 (MY_INDEX, result, Source1, Source2);
- *rDest = result;
-}
-// NOTE - the book has 15.1 which conflicts with subu.
-31.Dest,26.Source2,21.0b101101,15.1,14.SignedImmediate::::subu i
-"subu <SignedImmediate>, r<Source2>, r<Dest>"
-{
- do_subu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.1,12.0,11./,4.Source1::::subu r
-"subu r<Source1>, r<Source2>, r<Dest>"
-{
- do_subu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.1,12.1,11./+LongSignedImmediate::::subu l
-"subu 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
- do_subu (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// swcr
-void::function::do_swcr:int Dest, signed32 source, signed32 cr
-{
- tic80_control_regs reg = tic80_index2cr (cr);
- /* cache the old CR value */
- unsigned32 old_cr = CR (cr);
- /* Handle the write if allowed */
- if (cr >= 0x4000 || !(CPU)->is_user_mode)
- switch (reg)
- {
- case INTPEN_CR:
- CR (cr) &= ~source;
- break;
- default:
- CR (cr) = source;
- break;
- }
- /* Finish off the read */
- GPR (Dest) = old_cr;
- TRACE_SINK3 (MY_INDEX, source, cr, Dest);
-}
-31.Dest,26.Source,21.0b000010,15.1,14.UCRN::::swcr i
-"swcr CR[<UCRN>], r<Dest>"
-{
- do_swcr (_SD, Dest, vSource, UCRN);
-}
-31.Dest,26.Source,21.0b11000010,13.1,12.0,11./,4.INDCR::::swcr r
-"swcr CR[r<INDCR>], r<Dest>"
-{
- do_swcr (_SD, Dest, vSource, UCRN);
-}
-31.Dest,26.Source,21.0b11000010,13.1,12.1,11./+LongUnsignedControlRegisterNumber::::swcr l
-"swcr CR[<LongUnsignedControlRegisterNumber>], r<Dest>"
-{
- do_swcr (_SD, Dest, vSource, LongUnsignedControlRegisterNumber);
-}
-
-// trap
-void::function::do_trap:unsigned32 trap_number
-{
- int i;
- TRACE_SINK1 (MY_INDEX, trap_number);
- switch (trap_number)
- {
- case 72:
- switch (GPR(15))
- {
- case 1: /* EXIT */
- {
- sim_engine_halt (SD, CPU, NULL, cia, sim_exited, GPR(2));
- break;
- }
- case 4: /* WRITE */
- {
- unsigned i;
- if (GPR(2) == 1)
- for (i = 0; i < GPR(6); i++)
- {
- char c;
- c = MEM (unsigned, GPR(4) + i, 1);
- sim_io_write_stdout (SD, &c, 1);
- }
- else if (GPR(2) == 2)
- for (i = 0; i < GPR(6); i++)
- {
- char c;
- c = MEM (unsigned, GPR(4) + i, 1);
- sim_io_write_stderr (SD, &c, 1);
- }
- else
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: write to invalid fid %d",
- (long) cia.ip, (int) GPR(2));
- GPR(2) = GPR(6);
- break;
- }
- case 20: /* GETPID */
- {
- GPR(2) = getpid ();
- break;
- }
- case 37: /* KILL */
- if ( GPR (2) != (unsigned) getpid ())
- {
- int ret = kill (GPR(2), GPR(4));
- if (ret < 0)
- ret = -errno;
- GPR (2) = ret;
- break;
- }
- else
- {
- sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, GPR(4));
- break;
- }
- default:
- /* For system calls which are defined, just return EINVAL instead of trapping */
- if (GPR(15) <= 204)
- {
- GPR(2) = -22; /* -EINVAL */
- break;
- }
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: unknown syscall %d",
- (long) cia.ip, (int) GPR(15));
- }
- break;
- case 73:
- sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIM_SIGTRAP);
-
- /* Add a few traps for now to print the register state */
- case 74:
- case 75:
- case 76:
- case 77:
- case 78:
- case 79:
- if (!TRACE_ALU_P (CPU))
- trace_one_insn (SD, CPU, cia.ip, 1, itable[MY_INDEX].file,
- itable[MY_INDEX].line_nr, "trap",
- "Trap %ld", (long) trap_number);
-
- for (i = 0; i < 32; i++)
- sim_io_eprintf (SD, "%s0x%.8lx%s", ((i % 8) == 0) ? "\t" : " ", (long)GPR(i),
- (((i+1) % 8) == 0) ? "\n" : "");
- sim_io_write_stderr (SD, "\n", 1);
- break;
-
- default:
- sim_engine_abort (SD, CPU, cia,
- "0x%lx: unsupported trap %d",
- (long) cia.ip, (int) trap_number);
- }
-}
-31./,27.0,26./,21.0b0000001,14.UTN::::trap i
-"trap <UTN>"
-{
- do_trap (_SD, UTN);
-}
-31./,27.0,26./,21.0b110000001,12.0,11./,4.INDTR::::trap r
-"trap r<INDTR>"
-{
- do_trap (_SD, UTN);
-}
-31./,27.0,26./,21.0b110000001,12.1,11./+UTN::::trap l
-"trap 0x%08lx<UTN>"
-{
- do_trap (_SD, UTN);
-}
-
-// vadd.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b000,12.0,11./,10.*,9.*,7.PD,6.*,5.P1,4.Source::f::vadd r
-31.*,26.Dest,21.0b11110,16./,15.0b000,12.1,11./,10.*,9.*,7.PD,6.*,5.P1,4.Source::f::vadd l
-
-
-// vld{0|1}.{s|d} - see above - same instruction
-#31.Dest,26.*,21.0b11110,16.*,10.1,9.S,8.*,6.p,7.******::f::vld
-
-
-// vmac.ss{s|d}
-#31.*, 26.Source2,21.0b11110,16.a0,15.0b110,12.0,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4.Source1::f::vmac.ss ra
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b110,12.0,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4.Source1::f::vmac.ss rr
-#31.*, 26.Source2,21.0b11110,16.a0,15.0b110,12.1,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4./::f::vmac.ss ia
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b110,12.1,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4./::f::vmac.ss ir
-
-
-// vmpy.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b010,12.0,11./,10.*,8.*,7.PD,6.*,5.P1,4.Source::f::vmpy r
-31.*,26.Dest,21.0b11110,16./,15.0b010,12.1,11./,10.*,8.*,7.PD,6.*,5.P1,4./::f::vmpy l
-
-
-// vmsc.ss{s|d}
-#31.*, 26.Source2,21.0b11110,16.a0,15.0b111,12.0,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4.Source1::f::vmsc.ss ra
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b111,12.0,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4.Source1::f::vmsc.ss rr
-#31.*, 26.Source2,21.0b11110,16.a0,15.0b111,12.1,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4./::f::vmsc.ss ia
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b111,12.1,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4./::f::vmsc.ss ir
-
-
-// vmsub.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16.a0,15.0b011,12.0,11.a1,10.*,8.Z,7.PD,6.*,5./,4.Source::f::vmsub r
-31.*,26.Dest,21.0b11110,16.a0,15.0b011,12.1,11.a1,10.*,8.Z,7.PD,6.*,5./,4./::f::vmsub l
-
-
-// vrnd.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16.a0,15.0b100,12.0,11.a1,10.*,8.PD,6.*,5.P1,4.Source::f::vrnd f r
-31.*,26.Dest,21.0b11110,16.a0,15.0b100,12.1,11.a1,10.*,8.PD,6.*,5.P1,4./::f::vrnd f l
-
-
-// vrnd.{i|u}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b101,12.0,11./,10.*,8./,7.PD,6.*,5.P1,4.Source::f::vrnd i r
-31.*,26.Dest,21.0b11110,16./,15.0b101,12.1,11./,10.*,8./,7.PD,6.*,5.P1,4./::f::vrnd i l
-
-
-// vst.{s|d} - see above - same instruction
-#31.Source,26.*,21.0b11110,16.*,10.0,9.S,8.*,6.1,5.*::f::vst
-
-
-// vsub.{i|u}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b001,12.0,11./,10.*,8./,7.PD,6.*,5.P1,4.Source::f::vsub r
-31.*,26.Dest,21.0b11110,16./,15.0b001,12.1,11./,10.*,8./,7.PD,6.*,5.P1,4./::f::vsub l
-
-
-// wrcr - see swcr, creg, source, r0
-
-
-// xnor
-void::function::do_xnor:signed32 *rDest, signed32 source1, signed32 source2
-{
- unsigned32 result = ~ (source1 ^ source2);
- TRACE_ALU3 (MY_INDEX, result, source1, source2);
- *rDest = result;
-}
-31.Dest,26.Source2,21.0b0011001,14.UnsignedImmediate::::xnor i
-"xnor <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_xnor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011001,12.0,11./,4.Source1::::xnor r
-"xnor r<Source1>, r<Source2>, r<Dest>"
-{
- do_xnor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011001,12.1,11./+LongUnsignedImmediate::::xnor l
-"xnor 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_xnor (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
-
-// xor
-void::function::do_xor:signed32 *rDest, signed32 source1, signed32 source2
-{
- unsigned32 result = source1 ^ source2;
- TRACE_ALU3 (MY_INDEX, result, source1, source2);
- *rDest = result;
-}
-31.Dest,26.Source2,21.0b0010110,14.UnsignedImmediate::::xor i
-"xor <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_xor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010110,12.0,11./,4.Source1::::xor r
-"xor r<Source1>, r<Source2>, r<Dest>"
-{
- do_xor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010110,12.1,11./+LongUnsignedImmediate::::xor l
-"xor 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
- do_xor (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
+2002-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * simops.c (trace_result): Fix printf formatting.
+
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
2001-12-02 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (simops.h, table.c): Delete targets.
ac_help="$ac_help
--enable-sim-hostendian=end Specify host byte endian orientation."
ac_help="$ac_help
- --enable-build-warnings[=LIST] Enable build-time compiler warnings"
+ --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+ --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
ac_help="$ac_help
--enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
ac_help="$ac_help
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:691: checking how to run the C preprocessor" >&5
+echo "configure:693: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 706 "configure"
+#line 708 "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:712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:714: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 723 "configure"
+#line 725 "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:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:731: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 740 "configure"
+#line 742 "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:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:748: \"$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 "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:771: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:798: checking for POSIXized ISC" >&5
+echo "configure:800: 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
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:819: checking for ANSI C header files" >&5
+echo "configure:821: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 824 "configure"
+#line 826 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:834: \"$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*
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 849 "configure"
+#line 851 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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 867 "configure"
+#line 869 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 888 "configure"
+#line 890 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:923: checking for working const" >&5
+echo "configure:925: 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 928 "configure"
+#line 930 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:998: checking for inline" >&5
+echo "configure:1000: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1005 "configure"
+#line 1007 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1038: checking for off_t" >&5
+echo "configure:1040: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1043 "configure"
+#line 1045 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1071: checking for size_t" >&5
+echo "configure:1073: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1076 "configure"
+#line 1078 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1106: checking for working alloca.h" >&5
+echo "configure:1108: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1111 "configure"
+#line 1113 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1139: checking for alloca" >&5
+echo "configure:1141: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1144 "configure"
+#line 1146 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1204: checking whether alloca needs Cray hooks" >&5
+echo "configure:1206: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1209 "configure"
+#line 1211 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
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:1234: checking for $ac_func" >&5
+echo "configure:1236: 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 1239 "configure"
+#line 1241 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1264: \"$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
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1289: checking stack direction for C alloca" >&5
+echo "configure:1291: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1297 "configure"
+#line 1299 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1341: checking for $ac_hdr" >&5
+echo "configure:1343: 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 1346 "configure"
+#line 1348 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1353: \"$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*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1380: checking for $ac_func" >&5
+echo "configure:1382: 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 1385 "configure"
+#line 1387 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1410: \"$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
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1433: checking for working mmap" >&5
+echo "configure:1435: 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
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1441 "configure"
+#line 1443 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1583: \"$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
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1604: checking for Cygwin environment" >&5
+echo "configure:1606: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1609 "configure"
+#line 1611 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1637: checking for mingw32 environment" >&5
+echo "configure:1639: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1642 "configure"
+#line 1644 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1716: checking host system type" >&5
+echo "configure:1718: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1737: checking target system type" >&5
+echo "configure:1739: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1755: checking build system type" >&5
+echo "configure:1757: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# 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:1799: checking for $ac_word" >&5
+echo "configure:1801: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:1829: checking for $ac_word" >&5
+echo "configure:1831: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1880: checking for $ac_word" >&5
+echo "configure:1882: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1914: 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.
cat > conftest.$ac_ext << EOF
-#line 1923 "configure"
+#line 1925 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1930: \"$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
{ 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:1954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1959: checking whether we are using GNU C" >&5
+echo "configure:1961: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1987: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1989: 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
# 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:2030: checking for a BSD compatible install" >&5
+echo "configure:2032: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# 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:2098: checking for $ac_word" >&5
+echo "configure:2100: 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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2133: checking for $ac_hdr" >&5
+echo "configure:2135: 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 2138 "configure"
+#line 2140 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2145: \"$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*
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2173: checking for $ac_func" >&5
+echo "configure:2175: 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 2178 "configure"
+#line 2180 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2203: \"$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
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2230: checking for $ac_func" >&5
+echo "configure:2232: 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 2235 "configure"
+#line 2237 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2260: \"$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
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2292: checking for LC_MESSAGES" >&5
+echo "configure:2294: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2297 "configure"
+#line 2299 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2325: checking whether NLS is requested" >&5
+echo "configure:2327: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2345: checking whether included gettext is requested" >&5
+echo "configure:2347: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2364: checking for libintl.h" >&5
+echo "configure:2366: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2369 "configure"
+#line 2371 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2376: \"$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*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2391: checking for gettext in libc" >&5
+echo "configure:2393: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2396 "configure"
+#line 2398 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2419: checking for bindtextdomain in -lintl" >&5
+echo "configure:2421: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2427 "configure"
+#line 2429 "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
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2440: \"$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
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2454: checking for gettext in libintl" >&5
+echo "configure:2456: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2459 "configure"
+#line 2461 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2494: checking for $ac_word" >&5
+echo "configure:2496: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2528: checking for $ac_func" >&5
+echo "configure:2530: 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 2533 "configure"
+#line 2535 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2558: \"$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
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2583: checking for $ac_word" >&5
+echo "configure:2585: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2619: checking for $ac_word" >&5
+echo "configure:2621: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
+#line 2653 "configure"
#include "confdefs.h"
int main() {
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2691: checking for $ac_word" >&5
+echo "configure:2693: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2725: checking for $ac_word" >&5
+echo "configure:2727: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2761: checking for $ac_word" >&5
+echo "configure:2763: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2851: checking for catalogs to be installed" >&5
+echo "configure:2853: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2879: checking for linux/version.h" >&5
+echo "configure:2881: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2884 "configure"
+#line 2886 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2891: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2958: checking for $ac_hdr" >&5
+echo "configure:2960: 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 2963 "configure"
+#line 2965 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2970: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2998: checking for $ac_hdr" >&5
+echo "configure:3000: 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 3003 "configure"
+#line 3005 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3010: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3038: checking for $ac_hdr" >&5
+echo "configure:3040: 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 3043 "configure"
+#line 3045 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3050: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3078: checking for $ac_hdr" >&5
+echo "configure:3080: 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 3083 "configure"
+#line 3085 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3090: \"$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*
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_func" >&5
+echo "configure:3119: 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 3122 "configure"
+#line 3124 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3147: \"$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
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3172: checking for bind in -lsocket" >&5
+echo "configure:3174: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3180 "configure"
+#line 3182 "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
bind()
; return 0; }
EOF
-if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3193: \"$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
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3219: checking for gethostbyname in -lnsl" >&5
+echo "configure:3221: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3227 "configure"
+#line 3229 "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
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3414: checking return type of signal handlers" >&5
+echo "configure:3416: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3419 "configure"
+#line 3421 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3458: checking for executable suffix" >&5
+echo "configure:3460: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3619: checking whether byte ordering is bigendian" >&5
+echo "configure:3621: 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
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3626 "configure"
+#line 3628 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3641 "configure"
+#line 3643 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3672 "configure"
+#line 3674 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
fi
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
- build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+ case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+ enableval="$enable_sim_build_warnings"
+ case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
fi
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
- # Separate out the -Werror flag as some files just cannot be
- # compiled with it enabled.
- for w in ${build_warnings}; do
- case $w in
- -Werr*) WERROR_CFLAGS=-Werror ;;
- *) WARN_CFLAGS="${WARN_CFLAGS} $w"
- esac
- done
-fi
+ echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3770: checking compiler warning flags" >&5
+ # Separate out the -Werror flag as some files just cannot be
+ # compiled with it enabled.
+ for w in ${build_warnings}; do
+ case $w in
+ -Werr*) WERROR_CFLAGS=-Werror ;;
+ *) # Check that GCC accepts it
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $w"
+ cat > conftest.$ac_ext <<EOF
+#line 3780 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ WARN_CFLAGS="${WARN_CFLAGS} $w"
else
- build_warnings=""
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$saved_CFLAGS"
+ esac
+ done
+ echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
fi
for ac_func in time chmod utime fork execve execv chown
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3833: checking for $ac_func" >&5
+echo "configure:3882: 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 3838 "configure"
+#line 3887 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3910: \"$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
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3889: checking for $ac_hdr" >&5
+echo "configure:3938: 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 3894 "configure"
+#line 3943 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3948: \"$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 i;
for (i = 0; i < trace_num_values; i++)
{
- sprintf (chp, "%*s0x%.8lx", SIZE_VALUES - 10, "", trace_values[i]);
+ sprintf (chp, "%*s0x%.8lx", SIZE_VALUES - 10, "",
+ (long) trace_values[i]);
chp = strchr (chp, '\0');
}
while (i++ < 3)
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
#endif
#include <sys/param.h>
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "../../newlib/libc/sys/w65/sys/syscall.h"
#include "interp.h"
+2002-06-16 Andrew Cagney <ac131313@redhat.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * iface.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+ * support.c: Ditto.
+
+2002-06-06 Andrew Cagney <ac131313@redhat.com>
+
+ * writecode.c (lookup_inst): Generate inverse table on-the-fly.
+ (z8k_inv_list): Delete global.
+ (DIRTY_HACK): Delete macro.
+ (makelist): Delete global.
+ (main): Delete code making a list. Delete dirty hack code. Use
+ lookup_inst instead of z8k_inv_list.
+ * list.c: Delete file.
+ * Makefile.in (writecode): Do not link in list.o.
+ (list.o): Delete target.
+
2002-04-29 Nick Clifton <nickc@cambridge.redhat.com>
* writecode.c (lookup_inst): Ignore CLASS_IGNORE.
tc-genb3.h:writecode
./writecode -b3 >tc-genb3.h
-writecode: writecode.o list.o bquick.o
- $(CC_FOR_BUILD) -o writecode writecode.o list.o bquick.o
+writecode: writecode.o bquick.o
+ $(CC_FOR_BUILD) -o writecode writecode.o bquick.o
writecode.o: writecode.c $(CONFIG_H)
$(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/writecode.c
-list.o: list.c
- $(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/list.c
-
# Two copies of quick.o are created. One for $build and one for $host.
bquick.o: quick.c
$(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/quick.c -o bquick.o
#include "tm.h"
#include "signal.h"
#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#ifndef NULL
#define NULL 0
+++ /dev/null
-short int z8k_inv_list[] = {
-
-10
-#ifdef __GNUC__
-};
-short int int_list0[] = {
-#else
-,
-#endif
-10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list64[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list128[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list192[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-5
-#ifdef __GNUC__
-};
-short int int_list256[] = {
-#else
-,
-#endif
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list320[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list384[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list448[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-370
-#ifdef __GNUC__
-};
-short int int_list512[] = {
-#else
-,
-#endif
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list576[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list640[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list704[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-365
-#ifdef __GNUC__
-};
-short int int_list768[] = {
-#else
-,
-#endif
-365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list832[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list896[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list960[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-260
-#ifdef __GNUC__
-};
-short int int_list1024[] = {
-#else
-,
-#endif
-260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1088[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1152[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1216[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-255
-#ifdef __GNUC__
-};
-short int int_list1280[] = {
-#else
-,
-#endif
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1344[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1408[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1472[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-25
-#ifdef __GNUC__
-};
-short int int_list1536[] = {
-#else
-,
-#endif
-25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1600[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1664[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1728[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-20
-#ifdef __GNUC__
-};
-short int int_list1792[] = {
-#else
-,
-#endif
-20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1856[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1920[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1984[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-415
-#ifdef __GNUC__
-};
-short int int_list2048[] = {
-#else
-,
-#endif
-415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2112[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2176[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2240[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-410
-#ifdef __GNUC__
-};
-short int int_list2304[] = {
-#else
-,
-#endif
-410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2368[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2432[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2496[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-73
-#ifdef __GNUC__
-};
-short int int_list2560[] = {
-#else
-,
-#endif
-73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2624[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2688[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2752[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-65
-#ifdef __GNUC__
-};
-short int int_list2816[] = {
-#else
-,
-#endif
-65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list2880[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list2944[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list3008[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
--1
-#ifdef __GNUC__
-};
-short int int_list3072[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3136[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3200[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3264[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list3328[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3392[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3456[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3520[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-127
-#ifdef __GNUC__
-};
-short int int_list3584[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3648[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3712[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3776[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-128
-#ifdef __GNUC__
-};
-short int int_list3840[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list3904[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list3968[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list4032[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-86
-#ifdef __GNUC__
-};
-short int int_list4096[] = {
-#else
-,
-#endif
-86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4160[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4224[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4288[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
--1
-#ifdef __GNUC__
-};
-short int int_list4352[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4416[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4480[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4544[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-375
-#ifdef __GNUC__
-};
-short int int_list4608[] = {
-#else
-,
-#endif
-375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4672[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4736[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4800[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
--1
-#ifdef __GNUC__
-};
-short int int_list4864[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list4928[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list4992[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list5056[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
-210
-#ifdef __GNUC__
-};
-short int int_list5120[] = {
-#else
-,
-#endif
-210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5184[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5248[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5312[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
--1
-#ifdef __GNUC__
-};
-short int int_list5376[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5440[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5504[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5568[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
-15
-#ifdef __GNUC__
-};
-short int int_list5632[] = {
-#else
-,
-#endif
-15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5696[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5760[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5824[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
--1
-#ifdef __GNUC__
-};
-short int int_list5888[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list5952[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list6016[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list6080[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-241
-#ifdef __GNUC__
-};
-short int int_list6144[] = {
-#else
-,
-#endif
-241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6208[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6272[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6336[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-236
-#ifdef __GNUC__
-};
-short int int_list6400[] = {
-#else
-,
-#endif
-236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6464[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6528[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6592[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-115
-#ifdef __GNUC__
-};
-short int int_list6656[] = {
-#else
-,
-#endif
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6720[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6784[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6848[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-110
-#ifdef __GNUC__
-};
-short int int_list6912[] = {
-#else
-,
-#endif
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list6976[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list7040[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list7104[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
--1
-#ifdef __GNUC__
-};
-short int int_list7168[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7232[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7296[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7360[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7424[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7488[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7552[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7616[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
--1
-#ifdef __GNUC__
-};
-short int int_list7680[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7744[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7808[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7872[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
--1
-#ifdef __GNUC__
-};
-short int int_list7936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8000[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8064[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list8192[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8256[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8320[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8384[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-167
-#ifdef __GNUC__
-};
-short int int_list8448[] = {
-#else
-,
-#endif
-167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8512[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8576[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8640[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-297
-#ifdef __GNUC__
-};
-short int int_list8704[] = {
-#else
-,
-#endif
-297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8768[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8832[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8896[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-292
-#ifdef __GNUC__
-};
-short int int_list8960[] = {
-#else
-,
-#endif
-292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9024[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9088[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9152[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-336
-#ifdef __GNUC__
-};
-short int int_list9216[] = {
-#else
-,
-#endif
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9280[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9344[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9408[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-331
-#ifdef __GNUC__
-};
-short int int_list9472[] = {
-#else
-,
-#endif
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9536[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9600[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9664[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-36
-#ifdef __GNUC__
-};
-short int int_list9728[] = {
-#else
-,
-#endif
-36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9792[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9856[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9920[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-31
-#ifdef __GNUC__
-};
-short int int_list9984[] = {
-#else
-,
-#endif
-31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10048[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10112[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10176[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
--1
-#ifdef __GNUC__
-};
-short int int_list10240[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10304[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10368[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10432[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
--1
-#ifdef __GNUC__
-};
-short int int_list10496[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10560[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10624[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10688[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
--1
-#ifdef __GNUC__
-};
-short int int_list10752[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10816[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10880[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10944[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
--1
-#ifdef __GNUC__
-};
-short int int_list11008[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11072[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11136[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11200[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
--1
-#ifdef __GNUC__
-};
-short int int_list11264[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11328[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11392[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11456[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
--1
-#ifdef __GNUC__
-};
-short int int_list11520[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11584[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11648[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11712[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
--1
-#ifdef __GNUC__
-};
-short int int_list11776[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11840[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11904[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11968[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
--1
-#ifdef __GNUC__
-};
-short int int_list12032[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12096[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12160[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12224[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-226
-#ifdef __GNUC__
-};
-short int int_list12288[] = {
-#else
-,
-#endif
-226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12352[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12416[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12480[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-224
-#ifdef __GNUC__
-};
-short int int_list12544[] = {
-#else
-,
-#endif
-224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12608[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12672[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12736[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-225
-#ifdef __GNUC__
-};
-short int int_list12800[] = {
-#else
-,
-#endif
-225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12864[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12928[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12992[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-223
-#ifdef __GNUC__
-};
-short int int_list13056[] = {
-#else
-,
-#endif
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13120[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13184[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13248[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-175
-#ifdef __GNUC__
-};
-short int int_list13312[] = {
-#else
-,
-#endif
-175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13376[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13440[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13504[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-228
-#ifdef __GNUC__
-};
-short int int_list13568[] = {
-#else
-,
-#endif
-228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13632[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13696[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13760[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-37
-#ifdef __GNUC__
-};
-short int int_list13824[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list13888[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list13952[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list14016[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-227
-#ifdef __GNUC__
-};
-short int int_list14080[] = {
-#else
-,
-#endif
-227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14144[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14208[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14272[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-311
-#ifdef __GNUC__
-};
-short int int_list14336[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14400[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14464[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14528[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
--1
-#ifdef __GNUC__
-};
-short int int_list14592[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14656[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14720[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14784[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list14848[] = {
-#else
-,
-#endif
--1,-1,-1,138,338,265,351,-1,-1,-1,-1,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list14912[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list14976[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list15040[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,339,263,350,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15168[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15232[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15296[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15360[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15424[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15488[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15552[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
--1
-#ifdef __GNUC__
-};
-short int int_list15616[] = {
-#else
-,
-#endif
--1,-1,-1,136,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15680[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15744[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15808[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
--1
-#ifdef __GNUC__
-};
-short int int_list15872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list15936[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list16000[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list16064[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
--1
-#ifdef __GNUC__
-};
-short int int_list16128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16192[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16256[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16320[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-8
-#ifdef __GNUC__
-};
-short int int_list16384[] = {
-#else
-,
-#endif
-8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16448[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16512[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16576[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-3
-#ifdef __GNUC__
-};
-short int int_list16640[] = {
-#else
-,
-#endif
-3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16704[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16768[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16832[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-368
-#ifdef __GNUC__
-};
-short int int_list16896[] = {
-#else
-,
-#endif
-368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list16960[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list17024[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list17088[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-363
-#ifdef __GNUC__
-};
-short int int_list17152[] = {
-#else
-,
-#endif
-363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17216[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17280[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17344[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-258
-#ifdef __GNUC__
-};
-short int int_list17408[] = {
-#else
-,
-#endif
-258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17472[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17536[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17600[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-253
-#ifdef __GNUC__
-};
-short int int_list17664[] = {
-#else
-,
-#endif
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17728[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17792[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17856[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-23
-#ifdef __GNUC__
-};
-short int int_list17920[] = {
-#else
-,
-#endif
-23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list17984[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list18048[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list18112[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-18
-#ifdef __GNUC__
-};
-short int int_list18176[] = {
-#else
-,
-#endif
-18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18240[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18304[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18368[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-413
-#ifdef __GNUC__
-};
-short int int_list18432[] = {
-#else
-,
-#endif
-413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18496[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18560[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18624[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-408
-#ifdef __GNUC__
-};
-short int int_list18688[] = {
-#else
-,
-#endif
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18752[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18816[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18880[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-71
-#ifdef __GNUC__
-};
-short int int_list18944[] = {
-#else
-,
-#endif
-71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19008[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19072[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19136[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-63
-#ifdef __GNUC__
-};
-short int int_list19200[] = {
-#else
-,
-#endif
-63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19264[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19328[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19392[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-55
-#ifdef __GNUC__
-};
-short int int_list19456[] = {
-#else
-,
-#endif
-69,248,-1,384,180,404,-1,47,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19520[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19584[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19648[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-51
-#ifdef __GNUC__
-};
-short int int_list19712[] = {
-#else
-,
-#endif
-61,244,-1,380,160,400,-1,43,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19776[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19840[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19904[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list19968[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20032[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20096[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20160[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20224[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20288[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20352[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20416[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-84
-#ifdef __GNUC__
-};
-short int int_list20480[] = {
-#else
-,
-#endif
-84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20544[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20608[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20672[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
--1
-#ifdef __GNUC__
-};
-short int int_list20736[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20800[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20864[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20928[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-373
-#ifdef __GNUC__
-};
-short int int_list20992[] = {
-#else
-,
-#endif
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21056[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21120[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21184[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
--1
-#ifdef __GNUC__
-};
-short int int_list21248[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21312[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21376[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21440[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-208
-#ifdef __GNUC__
-};
-short int int_list21504[] = {
-#else
-,
-#endif
-208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21568[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21632[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21696[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
--1
-#ifdef __GNUC__
-};
-short int int_list21760[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21824[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21888[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21952[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-13
-#ifdef __GNUC__
-};
-short int int_list22016[] = {
-#else
-,
-#endif
-13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22080[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22144[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22208[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
--1
-#ifdef __GNUC__
-};
-short int int_list22272[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22336[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22400[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22464[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-239
-#ifdef __GNUC__
-};
-short int int_list22528[] = {
-#else
-,
-#endif
-239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22592[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22656[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22720[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-234
-#ifdef __GNUC__
-};
-short int int_list22784[] = {
-#else
-,
-#endif
-234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22848[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22912[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22976[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-113
-#ifdef __GNUC__
-};
-short int int_list23040[] = {
-#else
-,
-#endif
-113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23104[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23168[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23232[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-108
-#ifdef __GNUC__
-};
-short int int_list23296[] = {
-#else
-,
-#endif
-108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23360[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23424[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23488[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
--1
-#ifdef __GNUC__
-};
-short int int_list23552[] = {
-#else
-,
-#endif
-219,-1,-1,-1,-1,-1,-1,388,216,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23616[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23680[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23744[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
-204
-#ifdef __GNUC__
-};
-short int int_list23808[] = {
-#else
-,
-#endif
-204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list23872[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list23936[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list24000[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-153
-#ifdef __GNUC__
-};
-short int int_list24064[] = {
-#else
-,
-#endif
-153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24128[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24192[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24256[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-39
-#ifdef __GNUC__
-};
-short int int_list24320[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24384[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24448[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24512[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-183
-#ifdef __GNUC__
-};
-short int int_list24576[] = {
-#else
-,
-#endif
-183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24640[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24704[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24768[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-165
-#ifdef __GNUC__
-};
-short int int_list24832[] = {
-#else
-,
-#endif
-165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list24896[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list24960[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list25024[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-295
-#ifdef __GNUC__
-};
-short int int_list25088[] = {
-#else
-,
-#endif
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25152[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25216[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25280[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-290
-#ifdef __GNUC__
-};
-short int int_list25344[] = {
-#else
-,
-#endif
-290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25408[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25472[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25536[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-334
-#ifdef __GNUC__
-};
-short int int_list25600[] = {
-#else
-,
-#endif
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25664[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25728[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25792[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-329
-#ifdef __GNUC__
-};
-short int int_list25856[] = {
-#else
-,
-#endif
-329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list25920[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list25984[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list26048[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-34
-#ifdef __GNUC__
-};
-short int int_list26112[] = {
-#else
-,
-#endif
-34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26176[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26240[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26304[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-29
-#ifdef __GNUC__
-};
-short int int_list26368[] = {
-#else
-,
-#endif
-29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26432[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26496[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26560[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-145
-#ifdef __GNUC__
-};
-short int int_list26624[] = {
-#else
-,
-#endif
-145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26688[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26752[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26816[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-141
-#ifdef __GNUC__
-};
-short int int_list26880[] = {
-#else
-,
-#endif
-141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list26944[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list27008[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list27072[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-104
-#ifdef __GNUC__
-};
-short int int_list27136[] = {
-#else
-,
-#endif
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27200[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27264[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27328[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-100
-#ifdef __GNUC__
-};
-short int int_list27392[] = {
-#else
-,
-#endif
-100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27456[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27520[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27584[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-124
-#ifdef __GNUC__
-};
-short int int_list27648[] = {
-#else
-,
-#endif
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27712[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27776[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27840[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-120
-#ifdef __GNUC__
-};
-short int int_list27904[] = {
-#else
-,
-#endif
-120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list27968[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list28032[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list28096[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-181
-#ifdef __GNUC__
-};
-short int int_list28160[] = {
-#else
-,
-#endif
-181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28224[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28288[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28352[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-161
-#ifdef __GNUC__
-};
-short int int_list28416[] = {
-#else
-,
-#endif
-161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28480[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28544[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28608[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
--1
-#ifdef __GNUC__
-};
-short int int_list28672[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28736[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28800[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28864[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
--1
-#ifdef __GNUC__
-};
-short int int_list28928[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list28992[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list29056[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list29120[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
--1
-#ifdef __GNUC__
-};
-short int int_list29184[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29248[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29312[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29376[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
--1
-#ifdef __GNUC__
-};
-short int int_list29440[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29504[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29568[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29632[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
--1
-#ifdef __GNUC__
-};
-short int int_list29696[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29760[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29824[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29888[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
--1
-#ifdef __GNUC__
-};
-short int int_list29952[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30016[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30080[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30144[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-171
-#ifdef __GNUC__
-};
-short int int_list30208[] = {
-#else
-,
-#endif
-171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30272[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30336[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30400[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
--1
-#ifdef __GNUC__
-};
-short int int_list30464[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30528[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30592[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30656[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-312
-#ifdef __GNUC__
-};
-short int int_list30720[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30784[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30848[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30912[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-221
-#ifdef __GNUC__
-};
-short int int_list30976[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31040[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31168[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-134
-#ifdef __GNUC__
-};
-short int int_list31232[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31296[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31360[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31424[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-151
-#ifdef __GNUC__
-};
-short int int_list31488[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,232,231,229,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31552[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31616[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31680[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
-106
-#ifdef __GNUC__
-};
-short int int_list31744[] = {
-#else
-,
-#endif
-106,106,106,118,118,118,118,106,106,106,106,118,118,118,118,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31808[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-192
-#ifdef __GNUC__
-};
-short int int_list32000[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32064[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32128[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32192[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-313
-#ifdef __GNUC__
-};
-short int int_list32256[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32320[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32384[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32448[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-320
-#ifdef __GNUC__
-};
-short int int_list32512[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32576[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32640[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32704[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-11
-#ifdef __GNUC__
-};
-short int int_list32768[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32832[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32896[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32960[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-6
-#ifdef __GNUC__
-};
-short int int_list33024[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33088[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33152[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33216[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-371
-#ifdef __GNUC__
-};
-short int int_list33280[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33344[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33408[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33472[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-366
-#ifdef __GNUC__
-};
-short int int_list33536[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33600[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33664[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33728[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-261
-#ifdef __GNUC__
-};
-short int int_list33792[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33856[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33920[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33984[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-256
-#ifdef __GNUC__
-};
-short int int_list34048[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34112[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34176[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34240[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-26
-#ifdef __GNUC__
-};
-short int int_list34304[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34368[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34432[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34496[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-21
-#ifdef __GNUC__
-};
-short int int_list34560[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34624[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34688[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34752[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-416
-#ifdef __GNUC__
-};
-short int int_list34816[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list34880[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list34944[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list35008[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-411
-#ifdef __GNUC__
-};
-short int int_list35072[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35136[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35200[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35264[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-74
-#ifdef __GNUC__
-};
-short int int_list35328[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35392[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35456[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35520[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-66
-#ifdef __GNUC__
-};
-short int int_list35584[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35648[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35712[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35776[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-57
-#ifdef __GNUC__
-};
-short int int_list35840[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list35904[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list35968[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list36032[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36096[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,251,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36160[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36224[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36288[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-129
-#ifdef __GNUC__
-};
-short int int_list36352[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36416[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36480[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36544[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-130
-#ifdef __GNUC__
-};
-short int int_list36608[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36672[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36736[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36800[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-87
-#ifdef __GNUC__
-};
-short int int_list36864[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list36928[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list36992[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list37056[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
--1
-#ifdef __GNUC__
-};
-short int int_list37120[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37184[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37248[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37312[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-376
-#ifdef __GNUC__
-};
-short int int_list37376[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37440[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37504[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37568[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
--1
-#ifdef __GNUC__
-};
-short int int_list37632[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37696[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37760[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37824[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-211
-#ifdef __GNUC__
-};
-short int int_list37888[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list37952[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list38016[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list38080[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
--1
-#ifdef __GNUC__
-};
-short int int_list38144[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38208[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38272[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38336[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-16
-#ifdef __GNUC__
-};
-short int int_list38400[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38464[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38528[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38592[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
--1
-#ifdef __GNUC__
-};
-short int int_list38656[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38720[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38784[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38848[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-242
-#ifdef __GNUC__
-};
-short int int_list38912[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list38976[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list39040[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list39104[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-237
-#ifdef __GNUC__
-};
-short int int_list39168[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39232[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39296[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39360[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-116
-#ifdef __GNUC__
-};
-short int int_list39424[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39488[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39552[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39616[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-111
-#ifdef __GNUC__
-};
-short int int_list39680[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39744[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39808[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39872[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
--1
-#ifdef __GNUC__
-};
-short int int_list39936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40000[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40064[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
-314
-#ifdef __GNUC__
-};
-short int int_list40192[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40256[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40320[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40384[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-299
-#ifdef __GNUC__
-};
-short int int_list40448[] = {
-#else
-,
-#endif
-299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40512[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40576[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40640[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-315
-#ifdef __GNUC__
-};
-short int int_list40704[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40768[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40832[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40896[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-186
-#ifdef __GNUC__
-};
-short int int_list40960[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41024[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41088[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41152[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-168
-#ifdef __GNUC__
-};
-short int int_list41216[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41280[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41344[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41408[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-296
-#ifdef __GNUC__
-};
-short int int_list41472[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41536[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41600[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41664[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-291
-#ifdef __GNUC__
-};
-short int int_list41728[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41792[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41856[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41920[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-335
-#ifdef __GNUC__
-};
-short int int_list41984[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42048[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42112[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42176[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-330
-#ifdef __GNUC__
-};
-short int int_list42240[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42304[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42368[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42432[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-35
-#ifdef __GNUC__
-};
-short int int_list42496[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42560[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42624[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42688[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-30
-#ifdef __GNUC__
-};
-short int int_list42752[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42816[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42880[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42944[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-146
-#ifdef __GNUC__
-};
-short int int_list43008[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43072[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43136[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43200[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-142
-#ifdef __GNUC__
-};
-short int int_list43264[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43328[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43392[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43456[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-105
-#ifdef __GNUC__
-};
-short int int_list43520[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43584[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43648[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43712[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-101
-#ifdef __GNUC__
-};
-short int int_list43776[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43840[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43904[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43968[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-126
-#ifdef __GNUC__
-};
-short int int_list44032[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44096[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44160[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44224[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-122
-#ifdef __GNUC__
-};
-short int int_list44288[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44352[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44416[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44480[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-378
-#ifdef __GNUC__
-};
-short int int_list44544[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44608[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44672[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44736[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-377
-#ifdef __GNUC__
-};
-short int int_list44800[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44864[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44928[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44992[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-96
-#ifdef __GNUC__
-};
-short int int_list45056[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45120[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45184[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45248[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45312[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45376[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45440[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45504[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45568[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45632[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45696[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45760[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-300
-#ifdef __GNUC__
-};
-short int int_list45824[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list45888[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list45952[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list46016[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-1
-#ifdef __GNUC__
-};
-short int int_list46080[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46144[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46208[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46272[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-0
-#ifdef __GNUC__
-};
-short int int_list46336[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46400[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46464[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46528[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-319
-#ifdef __GNUC__
-};
-short int int_list46592[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46656[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46720[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46784[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-318
-#ifdef __GNUC__
-};
-short int int_list46848[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list46912[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list46976[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list47040[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
--1
-#ifdef __GNUC__
-};
-short int int_list47104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47168[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47232[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47296[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-316
-#ifdef __GNUC__
-};
-short int int_list47360[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47424[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47488[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47552[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
--1
-#ifdef __GNUC__
-};
-short int int_list47616[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47680[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47744[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47808[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list47872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list47936[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list48000[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list48064[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-309
-#ifdef __GNUC__
-};
-short int int_list48128[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48192[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48256[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48320[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-201
-#ifdef __GNUC__
-};
-short int int_list48384[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48448[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48512[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48576[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-304
-#ifdef __GNUC__
-};
-short int int_list48640[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48704[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48768[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48832[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-317
-#ifdef __GNUC__
-};
-short int int_list48896[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list48960[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list49024[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list49088[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-185
-#ifdef __GNUC__
-};
-short int int_list49152[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49216[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49280[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49344[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49408[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49472[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49536[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49600[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49664[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49728[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49792[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49856[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49920[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49984[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50048[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50112[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50176[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50240[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50304[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50368[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50432[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50496[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50560[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50624[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50688[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50752[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50816[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50880[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50944[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51008[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51072[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51136[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51200[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51264[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51328[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51392[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51456[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51520[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51584[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51648[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51712[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51776[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51840[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51904[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51968[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52032[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52096[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52160[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52224[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52288[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52352[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52416[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52480[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52544[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52608[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52672[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52736[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52800[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52864[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52928[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52992[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53056[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53120[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53184[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-41
-#ifdef __GNUC__
-};
-short int int_list53248[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53312[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53376[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53440[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53504[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53568[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53632[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53696[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53760[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53824[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53888[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53952[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54016[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54080[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54144[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54208[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54272[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54336[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54400[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54464[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54528[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54592[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54656[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54720[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54784[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54848[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54912[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54976[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55040[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55104[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55168[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55232[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55296[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55360[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55424[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55488[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55552[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55616[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55680[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55744[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55808[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55872[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55936[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56000[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56064[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56128[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56192[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56256[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56320[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56384[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56448[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56512[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56576[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56640[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56704[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56768[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56832[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56896[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56960[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57024[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57088[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57152[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57216[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57280[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-155
-#ifdef __GNUC__
-};
-short int int_list57344[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57408[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57472[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57536[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57600[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57664[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57728[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57792[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57856[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57920[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57984[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58048[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58112[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58176[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58240[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58304[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58368[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58432[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58496[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58560[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58624[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58688[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58752[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58816[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58880[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58944[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59008[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59072[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59136[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59200[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59264[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59328[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59392[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59456[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59520[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59584[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59648[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59712[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59776[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59840[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59904[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59968[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60032[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60096[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60160[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60224[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60288[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60352[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60416[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60480[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60544[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60608[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60672[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60736[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60800[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60864[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60928[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60992[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61056[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61120[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61184[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61248[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61312[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61376[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-97
-#ifdef __GNUC__
-};
-short int int_list61440[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list61504[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list61568[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list61632[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list61696[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list61760[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list61824[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list61888[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list61952[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62016[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62080[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62144[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62208[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62272[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62336[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62400[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62464[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62528[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62592[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62656[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62720[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62784[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62848[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62912[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62976[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63040[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63104[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63168[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63232[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63296[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63360[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63424[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63488[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63552[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63616[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63680[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63744[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63808[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63872[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63936[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64000[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64064[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64128[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64192[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64256[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64320[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64384[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64448[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64512[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64576[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64640[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64704[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64768[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64832[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64896[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64960[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list65024[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list65088[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list65152[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list65216[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list65280[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list65344[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list65408[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list65472[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117};
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
#include "syscall.h"
static int get_now PARAMS ((void));
-
/* generate instructions for Z8KSIM
- Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 2002 Free Software Foundation, Inc.
This file is part of Z8KSIM
-b3 tc-genb3.h same as -3 but for long pointers
- -m regenerates list.c, which is an inverted list of opcodes to
- pointers into the z8k dissassemble opcode table, it's just there
- to makes things faster.
*/
/* steve chamberlain
#define NOPS 500
-#define DIRTY_HACK 0 /* Enable if your gcc can't cope with huge tables */
-extern short z8k_inv_list[];
struct opcode_value
{
int n;
#define SIZE_ADDRESS (BIG ? 8 : 4) /* number of nibbles in a ptr*/
static int file;
-static int makelist;
static int nibs = 0;
lookup_inst (what)
int what;
{
- if (makelist)
+ static short *z8k_inv_list = NULL;
+ const nr_z8k_inv_list_elements = 1 << 16;
+ if (z8k_inv_list == NULL)
+ {
+ /* Initialize the list to 0xff == -1 */
+ z8k_inv_list = calloc (nr_z8k_inv_list_elements, sizeof (short));
+ memset (z8k_inv_list, 0xff, nr_z8k_inv_list_elements * sizeof (short));
+ }
+ /* Entry empty? Fill it in. */
+ if (z8k_inv_list[what] == -1)
{
int nibl_index;
instr_nibbles[1] = (what >> 8) & 0xf;
instr_nibbles[0] = (what >> 12) & 0xf;
+ /* Assume it won't be found. */
+ z8k_inv_list[what] = -2;
+
while (ptr->name)
{
nibl_matched = 1;
}
if (nibl_matched)
{
- return ptr;
+ z8k_inv_list[what] = ptr->idx;
+ break; /* while */
}
ptr++;
}
- return 0;
- }
- else
- {
-
- if (z8k_inv_list[what] < 0)
- return 0;
- return z8k_table + z8k_inv_list[what];
}
+ if (z8k_inv_list[what] >= 0)
+ return z8k_table + z8k_inv_list[what];
+ return 0;
}
static char *
int i;
int needcomma = 0;
- makelist = 0;
-
for (i = 1; i < ac; i++)
{
- if (strcmp (av[i], "-m") == 0)
- makelist = 1;
if (strcmp (av[i], "-1") == 0)
file = 1;
if (strcmp (av[i], "-2") == 0)
}
}
- if (makelist)
- {
-
- int i;
- needcomma = 0;
- printf ("short int z8k_inv_list[] = {\n");
-
- for (i = 0; i < 1 << 16; i++)
- {
- opcode_entry_type *p = lookup_inst (i);
-
- if(needcomma)
- printf(",");
- if ((i & 0xf) == 0)
- printf ("\n");
-
-#if 0
- printf ("\n /*%04x %s */", i, p ? p->nicename : "");
-#endif
-
- if (!p)
- {
- printf ("-1");
- }
- else
- {
- printf ("%d", p->idx);
- }
-
- if ((i & 0x3f) == 0 && DIRTY_HACK)
- {
- printf ("\n#ifdef __GNUC__\n");
- printf ("};\n");
- printf("short int int_list%d[] = {\n", i);
- printf ("#else\n");
- printf (",\n");
- printf ("#endif\n");
- needcomma = 0;
- }
- else
- needcomma = 1;
-
- }
- printf ("};\n");
- return 1;
- }
/* First work out which opcodes use which bit patterns,
build a list of all matching bit pattens */
{
int t = quick[i];
- mangle (z8k_table + z8k_inv_list[t],
- 1,
- t);
+ mangle (lookup_inst (t), 1, t);
}
}
if (file == 3)
printf (",");
emit ("<fop>_%d\n", i);
needcomma = 1;
- if ((i & 0x3f) == 0 && DIRTY_HACK)
- {
- printf ("#ifdef __GNUC__\n");
- printf ("};\n");
- emit ("int (*(<fop>_table%d[]))() = {\n", i);
- printf ("#else\n");
- printf (",\n");
- printf ("#endif\n");
- needcomma = 0;
- }
}
emit ("};\n");
}
printf ("struct op_info op_info_table[] = {\n");
for (i = 0; i < 1 << 16; i++)
{
- int inv = z8k_inv_list[i];
- opcode_entry_type *p = z8k_table + inv;
+ opcode_entry_type *p = lookup_inst (i);
if (needcomma)
printf (",");
}
else
#endif
- if (inv >= 0)
+ if (p != NULL)
{
- printf ("%d", inv);
+ printf ("%d", p->idx);
}
else
printf ("400");
- if (inv >= 0)
+ if (p != NULL)
{
printf (" /* %04x %s */\n", i, p->nicename);
}
printf ("\n");
}
needcomma = 1;
- if ((i & 0x3f) == 0 && DIRTY_HACK)
- {
- printf ("#ifdef __GNUC__\n");
- printf ("}; \n");
- printf ("struct op_info op_info_table%d[] = {\n", i);
- printf ("#else\n");
- printf (",\n");
-
- printf ("#endif\n");
- needcomma = 0;
- }
}
printf ("};\n");