diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-03-21 23:57:47 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-03-21 23:57:47 +0000 |
commit | d2ad28bb36aa9704073ab540bd03c218b89f63a1 (patch) | |
tree | afbda1d2042137eba9281f1c7f60c8156dfbd3e9 | |
parent | 8454de7cf3c1651f2b41ee68199015d6735c6fdc (diff) | |
download | gdb-d2ad28bb36aa9704073ab540bd03c218b89f63a1.zip gdb-d2ad28bb36aa9704073ab540bd03c218b89f63a1.tar.gz gdb-d2ad28bb36aa9704073ab540bd03c218b89f63a1.tar.bz2 |
Merge with mainline cagney_tramp-20040321-mergepoint.
569 files changed, 7725 insertions, 19886 deletions
@@ -1,3 +1,59 @@ +2004-03-17 Paolo Bonzini <bonzini@gnu.org> + + * configure.in: Remove symbolic link section. + * configure: Regenerate. + * Makefile.tpl (links): Remove. + * Makefile.in: Regenerate. + +2004-03-15 Paolo Bonzini <bonzini@gnu.org> + Nathanael Nerode <neroden@gcc.gnu.org> + + * configure.in (DEFAULT_YACC, DEFAULT_M4, DEFAULT_LEX): + Set with AC_CHECK_PROGS. + * configure.in: Fix comment typo from last patch. + * configure: Regenerate. + +2004-03-15 Nathanael Nerode <neroden@gcc.gnu.org> + + * Makefile.tpl: Introduce experimental top level bootstrap support. + * Makefile.in: Regenerate. + * configure.in: Introduce support for top level bootstrap. + * configure: Regenerate. + +2004-03-12 Eric Botcazou <ebotcazou@gcc.gnu.org> + Paolo Bonzini <bonzini@gnu.org> + + PR bootstrap/14522 + * configure.in: Cope with shells that do not support unquoted ^ + * configure: Regenerate. + +2004-03-11 Eric Botcazou <ebotcazou@gcc.gnu.org> + Paolo Bonzini <bonzini@gnu.org> + + PR bootstrap/14522 + * configure.in: Cope with shell that do not support nesting + quotes inside quoted backquote substitutions. + * configure: Regenerate. + +2004-03-10 Andrew Pinski <pinskia@physics.uc.edu> + + PR bootstrap/14522 + * configure.in: Fix escaping of $. + * configure: Regenerate. + +2004-03-11 Nathanael Nerode <neroden@gcc.gnu.org> + + * configure: Regenerate. + +2004-03-08 Paolo Bonzini <bonzini@gnu.org> + + PR ada/14131 + Move language detection to the top level. + * configure.in: Find default values for the tools as + soon as possible. Disable ada if GNAT is not found. + Emit error message about missing languages. Expand + --enable-languages=all for the gcc subdirectory. + 2004-03-01 Richard Sandiford <rsandifo@redhat.com> * configure.in (mips64*-*-linux*): Override mips*-*-linux* case diff --git a/Makefile.in b/Makefile.in index 91c19d9..5e7cd6f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -70,7 +70,6 @@ INSTALL_DATA = @INSTALL_DATA@ # Miscellaneous non-standard autoconf-set variables # ------------------------------------------------- -links=@configlinks@ # The file containing GCC's version number. gcc_version_trigger = @gcc_version_trigger@ gcc_version = @gcc_version@ @@ -23555,10 +23554,13 @@ install-target-libada: installdirs # Don't use shared host config.cache, as it will confuse later # directories; GCC wants slightly different values for some # precious variables. *sigh* + +# We must skip configuring if toplevel bootstrap is going. .PHONY: configure-gcc maybe-configure-gcc maybe-configure-gcc: configure-gcc: @test ! -f gcc/Makefile || exit 0; \ + [ -f stage_last ] && exit 0; \ [ -d gcc ] || mkdir gcc; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -23601,14 +23603,14 @@ configure-gcc: .PHONY: all-gcc maybe-all-gcc maybe-all-gcc: all-gcc: configure-gcc - @if [ -f gcc/stage_last ] ; then \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f stage_last ] ; then \ + true ; \ + elif [ -f gcc/stage_last ] ; then \ $(SET_LIB_PATH) \ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ else \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(SET_LIB_PATH) \ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ fi @@ -23746,6 +23748,270 @@ gcc-no-fixedincludes: mv gcc/tmp-include gcc/include 2>/dev/null; \ else true; fi +# --------------------- +# GCC bootstrap support +# --------------------- + +# We name the directories for the various stages "stage1-gcc", +# "stage2-gcc","stage3-gcc", etc. +# Unfortunately, the 'compare' process will fail (on debugging information) +# if any directory names are different! +# So in the building rule for each stage, we relocate them before and after. +# The current one is 'gcc', while the previous one is 'prev-gcc'. (The +# current one must be 'gcc' for now because the scripts in that directory +# assume it.) +# At the end of the bootstrap, 'stage3-gcc' must be moved to 'gcc' so that +# libraries can find it. Ick! + +# Bugs: This is almost certainly not parallel-make safe. + +# 'touch' doesn't work right on some platforms. +STAMP = echo timestamp > + +# Only build the C compiler for stage1, because that is the only one that +# we can guarantee will build with the native compiler, and also it is the +# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS), +# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them +# overrideable (for a bootstrap build stage1 also builds gcc.info). + +STAGE1_CFLAGS=@stage1_cflags@ +STAGE1_LANGUAGES=@stage1_languages@ + +configure-stage1-gcc: + echo configure-stage1-gcc > stage_last ; \ + if [ -f stage1-gcc/Makefile ] ; then \ + $(STAMP) configure-stage1-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage1-gcc ] || mkdir stage1-gcc; \ + mv stage1-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 1 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage1-gcc ; \ + $(STAMP) configure-stage1-gcc + +all-stage1-gcc: configure-stage1-gcc all-bootstrap + echo all-stage1-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage1-gcc gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + LANGUAGES="$(STAGE1_LANGUAGES)" \ + CFLAGS="$(STAGE1_CFLAGS)" \ + COVERAGE_FLAGS= || exit 1 ; \ + cd .. ; \ + mv gcc stage1-gcc ; \ + $(STAMP) all-stage1-gcc + +configure-stage2-gcc: all-stage1-gcc + echo configure-stage2-gcc > stage_last ; \ + if [ -f stage2-gcc/Makefile ] ; then \ + $(STAMP) configure-stage2-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage2-gcc ] || mkdir stage2-gcc; \ + mv stage2-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 2 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage2-gcc ; \ + $(STAMP) configure-stage2-gcc + +# Flags to pass to stage2 and later makes. +BOOT_CFLAGS= -g -O2 +POSTSTAGE1_FLAGS_TO_PASS = \ + CFLAGS="$(BOOT_CFLAGS)" \ + ADAC="\$$(CC)" \ + WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ + STRICT_WARN="\$$(STRICT2_WARN)" \ + OUTPUT_OPTION="-o \$$@" + +all-stage2-gcc: all-stage1-gcc configure-stage2-gcc + echo all-stage2-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage2-gcc gcc ; \ + mv stage1-gcc prev-gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + BUILD_CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + STAGE_PREFIX=$$r/prev-gcc/ \ + $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \ + cd .. ; \ + mv prev-gcc stage1-gcc ; \ + mv gcc stage2-gcc ; \ + $(STAMP) all-stage2-gcc + +configure-stage3-gcc: all-stage2-gcc + echo configure-stage3-gcc > stage_last ; \ + if [ -f stage3-gcc/Makefile ] ; then \ + $(STAMP) configure-stage3-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage3-gcc ] || mkdir stage3-gcc; \ + mv stage3-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 3 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage3-gcc ; \ + $(STAMP) configure-stage3-gcc + +# Some files might not exist. This is disabled 'cause it don't work. +# cp prev-gcc/objc/objc-parse.c gcc/objc/objc-parse.c || true ; \ +# cp prev-gcc/java/parse.c gcc/java/parse.c || true ; \ +# cp prev-gcc/java/parse-scan.c gcc/java/parse-scan.c || true ; \ + +all-stage3-gcc: all-stage2-gcc configure-stage3-gcc + echo all-stage3-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage2-gcc prev-gcc ; \ + mv stage3-gcc gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + BUILD_CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + STAGE_PREFIX=$$r/prev-gcc/ \ + $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \ + cd .. ; \ + mv prev-gcc stage2-gcc ; \ + mv gcc stage3-gcc ; \ + $(STAMP) all-stage3-gcc + +# We only want to compare .o files, so set this! +objext = .o + +compare: all-stage3-gcc + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + rm -f .bad_compare ; \ + cd stage3-gcc; \ + files=`find . -name "*$(objext)" -print` ; \ + cd .. ; \ + for file in $${files} ; do \ + cmp --ignore-initial=16 $$r/stage2-gcc/$$file $$r/stage3-gcc/$$file \ + > /dev/null 2>&1; \ + test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \ + done ; \ + if [ -f .bad_compare ]; then \ + echo "Bootstrap comparison failure!"; \ + cat .bad_compare; \ + exit 1; \ + else \ + true; \ + fi ; \ + $(STAMP) compare + +.PHONY: new-bootstrap +# This target exists so that everything can be made in one pass. +# 'all-gcc' has to avoid stomping on the bootstrap-generated gcc for +# this to work. +new-bootstrap: compare + mv stage3-gcc gcc ; \ + $(MAKE) all ; \ + mv gcc stage3-gcc + # -------------------------------------- # Dependencies between different modules # -------------------------------------- diff --git a/Makefile.tpl b/Makefile.tpl index 6a30f45..0dcad30 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -73,7 +73,6 @@ INSTALL_DATA = @INSTALL_DATA@ # Miscellaneous non-standard autoconf-set variables # ------------------------------------------------- -links=@configlinks@ # The file containing GCC's version number. gcc_version_trigger = @gcc_version_trigger@ gcc_version = @gcc_version@ @@ -1072,10 +1071,13 @@ install-target-[+module+]: installdirs # Don't use shared host config.cache, as it will confuse later # directories; GCC wants slightly different values for some # precious variables. *sigh* + +# We must skip configuring if toplevel bootstrap is going. .PHONY: configure-gcc maybe-configure-gcc maybe-configure-gcc: configure-gcc: @test ! -f gcc/Makefile || exit 0; \ + [ -f stage_last ] && exit 0; \ [ -d gcc ] || mkdir gcc; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ @@ -1118,14 +1120,14 @@ configure-gcc: .PHONY: all-gcc maybe-all-gcc maybe-all-gcc: all-gcc: configure-gcc - @if [ -f gcc/stage_last ] ; then \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f stage_last ] ; then \ + true ; \ + elif [ -f gcc/stage_last ] ; then \ $(SET_LIB_PATH) \ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ else \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(SET_LIB_PATH) \ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ fi @@ -1263,6 +1265,270 @@ gcc-no-fixedincludes: mv gcc/tmp-include gcc/include 2>/dev/null; \ else true; fi +# --------------------- +# GCC bootstrap support +# --------------------- + +# We name the directories for the various stages "stage1-gcc", +# "stage2-gcc","stage3-gcc", etc. +# Unfortunately, the 'compare' process will fail (on debugging information) +# if any directory names are different! +# So in the building rule for each stage, we relocate them before and after. +# The current one is 'gcc', while the previous one is 'prev-gcc'. (The +# current one must be 'gcc' for now because the scripts in that directory +# assume it.) +# At the end of the bootstrap, 'stage3-gcc' must be moved to 'gcc' so that +# libraries can find it. Ick! + +# Bugs: This is almost certainly not parallel-make safe. + +# 'touch' doesn't work right on some platforms. +STAMP = echo timestamp > + +# Only build the C compiler for stage1, because that is the only one that +# we can guarantee will build with the native compiler, and also it is the +# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS), +# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them +# overrideable (for a bootstrap build stage1 also builds gcc.info). + +STAGE1_CFLAGS=@stage1_cflags@ +STAGE1_LANGUAGES=@stage1_languages@ + +configure-stage1-gcc: + echo configure-stage1-gcc > stage_last ; \ + if [ -f stage1-gcc/Makefile ] ; then \ + $(STAMP) configure-stage1-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage1-gcc ] || mkdir stage1-gcc; \ + mv stage1-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 1 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage1-gcc ; \ + $(STAMP) configure-stage1-gcc + +all-stage1-gcc: configure-stage1-gcc all-bootstrap + echo all-stage1-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage1-gcc gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + LANGUAGES="$(STAGE1_LANGUAGES)" \ + CFLAGS="$(STAGE1_CFLAGS)" \ + COVERAGE_FLAGS= || exit 1 ; \ + cd .. ; \ + mv gcc stage1-gcc ; \ + $(STAMP) all-stage1-gcc + +configure-stage2-gcc: all-stage1-gcc + echo configure-stage2-gcc > stage_last ; \ + if [ -f stage2-gcc/Makefile ] ; then \ + $(STAMP) configure-stage2-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage2-gcc ] || mkdir stage2-gcc; \ + mv stage2-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 2 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage2-gcc ; \ + $(STAMP) configure-stage2-gcc + +# Flags to pass to stage2 and later makes. +BOOT_CFLAGS= -g -O2 +POSTSTAGE1_FLAGS_TO_PASS = \ + CFLAGS="$(BOOT_CFLAGS)" \ + ADAC="\$$(CC)" \ + WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ + STRICT_WARN="\$$(STRICT2_WARN)" \ + OUTPUT_OPTION="-o \$$@" + +all-stage2-gcc: all-stage1-gcc configure-stage2-gcc + echo all-stage2-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage2-gcc gcc ; \ + mv stage1-gcc prev-gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + BUILD_CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + STAGE_PREFIX=$$r/prev-gcc/ \ + $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \ + cd .. ; \ + mv prev-gcc stage1-gcc ; \ + mv gcc stage2-gcc ; \ + $(STAMP) all-stage2-gcc + +configure-stage3-gcc: all-stage2-gcc + echo configure-stage3-gcc > stage_last ; \ + if [ -f stage3-gcc/Makefile ] ; then \ + $(STAMP) configure-stage3-gcc ; \ + exit 0; \ + else \ + true ; \ + fi ; \ + [ -d stage3-gcc ] || mkdir stage3-gcc; \ + mv stage3-gcc gcc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring stage 3 in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} ; \ + cd .. ; \ + mv gcc stage3-gcc ; \ + $(STAMP) configure-stage3-gcc + +# Some files might not exist. This is disabled 'cause it don't work. +# cp prev-gcc/objc/objc-parse.c gcc/objc/objc-parse.c || true ; \ +# cp prev-gcc/java/parse.c gcc/java/parse.c || true ; \ +# cp prev-gcc/java/parse-scan.c gcc/java/parse-scan.c || true ; \ + +all-stage3-gcc: all-stage2-gcc configure-stage3-gcc + echo all-stage3-gcc > stage_last ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + mv stage2-gcc prev-gcc ; \ + mv stage3-gcc gcc ; \ + cd gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) \ + CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + BUILD_CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \ + STAGE_PREFIX=$$r/prev-gcc/ \ + $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \ + cd .. ; \ + mv prev-gcc stage2-gcc ; \ + mv gcc stage3-gcc ; \ + $(STAMP) all-stage3-gcc + +# We only want to compare .o files, so set this! +objext = .o + +compare: all-stage3-gcc + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + rm -f .bad_compare ; \ + cd stage3-gcc; \ + files=`find . -name "*$(objext)" -print` ; \ + cd .. ; \ + for file in $${files} ; do \ + cmp --ignore-initial=16 $$r/stage2-gcc/$$file $$r/stage3-gcc/$$file \ + > /dev/null 2>&1; \ + test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \ + done ; \ + if [ -f .bad_compare ]; then \ + echo "Bootstrap comparison failure!"; \ + cat .bad_compare; \ + exit 1; \ + else \ + true; \ + fi ; \ + $(STAMP) compare + +.PHONY: new-bootstrap +# This target exists so that everything can be made in one pass. +# 'all-gcc' has to avoid stomping on the bootstrap-generated gcc for +# this to work. +new-bootstrap: compare + mv stage3-gcc gcc ; \ + $(MAKE) all ; \ + mv gcc stage3-gcc + # -------------------------------------- # Dependencies between different modules # -------------------------------------- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 22ab879..65a2626 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,235 @@ +2004-03-20 H.J. Lu <hongjiu.lu@intel.com> + + * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if + unresolved symbols in objects aren't allowed. + + * elf-hppa.h (elf_hppa_relocate_section): Properly handle + unresolved symbols. + (elf_hppa_remark_useless_dynamic_symbols): Likewise. + (elf_hppa_unmark_useless_dynamic_symbols): + * elf32-frv.c (elf32_frv_relocate_section): Likewise. + * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. + (elf32_hppa_relocate_section): Likewise. + * elf32-i370.c (i370_elf_relocate_section): Likewise. + * elf32-m32r.c (m32r_elf_relocate_section): Likewise. + * elf32-sh.c (sh_elf_relocate_section): Likewise. + * elf64-sh64.c (sh_elf64_relocate_section): Likewise. + * elfxx-mips.c (mips_elf_calculate_relocation): Likewise. + + * elf-m10200.c (mn10200_elf_relocate_section): Use + RELOC_FOR_GLOBAL_SYMBOL. + * elf32-avr.c (elf32_avr_relocate_section): Likewise. + * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. + * elf32-fr30.c (fr30_elf_relocate_section): Likewise. + * elf32-h8300.c (elf32_h8_relocate_section): Likewise. + * elf32-i860.c (elf32_i860_relocate_section): Likewise. + * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise. + * elf32-mcore.c (mcore_elf_relocate_section): Likewise. + * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. + * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. + * elf32-v850.c (v850_elf_relocate_section): Likewise. + * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. + * elf64-mmix.c (mmix_elf_relocate_section): Likewise. + +2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32. + (final_link_relocate): Likewise. + * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for + R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations. + +2004-03-19 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * po/bfd.pot: Regenerate. + +2004-03-19 Alan Modra <amodra@bigpond.net.au> + H.J. Lu <hongjiu.lu@intel.com> + + * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move + type and size change code to where it was previously. Remove + dt_needed param. Treat old weak syms as strong if new sym is + from a shared lib, even when old sym is from another shared + lib. Remove unnecessary tests of oldweak and newweak. Correct + comments. + (_bfd_elf_add_default_symbol): Remove dt_needed param. Update + _bfd_elf_merge_symbol calls. + * elflink.h (elf_link_add_object_symbols): Update calls. Remove + dt_needed local var. Update comments. + * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype. + (_bfd_elf_add_default_symbol): Likewise. + + * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle + strong syms in one shared object overriding weak syms in another. + +2004-03-18 Alan Modra <amodra@bigpond.net.au> + + * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add + dyn_lib_class field. Rearrange for better packing. + (elf_dt_soname): Delete. + (elf_dyn_lib_class): Define. + * elf.c (bfd_elf_set_dt_needed_name): Update comment. + (bfd_elf_set_dt_needed_soname): Delete. + (bfd_elf_set_dyn_lib_class): New function. + * elflink.h (add_dt_needed_tag): New function. Split out from.. + (elf_link_add_object_symbols): ..here. Rename "name" to "soname". + Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback + initialization of soname. + (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of + elf_dt_soname. + * bfd-in.h (enum dynamic_lib_link_class): New. + (bfd_elf_set_dt_needed_soname): Delete. + (bfd_elf_set_dyn_lib_class): Declare. + * bfd-in2.h: Regenerate. + + * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling. + (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs. + * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in + symbol loop. Instead use add_needed to flag tag as written. + +2004-03-17 Nathan Sidwell <nathan@codesourcery.com> + + * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct + logic for null_input_bfd detection. + +2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + + * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*. + +2004-03-16 Mark Kettenis <kettenis@gnu.org> + + * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove + code. + +2004-03-16 Alan Modra <amodra@bigpond.net.au> + + * elflink.c (elf_link_read_relocs_from_section): Don't use + NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check.. + (_bfd_elf_link_read_relocs): ..to here. + * elf32-ppc.c (ppc_elf_relax_section): Formatting. + +2004-03-16 Alan Modra <amodra@bigpond.net.au> + + * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override + values selected in configure.host. Require both to be defined + before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to + corresponding BFD_HOST vars with quotes. + <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc; + Always require BFD_HOST_64_BIT_DEFINED. + <file_ptr type>: Find off_t size before emitting message. Combine + off_t and ftello64 conditional. + * configure: Regenerate. + +2004-03-16 Alan Modra <amodra@bigpond.net.au> + + * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer + aliasing warning. Remove trailing whitespace throughout file. + +2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of + input_section in calls to get_dyn_name. + * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for + local symbols. + (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name. + +2004-03-15 Alan Modra <amodra@bigpond.net.au> + + * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types. + (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here. + (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t. + (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t. + (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t. + * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8. + (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set + when using long. + * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t. + (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT. + (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise. + (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT. + (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise. + * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t. + (read_8_bytes, read_indirect_string, read_address): Likewise. + (read_abbrevs, parse_comp_unit): Likewise. + * targets.c (struct bfd_target): Likewise. + * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use. + * hppabsd-core.c: Likewise. Formatting. + * hpux-core.c: Likewise. + * irix-core.c: Likewise. + * netbsd-core.c: Likewise. + * osf-core.c: Likewise. + * ptrace-core.c: Likewise. + * sco5-core.c: Likewise. + * trad-core.c: Likewise. + * configure: Regenerate. + * bfd-in2.h: Regenerate. + +2004-03-15 Alan Modra <amodra@bigpond.net.au> + + * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*. + (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise. + (bfd_getb_signed_64, bfd_getl_signed_64): Likewise. + (bfd_getb_signed_32, bfd_getl_signed_32): Likewise. + (bfd_getb_signed_16, bfd_getl_signed_16): Likewise. + (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise. + (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise. + * libbfd.c: Likewise in function definitions. + (bfd_put_8): Mask with 0xff rather than casting to char. + (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise. + (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise. + (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify. + (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise. + (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise. + (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise. + * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify. + (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise. + (H_GET_64, H_GET_32, H_GET_16): Likewise. + (H_GET_S64, H_GET_S32, H_GET_S16): Likewise. + * archive.c (do_slurp_coff_armap): Update swap prototype. + * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*. + (tic54x_getl_signed_32): Likewise. + (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char. + * mach-o.c (bfd_mach_o_read_header): Update get32 prototype. + * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*. + (bfd_getp_signed_32, bfd_putp32): Likewise. + * targets.c (struct bfd_target): Use void* in place of bfd_byte* for + bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32, + bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16, + bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64, + bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16, + bfd_h_getx_signed_16, bfd_h_putx16. + * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes. + * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS. + * hpux-core.c: Likewise. + * irix-core.c: Likewise. + * netbsd-core.c: Likewise. + * osf-core.c: Likewise. + * ptrace-core.c: Likewise. + * sco5-core.c: Likewise. + * trad-core.c: Likewise. + * bfd-in2.h: Regenerate. + +2004-03-15 Matt Thomas <matt@3am-software.com> + + * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is + selected. + +2004-03-13 Mark Kettenis <kettenis@gnu.org> + + * config.bfd: Add x86_64-*-openbsd*. + * configure.in (x86_64-*-openbsd*): Set COREFILE to + netbsd-core.lo. + * configure: Regenerate. + +2004-03-12 Nick Clifton <nickc@redhat.com> + Dave Murphy <wintermute2k4@ntlworld.com> + + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks + if the input bfd does not contain any code. + 2004-03-09 Steve Ellcey <sje@cup.hp.com> * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq. @@ -176,7 +408,7 @@ * configure: Regenerate. 2004-02-17 Daniel Jacobowitz <drow@mvista.com> - Richard Sandiford <rsandifo@redhat.com> + Richard Sandiford <rsandifo@redhat.com> * elfxx-mips.c (mips_elf_calculate_relocation): Use _bfd_elf_symbol_refs_local_p to decide whether to decay @@ -226,7 +458,7 @@ fseeko and fseeko64. Determine bfd_file_ptr. * configure: Re-generate. * config.in: Re-generate. - + 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com> * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 3a2d43e..315ede0 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -1160,7 +1160,7 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.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 + $(INCDIR)/elf/dwarf2.h $(INCDIR)/hashtab.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 diff --git a/bfd/Makefile.in b/bfd/Makefile.in index b3bf65b..2aef7e4 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -116,8 +116,10 @@ WIN32LIBADD = @WIN32LIBADD@ all_backends = @all_backends@ bfd_backends = @bfd_backends@ bfd_default_target_size = @bfd_default_target_size@ +bfd_file_ptr = @bfd_file_ptr@ bfd_libs = @bfd_libs@ bfd_machines = @bfd_machines@ +bfd_ufile_ptr = @bfd_ufile_ptr@ bfd_version = @bfd_version@ bfd_version_string = @bfd_version_string@ l = @l@ @@ -941,7 +943,7 @@ libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -961,7 +963,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ @@ -1695,7 +1697,7 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.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 + $(INCDIR)/elf/dwarf2.h $(INCDIR)/hashtab.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 diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4 index 9d27670..a97b35f 100644 --- a/bfd/aclocal.m4 +++ b/bfd/aclocal.m4 @@ -13,7 +13,7 @@ dnl PARTICULAR PURPOSE. sinclude(../config/accross.m4) dnl See whether we need to use fopen-bin.h rather than fopen-same.h. -AC_DEFUN(BFD_BINARY_FOPEN, +AC_DEFUN([BFD_BINARY_FOPEN], [AC_REQUIRE([AC_CANONICAL_SYSTEM]) case "${host}" in changequote(,)dnl @@ -23,7 +23,7 @@ changequote([,])dnl esac])dnl dnl Get a default for CC_FOR_BUILD to put into Makefile. -AC_DEFUN(BFD_CC_FOR_BUILD, +AC_DEFUN([BFD_CC_FOR_BUILD], [# Put a plausible default for CC_FOR_BUILD in Makefile. if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then @@ -56,7 +56,7 @@ fi AC_SUBST(EXEEXT_FOR_BUILD)])dnl dnl See whether we need a declaration for a function. -AC_DEFUN(BFD_NEED_DECLARATION, +AC_DEFUN([BFD_NEED_DECLARATION], [AC_MSG_CHECKING([whether $1 must be declared]) AC_CACHE_VAL(bfd_cv_decl_needed_$1, [AC_TRY_COMPILE([ @@ -85,7 +85,7 @@ fi dnl Check for existence of a type $1 in sys/procfs.h -AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, +AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE], [AC_MSG_CHECKING([for $1 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, [AC_TRY_COMPILE([ @@ -105,7 +105,7 @@ AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, dnl Check for existence of member $2 in type $1 in sys/procfs.h -AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, +AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER], [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, [AC_TRY_COMPILE([ diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c index 7725b34..22d045a 100644 --- a/bfd/aix386-core.c +++ b/bfd/aix386-core.c @@ -2,7 +2,7 @@ This was based on trad-core.c, which was written by John Gilmore of Cygnus Support. Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000, - 2001, 2002 + 2001, 2002, 2004 Free Software Foundation, Inc. Written by Minh Tran-Le <TRANLE@INTELLICORP.COM>. Converted to back end form by Ian Lance Taylor <ian@cygnus.com>. @@ -222,9 +222,12 @@ swap_abort () abort (); } -#define NO_GET ((bfd_vma (*) PARAMS ((const bfd_byte *))) swap_abort) -#define NO_GETS ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort) +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target aix386_core_vec = { "aix386-core", @@ -239,10 +242,10 @@ const bfd_target aix386_core_vec = { 0, /* leading underscore */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_GETS, NO_PUT, + NO_GET64, NO_GETS64, NO_PUT64, NO_GET, NO_GETS, NO_PUT, NO_GET, NO_GETS, NO_PUT, /* data */ - NO_GET, NO_GETS, NO_PUT, + NO_GET64, NO_GETS64, NO_PUT64, NO_GET, NO_GETS, NO_PUT, NO_GET, NO_GETS, NO_PUT, /* hdrs */ diff --git a/bfd/archive.c b/bfd/archive.c index c4171e7..ba6e684 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -753,7 +753,7 @@ do_slurp_coff_armap (bfd *abfd) unsigned int parsed_size; carsym *carsyms; bfd_size_type nsymz; /* Number of symbols in armap. */ - bfd_vma (*swap) (const bfd_byte *); + bfd_vma (*swap) (const void *); char int_buf[sizeof (long)]; bfd_size_type carsym_size, ptrsize; unsigned int i; diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 30bc844..fedcb37 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -55,6 +55,8 @@ extern "C" { #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ +typedef BFD_HOST_64_BIT bfd_int64_t; +typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif #if BFD_ARCH_SIZE >= 64 @@ -95,24 +97,6 @@ typedef int bfd_boolean; #define true dont_use_true_in_bfd #endif -/* Support for different sizes of target format ints and addresses. - If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be - set to 1 above. Otherwise, if the host compiler used during - configuration supports long long, this code will use it. - Otherwise, BFD_HOST_64_BIT must be defined above. */ - -#ifndef BFD_HOST_64_BIT -# if BFD_HOST_64BIT_LONG -# define BFD_HOST_64_BIT long -# define BFD_HOST_U_64_BIT unsigned long -# else -# if BFD_HOST_LONG_LONG -# define BFD_HOST_64_BIT long long -# define BFD_HOST_U_64_BIT unsigned long long -# endif /* ! BFD_HOST_LONG_LONG */ -# endif /* ! BFD_HOST_64BIT_LONG */ -#endif /* ! defined (BFD_HOST_64_BIT) */ - #ifdef BFD64 #ifndef BFD_HOST_64_BIT @@ -160,6 +144,15 @@ typedef unsigned long bfd_size_type; #endif /* not BFD64 */ +#ifndef BFD_HOST_64_BIT +/* Fall back on a 32 bit type. The idea is to make these types always + available for function return types, but in the case that + BFD_HOST_64_BIT is undefined such a function should abort or + otherwise signal an error. */ +typedef bfd_signed_vma bfd_int64_t; +typedef bfd_vma bfd_uint64_t; +#endif + /* An offset into a file. BFD always uses the largest possible offset based on the build time availability of fseek, fseeko, or fseeko64. */ typedef @bfd_file_ptr@ file_ptr; @@ -518,29 +511,29 @@ extern bfd_boolean bfd_record_phdr /* Byte swapping routines. */ -bfd_vma bfd_getb64 (const unsigned char *); -bfd_vma bfd_getl64 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_64 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_64 (const unsigned char *); -bfd_vma bfd_getb32 (const unsigned char *); -bfd_vma bfd_getl32 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_32 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_32 (const unsigned char *); -bfd_vma bfd_getb16 (const unsigned char *); -bfd_vma bfd_getl16 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_16 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_16 (const unsigned char *); -void bfd_putb64 (bfd_vma, unsigned char *); -void bfd_putl64 (bfd_vma, unsigned char *); -void bfd_putb32 (bfd_vma, unsigned char *); -void bfd_putl32 (bfd_vma, unsigned char *); -void bfd_putb16 (bfd_vma, unsigned char *); -void bfd_putl16 (bfd_vma, unsigned char *); +bfd_uint64_t bfd_getb64 (const void *); +bfd_uint64_t bfd_getl64 (const void *); +bfd_int64_t bfd_getb_signed_64 (const void *); +bfd_int64_t bfd_getl_signed_64 (const void *); +bfd_vma bfd_getb32 (const void *); +bfd_vma bfd_getl32 (const void *); +bfd_signed_vma bfd_getb_signed_32 (const void *); +bfd_signed_vma bfd_getl_signed_32 (const void *); +bfd_vma bfd_getb16 (const void *); +bfd_vma bfd_getl16 (const void *); +bfd_signed_vma bfd_getb_signed_16 (const void *); +bfd_signed_vma bfd_getl_signed_16 (const void *); +void bfd_putb64 (bfd_uint64_t, void *); +void bfd_putl64 (bfd_uint64_t, void *); +void bfd_putb32 (bfd_vma, void *); +void bfd_putl32 (bfd_vma, void *); +void bfd_putb16 (bfd_vma, void *); +void bfd_putl16 (bfd_vma, void *); /* Byte swapping routines which take size and endiannes as arguments. */ -bfd_vma bfd_get_bits (bfd_byte *, int, bfd_boolean); -void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean); +bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); +void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); /* Externally visible ECOFF routines. */ @@ -606,6 +599,12 @@ struct bfd_link_needed_list const char *name; }; +enum dynamic_lib_link_class { + DYN_NORMAL = 0, + DYN_AS_NEEDED = 1, + DYN_DT_NEEDED = 2 +}; + extern bfd_boolean bfd_elf_record_link_assignment (bfd *, struct bfd_link_info *, const char *, bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list @@ -620,10 +619,10 @@ extern bfd_boolean bfd_elf64_size_dynamic_sections struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); extern void bfd_elf_set_dt_needed_name (bfd *, const char *); -extern void bfd_elf_set_dt_needed_soname - (bfd *, const char *); extern const char *bfd_elf_get_dt_soname (bfd *); +extern void bfd_elf_set_dyn_lib_class + (bfd *, int); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf32_discard_info diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 5963bb4..5e53956 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -62,6 +62,8 @@ extern "C" { #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ +typedef BFD_HOST_64_BIT bfd_int64_t; +typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif #if BFD_ARCH_SIZE >= 64 @@ -102,24 +104,6 @@ typedef int bfd_boolean; #define true dont_use_true_in_bfd #endif -/* Support for different sizes of target format ints and addresses. - If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be - set to 1 above. Otherwise, if the host compiler used during - configuration supports long long, this code will use it. - Otherwise, BFD_HOST_64_BIT must be defined above. */ - -#ifndef BFD_HOST_64_BIT -# if BFD_HOST_64BIT_LONG -# define BFD_HOST_64_BIT long -# define BFD_HOST_U_64_BIT unsigned long -# else -# if BFD_HOST_LONG_LONG -# define BFD_HOST_64_BIT long long -# define BFD_HOST_U_64_BIT unsigned long long -# endif /* ! BFD_HOST_LONG_LONG */ -# endif /* ! BFD_HOST_64BIT_LONG */ -#endif /* ! defined (BFD_HOST_64_BIT) */ - #ifdef BFD64 #ifndef BFD_HOST_64_BIT @@ -167,6 +151,15 @@ typedef unsigned long bfd_size_type; #endif /* not BFD64 */ +#ifndef BFD_HOST_64_BIT +/* Fall back on a 32 bit type. The idea is to make these types always + available for function return types, but in the case that + BFD_HOST_64_BIT is undefined such a function should abort or + otherwise signal an error. */ +typedef bfd_signed_vma bfd_int64_t; +typedef bfd_vma bfd_uint64_t; +#endif + /* An offset into a file. BFD always uses the largest possible offset based on the build time availability of fseek, fseeko, or fseeko64. */ typedef @bfd_file_ptr@ file_ptr; @@ -525,29 +518,29 @@ extern bfd_boolean bfd_record_phdr /* Byte swapping routines. */ -bfd_vma bfd_getb64 (const unsigned char *); -bfd_vma bfd_getl64 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_64 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_64 (const unsigned char *); -bfd_vma bfd_getb32 (const unsigned char *); -bfd_vma bfd_getl32 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_32 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_32 (const unsigned char *); -bfd_vma bfd_getb16 (const unsigned char *); -bfd_vma bfd_getl16 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_16 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_16 (const unsigned char *); -void bfd_putb64 (bfd_vma, unsigned char *); -void bfd_putl64 (bfd_vma, unsigned char *); -void bfd_putb32 (bfd_vma, unsigned char *); -void bfd_putl32 (bfd_vma, unsigned char *); -void bfd_putb16 (bfd_vma, unsigned char *); -void bfd_putl16 (bfd_vma, unsigned char *); +bfd_uint64_t bfd_getb64 (const void *); +bfd_uint64_t bfd_getl64 (const void *); +bfd_int64_t bfd_getb_signed_64 (const void *); +bfd_int64_t bfd_getl_signed_64 (const void *); +bfd_vma bfd_getb32 (const void *); +bfd_vma bfd_getl32 (const void *); +bfd_signed_vma bfd_getb_signed_32 (const void *); +bfd_signed_vma bfd_getl_signed_32 (const void *); +bfd_vma bfd_getb16 (const void *); +bfd_vma bfd_getl16 (const void *); +bfd_signed_vma bfd_getb_signed_16 (const void *); +bfd_signed_vma bfd_getl_signed_16 (const void *); +void bfd_putb64 (bfd_uint64_t, void *); +void bfd_putl64 (bfd_uint64_t, void *); +void bfd_putb32 (bfd_vma, void *); +void bfd_putl32 (bfd_vma, void *); +void bfd_putb16 (bfd_vma, void *); +void bfd_putl16 (bfd_vma, void *); /* Byte swapping routines which take size and endiannes as arguments. */ -bfd_vma bfd_get_bits (bfd_byte *, int, bfd_boolean); -void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean); +bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); +void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); /* Externally visible ECOFF routines. */ @@ -613,6 +606,12 @@ struct bfd_link_needed_list const char *name; }; +enum dynamic_lib_link_class { + DYN_NORMAL = 0, + DYN_AS_NEEDED = 1, + DYN_DT_NEEDED = 2 +}; + extern bfd_boolean bfd_elf_record_link_assignment (bfd *, struct bfd_link_info *, const char *, bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list @@ -627,10 +626,10 @@ extern bfd_boolean bfd_elf64_size_dynamic_sections struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); extern void bfd_elf_set_dt_needed_name (bfd *, const char *); -extern void bfd_elf_set_dt_needed_soname - (bfd *, const char *); extern const char *bfd_elf_get_dt_soname (bfd *); +extern void bfd_elf_set_dyn_lib_class + (bfd *, int); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf32_discard_info @@ -873,7 +872,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Byte swapping macros for user section data. */ #define bfd_put_8(abfd, val, ptr) \ - ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) + ((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ @@ -961,52 +960,24 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section #define bfd_h_get_signed_64(abfd, ptr) \ BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) -/* Refinements on the above, which should eventually go away. Save - cluttering the source with (bfd_vma) and (bfd_byte *) casts. */ - -#define H_PUT_64(abfd, val, where) \ - bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_32(abfd, val, where) \ - bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_16(abfd, val, where) \ - bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_8 bfd_h_put_8 - -#define H_PUT_S64(abfd, val, where) \ - bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_S32(abfd, val, where) \ - bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_S16(abfd, val, where) \ - bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_S8 bfd_h_put_signed_8 - -#define H_GET_64(abfd, where) \ - bfd_h_get_64 ((abfd), (bfd_byte *) (where)) - -#define H_GET_32(abfd, where) \ - bfd_h_get_32 ((abfd), (bfd_byte *) (where)) - -#define H_GET_16(abfd, where) \ - bfd_h_get_16 ((abfd), (bfd_byte *) (where)) - -#define H_GET_8 bfd_h_get_8 - -#define H_GET_S64(abfd, where) \ - bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where)) - -#define H_GET_S32(abfd, where) \ - bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where)) - -#define H_GET_S16(abfd, where) \ - bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where)) - -#define H_GET_S8 bfd_h_get_signed_8 +/* Aliases for the above, which should eventually go away. */ + +#define H_PUT_64 bfd_h_put_64 +#define H_PUT_32 bfd_h_put_32 +#define H_PUT_16 bfd_h_put_16 +#define H_PUT_8 bfd_h_put_8 +#define H_PUT_S64 bfd_h_put_signed_64 +#define H_PUT_S32 bfd_h_put_signed_32 +#define H_PUT_S16 bfd_h_put_signed_16 +#define H_PUT_S8 bfd_h_put_signed_8 +#define H_GET_64 bfd_h_get_64 +#define H_GET_32 bfd_h_get_32 +#define H_GET_16 bfd_h_get_16 +#define H_GET_8 bfd_h_get_8 +#define H_GET_S64 bfd_h_get_signed_64 +#define H_GET_S32 bfd_h_get_signed_32 +#define H_GET_S16 bfd_h_get_signed_16 +#define H_GET_S8 bfd_h_get_signed_8 /* Extracted from bfdio.c. */ @@ -4130,26 +4101,26 @@ typedef struct bfd_target /* Entries for byte swapping for data. These are different from the other entry points, since they don't take a BFD asthe first argument. Certain other handlers could do the same. */ - bfd_vma (*bfd_getx64) (const bfd_byte *); - bfd_signed_vma (*bfd_getx_signed_64) (const bfd_byte *); - void (*bfd_putx64) (bfd_vma, bfd_byte *); - bfd_vma (*bfd_getx32) (const bfd_byte *); - bfd_signed_vma (*bfd_getx_signed_32) (const bfd_byte *); - void (*bfd_putx32) (bfd_vma, bfd_byte *); - bfd_vma (*bfd_getx16) (const bfd_byte *); - bfd_signed_vma (*bfd_getx_signed_16) (const bfd_byte *); - void (*bfd_putx16) (bfd_vma, bfd_byte *); + bfd_uint64_t (*bfd_getx64) (const void *); + bfd_int64_t (*bfd_getx_signed_64) (const void *); + void (*bfd_putx64) (bfd_uint64_t, void *); + bfd_vma (*bfd_getx32) (const void *); + bfd_signed_vma (*bfd_getx_signed_32) (const void *); + void (*bfd_putx32) (bfd_vma, void *); + bfd_vma (*bfd_getx16) (const void *); + bfd_signed_vma (*bfd_getx_signed_16) (const void *); + void (*bfd_putx16) (bfd_vma, void *); /* Byte swapping for the headers. */ - bfd_vma (*bfd_h_getx64) (const bfd_byte *); - bfd_signed_vma (*bfd_h_getx_signed_64) (const bfd_byte *); - void (*bfd_h_putx64) (bfd_vma, bfd_byte *); - bfd_vma (*bfd_h_getx32) (const bfd_byte *); - bfd_signed_vma (*bfd_h_getx_signed_32) (const bfd_byte *); - void (*bfd_h_putx32) (bfd_vma, bfd_byte *); - bfd_vma (*bfd_h_getx16) (const bfd_byte *); - bfd_signed_vma (*bfd_h_getx_signed_16) (const bfd_byte *); - void (*bfd_h_putx16) (bfd_vma, bfd_byte *); + bfd_uint64_t (*bfd_h_getx64) (const void *); + bfd_int64_t (*bfd_h_getx_signed_64) (const void *); + void (*bfd_h_putx64) (bfd_uint64_t, void *); + bfd_vma (*bfd_h_getx32) (const void *); + bfd_signed_vma (*bfd_h_getx_signed_32) (const void *); + void (*bfd_h_putx32) (bfd_vma, void *); + bfd_vma (*bfd_h_getx16) (const void *); + bfd_signed_vma (*bfd_h_getx_signed_16) (const void *); + void (*bfd_h_putx16) (bfd_vma, void *); /* Format dependent routines: these are vectors of entry points within the target vector structure, one for each format to check. */ diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c index 5d8ccc2..316768e 100644 --- a/bfd/coff-tic54x.c +++ b/bfd/coff-tic54x.c @@ -38,12 +38,6 @@ static bfd_boolean tic54x_set_section_contents PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type)); static reloc_howto_type *coff_tic54x_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *)); -static bfd_vma tic54x_getl32 - PARAMS ((const bfd_byte *)); -static void tic54x_putl32 - PARAMS ((bfd_vma, bfd_byte *)); -static bfd_signed_vma tic54x_getl_signed_32 - PARAMS ((const bfd_byte *)); static bfd_boolean tic54x_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, unsigned long)); static reloc_howto_type * tic54x_coff_reloc_type_lookup @@ -61,33 +55,32 @@ static bfd_boolean ticoff_bfd_is_local_label_name Don't bother with 64-bits, as there aren't any. */ static bfd_vma -tic54x_getl32 (addr) - const bfd_byte *addr; +tic54x_getl32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[2]; v |= (unsigned long) addr[3] << 8; v |= (unsigned long) addr[0] << 16; v |= (unsigned long) addr[1] << 24; - return (bfd_vma) v; + return v; } static void -tic54x_putl32 (data, addr) - bfd_vma data; - bfd_byte *addr; +tic54x_putl32 (bfd_vma data, void *p) { - addr[2] = (bfd_byte)data; - addr[3] = (bfd_byte) (data >> 8); - addr[0] = (bfd_byte) (data >> 16); - addr[1] = (bfd_byte) (data >> 24); + bfd_byte *addr = p; + addr[2] = data & 0xff; + addr[3] = (data >> 8) & 0xff; + addr[0] = (data >> 16) & 0xff; + addr[1] = (data >> 24) & 0xff; } -bfd_signed_vma -tic54x_getl_signed_32 (addr) - register const bfd_byte *addr; +static bfd_signed_vma +tic54x_getl_signed_32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[2]; diff --git a/bfd/config.bfd b/bfd/config.bfd index da8d946..2f9c197 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -459,6 +459,7 @@ case "${targ}" in i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386netbsd_vec + targ64_selvecs=bfd_elf64_x86_64_vec ;; i[3-7]86-*-netbsdpe*) targ_defvec=i386pe_vec @@ -493,7 +494,7 @@ case "${targ}" in targ_defvec=bfd_elf64_x86_64_vec targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec" ;; - x86_64-*-netbsd*) + x86_64-*-netbsd* | x86_64-*-openbsd*) targ_defvec=bfd_elf64_x86_64_vec targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" ;; @@ -1089,7 +1090,12 @@ case "${targ}" in #endif targ_underscore=yes ;; - sh-*-elf* | sh[1234]*-elf* | sh-*-rtemself* | sh-*-kaos*) + sh-*-rtemscoff*) + targ_defvec=shcoff_vec + targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" + targ_underscore=yes + ;; + sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*) targ_defvec=bfd_elf32_sh_vec targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" #ifdef BFD64 @@ -1115,7 +1121,7 @@ case "${targ}" in # compiled correctly. targ_selvecs="$targ_selvecs shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" ;; - sh-*-* | sh-*-rtems*) + sh-*-*) targ_defvec=shcoff_vec targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" targ_underscore=yes diff --git a/bfd/config.in b/bfd/config.in index ef9eca4..3224539 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -172,9 +172,15 @@ /* Define if you have the <sys/procfs.h> header file. */ #undef HAVE_SYS_PROCFS_H +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + /* Define if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + /* Define if you have the <time.h> header file. */ #undef HAVE_TIME_H diff --git a/bfd/configure b/bfd/configure index 90df655..ab9049b 100755 --- a/bfd/configure +++ b/bfd/configure @@ -59,7 +59,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -174,7 +173,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -345,11 +343,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -515,16 +508,12 @@ 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 +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 -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -563,12 +552,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:567: checking for Cygwin environment" >&5 +echo "configure:556: 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 572 "configure" +#line 561 "configure" #include "confdefs.h" int main() { @@ -579,7 +568,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -596,19 +585,19 @@ 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:600: checking for mingw32 environment" >&5 +echo "configure:589: 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 605 "configure" +#line 594 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -673,7 +662,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:677: checking host system type" >&5 +echo "configure:666: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -694,7 +683,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:698: checking target system type" >&5 +echo "configure:687: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -712,7 +701,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:716: checking build system type" >&5 +echo "configure:705: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -736,7 +725,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:740: checking for strerror in -lcposix" >&5 +echo "configure:729: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -744,7 +733,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 748 "configure" +#line 737 "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 @@ -755,7 +744,7 @@ int main() { strerror() ; return 0; } EOF -if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:748: \"$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 @@ -791,7 +780,7 @@ am__api_version="1.4" # 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:795: checking for a BSD compatible install" >&5 +echo "configure:784: 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 @@ -844,7 +833,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:848: checking whether build environment is sane" >&5 +echo "configure:837: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -901,7 +890,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:905: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:894: 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 @@ -947,7 +936,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 -echo "configure:951: checking for working aclocal-${am__api_version}" >&5 +echo "configure:940: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -960,7 +949,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:964: checking for working autoconf" >&5 +echo "configure:953: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -973,7 +962,7 @@ else fi echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 -echo "configure:977: checking for working automake-${am__api_version}" >&5 +echo "configure:966: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -986,7 +975,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:990: checking for working autoheader" >&5 +echo "configure:979: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -999,7 +988,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1003: checking for working makeinfo" >&5 +echo "configure:992: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1034,7 +1023,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1038: checking for $ac_word" >&5 +echo "configure:1027: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1066,7 +1055,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1070: checking for $ac_word" >&5 +echo "configure:1059: 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 @@ -1098,7 +1087,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1102: checking for $ac_word" >&5 +echo "configure:1091: 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 @@ -1204,7 +1193,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1208: checking for $ac_word" >&5 +echo "configure:1197: 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 @@ -1234,7 +1223,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1238: checking for $ac_word" >&5 +echo "configure:1227: 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 @@ -1285,7 +1274,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1289: checking for $ac_word" >&5 +echo "configure:1278: 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 @@ -1317,7 +1306,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1321: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1310: 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. @@ -1328,12 +1317,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1332 "configure" +#line 1321 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1326: \"$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 @@ -1359,12 +1348,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1363: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1352: 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:1368: checking whether we are using GNU C" >&5 +echo "configure:1357: 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 @@ -1373,7 +1362,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1377: \"$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:1366: \"$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 @@ -1392,7 +1381,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1396: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1385: 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 @@ -1435,7 +1424,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1439: checking for ld used by GCC" >&5 +echo "configure:1428: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1465,10 +1454,10 @@ echo "configure:1439: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1469: checking for GNU ld" >&5 +echo "configure:1458: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1472: checking for non-GNU ld" >&5 +echo "configure:1461: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1503,7 +1492,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1507: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1496: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1520,7 +1509,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1524: checking for $LD option to reload object files" >&5 +echo "configure:1513: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1532,7 +1521,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1536: checking for BSD-compatible nm" >&5 +echo "configure:1525: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1570,7 +1559,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1574: checking whether ln -s works" >&5 +echo "configure:1563: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1591,7 +1580,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1595: checking how to recognise dependant libraries" >&5 +echo "configure:1584: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1764,13 +1753,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1768: checking for object suffix" >&5 +echo "configure:1757: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1790,7 +1779,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1794: checking for executable suffix" >&5 +echo "configure:1783: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1800,10 +1789,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1827,7 +1816,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1831: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1820: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1889,7 +1878,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1893: checking for file" >&5 +echo "configure:1882: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1960,7 +1949,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1964: checking for $ac_word" >&5 +echo "configure:1953: 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 @@ -1992,7 +1981,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1996: checking for $ac_word" >&5 +echo "configure:1985: 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 @@ -2027,7 +2016,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2031: checking for $ac_word" >&5 +echo "configure:2020: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2059,7 +2048,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2063: checking for $ac_word" >&5 +echo "configure:2052: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2126,8 +2115,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2130 "configure"' > conftest.$ac_ext - if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2119 "configure"' > conftest.$ac_ext + if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -2160,7 +2149,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2178,7 +2167,7 @@ ia64-*-hpux*) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2182: checking whether the C compiler needs -belf" >&5 +echo "configure:2171: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2191,14 +2180,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2195 "configure" +#line 2184 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2388,7 +2377,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2392: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2381: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2411,7 +2400,7 @@ fi echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6 -echo "configure:2415: checking whether to install libbfd" >&5 +echo "configure:2404: checking whether to install libbfd" >&5 # Check whether --enable-install-libbfd or --disable-install-libbfd was given. if test "${enable_install_libbfd+set}" = set; then enableval="$enable_install_libbfd" @@ -2448,7 +2437,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2452: checking for executable suffix" >&5 +echo "configure:2441: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2458,10 +2447,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2488,7 +2477,7 @@ bfd_default_target_size=32 # 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:2492: checking for $ac_word" >&5 +echo "configure:2481: 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 @@ -2518,7 +2507,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2522: checking for $ac_word" >&5 +echo "configure:2511: 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 @@ -2569,7 +2558,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2573: checking for $ac_word" >&5 +echo "configure:2562: 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 @@ -2601,7 +2590,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2605: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2594: 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. @@ -2612,12 +2601,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2616 "configure" +#line 2605 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2610: \"$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 @@ -2643,12 +2632,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2636: 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:2652: checking whether we are using GNU C" >&5 +echo "configure:2641: 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 @@ -2657,7 +2646,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2661: \"$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:2650: \"$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 @@ -2676,7 +2665,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2680: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2669: 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 @@ -2710,7 +2699,7 @@ fi ALL_LINGUAS="fr tr ja es sv da zh_CN ro" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2714: checking how to run the C preprocessor" >&5 +echo "configure:2703: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2725,13 +2714,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2729 "configure" +#line 2718 "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:2735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2724: \"$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 : @@ -2742,13 +2731,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2746 "configure" +#line 2735 "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:2752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2741: \"$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 : @@ -2759,13 +2748,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2763 "configure" +#line 2752 "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:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2758: \"$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 : @@ -2792,7 +2781,7 @@ echo "$ac_t""$CPP" 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:2796: checking for $ac_word" >&5 +echo "configure:2785: 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 @@ -2820,12 +2809,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2824: checking for ANSI C header files" >&5 +echo "configure:2813: 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 2829 "configure" +#line 2818 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2833,7 +2822,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2826: \"$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* @@ -2850,7 +2839,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2854 "configure" +#line 2843 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2868,7 +2857,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2872 "configure" +#line 2861 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2889,7 +2878,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2893 "configure" +#line 2882 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2900,7 +2889,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2924,12 +2913,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2928: checking for working const" >&5 +echo "configure:2917: 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 2933 "configure" +#line 2922 "configure" #include "confdefs.h" int main() { @@ -2978,7 +2967,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2999,21 +2988,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3003: checking for inline" >&5 +echo "configure:2992: 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 3010 "configure" +#line 2999 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3039,12 +3028,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3043: checking for off_t" >&5 +echo "configure:3032: 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 3048 "configure" +#line 3037 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3072,12 +3061,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3076: checking for size_t" >&5 +echo "configure:3065: 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 3081 "configure" +#line 3070 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3107,19 +3096,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3111: checking for working alloca.h" >&5 +echo "configure:3100: 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 3116 "configure" +#line 3105 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3112: \"$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 @@ -3140,12 +3129,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3144: checking for alloca" >&5 +echo "configure:3133: 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 3149 "configure" +#line 3138 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3173,7 +3162,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3166: \"$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 @@ -3205,12 +3194,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3209: checking whether alloca needs Cray hooks" >&5 +echo "configure:3198: 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 3214 "configure" +#line 3203 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3235,12 +3224,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3239: checking for $ac_func" >&5 +echo "configure:3228: 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 3244 "configure" +#line 3233 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3263,7 +3252,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3256: \"$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 @@ -3290,7 +3279,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3294: checking stack direction for C alloca" >&5 +echo "configure:3283: 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 @@ -3298,7 +3287,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3302 "configure" +#line 3291 "configure" #include "confdefs.h" find_stack_direction () { @@ -3317,7 +3306,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3310: \"$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 @@ -3338,21 +3327,21 @@ EOF fi -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3346: checking for $ac_hdr" >&5 +echo "configure:3335: 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 3351 "configure" +#line 3340 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3345: \"$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* @@ -3381,12 +3370,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3385: checking for $ac_func" >&5 +echo "configure:3374: 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 3390 "configure" +#line 3379 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3409,7 +3398,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3402: \"$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 @@ -3434,7 +3423,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3438: checking for working mmap" >&5 +echo "configure:3427: 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 @@ -3442,7 +3431,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3446 "configure" +#line 3435 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3470,11 +3459,24 @@ else #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 @@ -3582,7 +3584,7 @@ main() } EOF -if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3588: \"$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 @@ -3610,17 +3612,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3614: checking for $ac_hdr" >&5 +echo "configure:3616: 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 3619 "configure" +#line 3621 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3626: \"$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* @@ -3650,12 +3652,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3654: checking for $ac_func" >&5 +echo "configure:3656: 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 3659 "configure" +#line 3661 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3678,7 +3680,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3684: \"$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 @@ -3707,12 +3709,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3711: checking for $ac_func" >&5 +echo "configure:3713: 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 3716 "configure" +#line 3718 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3735,7 +3737,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3741: \"$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 @@ -3769,19 +3771,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3773: checking for LC_MESSAGES" >&5 +echo "configure:3775: 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 3778 "configure" +#line 3780 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3787: \"$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 @@ -3802,7 +3804,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3806: checking whether NLS is requested" >&5 +echo "configure:3808: 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" @@ -3822,7 +3824,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3826: checking whether included gettext is requested" >&5 +echo "configure:3828: 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" @@ -3841,17 +3843,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3845: checking for libintl.h" >&5 +echo "configure:3847: 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 3850 "configure" +#line 3852 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3857: \"$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* @@ -3868,19 +3870,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3872: checking for gettext in libc" >&5 +echo "configure:3874: 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 3877 "configure" +#line 3879 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3886: \"$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 @@ -3896,7 +3898,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3900: checking for bindtextdomain in -lintl" >&5 +echo "configure:3902: 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 @@ -3904,7 +3906,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3908 "configure" +#line 3910 "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 @@ -3915,7 +3917,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3921: \"$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 @@ -3931,19 +3933,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3935: checking for gettext in libintl" >&5 +echo "configure:3937: 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 3940 "configure" +#line 3942 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3949: \"$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 @@ -3971,7 +3973,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3975: checking for $ac_word" >&5 +echo "configure:3977: 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 @@ -4005,12 +4007,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4009: checking for $ac_func" >&5 +echo "configure:4011: 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 4014 "configure" +#line 4016 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4033,7 +4035,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4039: \"$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 @@ -4060,7 +4062,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4064: checking for $ac_word" >&5 +echo "configure:4066: 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 @@ -4096,7 +4098,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4100: checking for $ac_word" >&5 +echo "configure:4102: 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 @@ -4128,7 +4130,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4132 "configure" +#line 4134 "configure" #include "confdefs.h" int main() { @@ -4136,7 +4138,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4168,7 +4170,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4172: checking for $ac_word" >&5 +echo "configure:4174: 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 @@ -4202,7 +4204,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4206: checking for $ac_word" >&5 +echo "configure:4208: 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 @@ -4238,7 +4240,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4242: checking for $ac_word" >&5 +echo "configure:4244: 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 @@ -4328,7 +4330,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4332: checking for catalogs to be installed" >&5 +echo "configure:4334: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4356,17 +4358,17 @@ echo "configure:4332: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4360: checking for linux/version.h" >&5 +echo "configure:4362: 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 4365 "configure" +#line 4367 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4372: \"$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* @@ -4444,7 +4446,7 @@ fi # 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:4448: checking for a BSD compatible install" >&5 +echo "configure:4450: 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 @@ -4504,19 +4506,19 @@ BFD_HOST_64_BIT= BFD_HOST_U_64_BIT= echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:4508: checking for long long" >&5 +echo "configure:4510: checking for long long" >&5 if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4513 "configure" +#line 4515 "configure" #include "confdefs.h" int main() { unsigned long long ll = 18446744073709551615ULL; ; return 0; } EOF -if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_has_long_long=yes else @@ -4532,13 +4534,13 @@ echo "$ac_t""$bfd_cv_has_long_long" 1>&6 if test $bfd_cv_has_long_long = yes; then BFD_HOST_LONG_LONG=1 echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4536: checking size of long long" >&5 +echo "configure:4538: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext <<EOF -#line 4542 "configure" +#line 4544 "configure" #include "confdefs.h" #include "confdefs.h" #include <sys/types.h> @@ -4548,7 +4550,7 @@ int main() { switch (0) case 0: case (sizeof (long long) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long_long=$ac_size else @@ -4573,13 +4575,13 @@ EOF fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4577: checking size of long" >&5 +echo "configure:4579: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. cat > conftest.$ac_ext <<EOF -#line 4583 "configure" +#line 4585 "configure" #include "confdefs.h" #include "confdefs.h" #include <sys/types.h> @@ -4589,7 +4591,7 @@ int main() { switch (0) case 0: case (sizeof (long) == $ac_size):; ; return 0; } EOF -if { (eval echo configure:4593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sizeof_long=$ac_size else @@ -4613,18 +4615,18 @@ EOF if test "x${ac_cv_sizeof_long}" = "x8"; then host64=true - HOST_64BIT_TYPE="long" + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - HOST_64BIT_TYPE="long long" - HOST_U_64BIT_TYPE="unsigned long long" + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" fi -if test "x${HOST_64BIT_TYPE}" = "xlong"; then - BFD_HOST_64BIT_LONG=1 -elif test "x${HOST_64BIT_TYPE}" != "x"; then +if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT=${HOST_64BIT_TYPE} - BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} + BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" + BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" fi @@ -4647,7 +4649,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4651: checking for build system executable suffix" >&5 +echo "configure:4653: 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 @@ -4675,17 +4677,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4679: checking for $ac_hdr" >&5 +echo "configure:4681: 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 4684 "configure" +#line 4686 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4691: \"$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* @@ -4715,17 +4717,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4719: checking for $ac_hdr" >&5 +echo "configure:4721: 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 4724 "configure" +#line 4726 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4731: \"$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* @@ -4752,12 +4754,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4756: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4758: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4761 "configure" +#line 4763 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -4766,7 +4768,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4791,12 +4793,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4795: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4797: 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 4800 "configure" +#line 4802 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4804,7 +4806,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4829,7 +4831,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4833: checking for opendir in -ldir" >&5 +echo "configure:4835: 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 @@ -4837,7 +4839,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4841 "configure" +#line 4843 "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 @@ -4848,7 +4850,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4854: \"$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 @@ -4870,7 +4872,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4874: checking for opendir in -lx" >&5 +echo "configure:4876: 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 @@ -4878,7 +4880,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4882 "configure" +#line 4884 "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 @@ -4889,7 +4891,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4895: \"$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 @@ -4914,12 +4916,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4918: checking for $ac_func" >&5 +echo "configure:4920: 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 4923 "configure" +#line 4925 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4942,7 +4944,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4948: \"$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 @@ -4969,12 +4971,12 @@ done for ac_func in strtoull do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4973: checking for $ac_func" >&5 +echo "configure:4975: 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 4978 "configure" +#line 4980 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4997,7 +4999,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5003: \"$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 @@ -5032,12 +5034,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:5036: checking whether strstr must be declared" >&5 +echo "configure:5038: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5041 "configure" +#line 5043 "configure" #include "confdefs.h" #include <stdio.h> @@ -5058,7 +5060,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -5079,12 +5081,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:5083: checking whether malloc must be declared" >&5 +echo "configure:5085: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5088 "configure" +#line 5090 "configure" #include "confdefs.h" #include <stdio.h> @@ -5105,7 +5107,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -5126,12 +5128,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:5130: checking whether realloc must be declared" >&5 +echo "configure:5132: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5135 "configure" +#line 5137 "configure" #include "confdefs.h" #include <stdio.h> @@ -5152,7 +5154,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -5173,12 +5175,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:5177: checking whether free must be declared" >&5 +echo "configure:5179: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5182 "configure" +#line 5184 "configure" #include "confdefs.h" #include <stdio.h> @@ -5199,7 +5201,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -5220,12 +5222,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:5224: checking whether getenv must be declared" >&5 +echo "configure:5226: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5229 "configure" +#line 5231 "configure" #include "confdefs.h" #include <stdio.h> @@ -5246,7 +5248,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5434,16 +5436,16 @@ if test "${target}" = "${host}"; then # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE # have c_impl as a member of struct core_dumpx echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6 -echo "configure:5438: checking for c_impl in struct core_dumpx" >&5 +echo "configure:5440: checking for c_impl in struct core_dumpx" >&5 cat > conftest.$ac_ext <<EOF -#line 5440 "configure" +#line 5442 "configure" #include "confdefs.h" #include <core.h> int main() { struct core_dumpx c; c.c_impl = 0; ; return 0; } EOF -if { (eval echo configure:5447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ST_C_IMPL 1 @@ -5495,7 +5497,9 @@ rm -f conftest* COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxbsd.h"' ;; - x86_64-*-netbsd*) COREFILE=netbsd-core.lo ;; + x86_64-*-netbsd* | x86_64-*-openbsd*) + COREFILE=netbsd-core.lo + ;; esac case "$COREFILE" in @@ -5518,17 +5522,17 @@ rm -f conftest* do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5522: checking for $ac_hdr" >&5 +echo "configure:5526: 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 5527 "configure" +#line 5531 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5536: \"$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* @@ -5556,12 +5560,12 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5560: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5564: checking for prstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5565 "configure" +#line 5569 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5570,7 +5574,7 @@ int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5592,12 +5596,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5596: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5600: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5601 "configure" +#line 5605 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5606,7 +5610,7 @@ int main() { prstatus32_t avar ; return 0; } EOF -if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5628,12 +5632,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5632: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5636: checking for prstatus_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5637 "configure" +#line 5641 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5642,7 +5646,7 @@ int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5664,12 +5668,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5668: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5672: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5673 "configure" +#line 5677 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5678,7 +5682,7 @@ int main() { prstatus32_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5700,12 +5704,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5704: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5708: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5709 "configure" +#line 5713 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5714,7 +5718,7 @@ int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5736,12 +5740,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5740: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5744: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5745 "configure" +#line 5749 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5750,7 +5754,7 @@ int main() { pxstatus_t avar ; return 0; } EOF -if { (eval echo configure:5754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5772,12 +5776,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5776: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5780: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5781 "configure" +#line 5785 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5786,7 +5790,7 @@ int main() { pstatus32_t avar ; return 0; } EOF -if { (eval echo configure:5790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5808,12 +5812,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5812: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5816: checking for prpsinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5817 "configure" +#line 5821 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5822,7 +5826,7 @@ int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5844,12 +5848,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5848: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5852: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5853 "configure" +#line 5857 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5858,7 +5862,7 @@ int main() { prpsinfo32_t avar ; return 0; } EOF -if { (eval echo configure:5862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5880,12 +5884,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5884: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5888: checking for psinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5889 "configure" +#line 5893 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5894,7 +5898,7 @@ int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5916,12 +5920,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5920: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5924: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5925 "configure" +#line 5929 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5930,7 +5934,7 @@ int main() { psinfo32_t avar ; return 0; } EOF -if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5952,12 +5956,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5956: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5960: checking for lwpstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5961 "configure" +#line 5965 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -5966,7 +5970,7 @@ int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5988,12 +5992,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5992: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5996: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5997 "configure" +#line 6001 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -6002,7 +6006,7 @@ int main() { lwpxstatus_t avar ; return 0; } EOF -if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -6024,12 +6028,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:6028: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:6032: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6033 "configure" +#line 6037 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -6038,7 +6042,7 @@ int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -6060,12 +6064,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:6064: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:6068: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6069 "configure" +#line 6073 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -6074,7 +6078,7 @@ int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -6096,12 +6100,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:6100: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:6104: checking for win32_pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6105 "configure" +#line 6109 "configure" #include "confdefs.h" #define _SYSCALL32 @@ -6110,7 +6114,7 @@ int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:6114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -6575,17 +6579,17 @@ case ${host64}-${target64}-${want64} in wordsize=64 bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)' all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' - if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then + if test $BFD_HOST_64_BIT_DEFINED = 0; then echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 fi 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:6586: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6590: 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 6589 "configure" +#line 6593 "configure" #include "confdefs.h" :__GNUC__:__GNUC_MINOR__:__i386__: EOF @@ -6627,12 +6631,12 @@ esac for ac_func in ftello ftello64 fseeko fseeko64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6631: checking for $ac_func" >&5 +echo "configure:6635: 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 6636 "configure" +#line 6640 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6655,7 +6659,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6663: \"$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 @@ -6679,10 +6683,6 @@ else fi done -echo $ac_n "checking file_ptr type""... $ac_c" 1>&6 -echo "configure:6684: checking file_ptr type" >&5 -bfd_file_ptr="long" -bfd_ufile_ptr="unsigned long" if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then echo $ac_n "checking size of off_t""... $ac_c" 1>&6 echo "configure:6689: checking size of off_t" >&5 @@ -6723,12 +6723,13 @@ cat >> confdefs.h <<EOF EOF - if test "x${ac_cv_sizeof_off_t}" = "x8"; then - bfd_file_ptr=BFD_HOST_64_BIT - bfd_ufile_ptr=BFD_HOST_U_64_BIT - fi fi -if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then +echo $ac_n "checking file_ptr type""... $ac_c" 1>&6 +echo "configure:6729: checking file_ptr type" >&5 +bfd_file_ptr="long" +bfd_ufile_ptr="unsigned long" +if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ + -o x"${ac_cv_sizeof_off_t}" = x8; then bfd_file_ptr=BFD_HOST_64_BIT bfd_ufile_ptr=BFD_HOST_U_64_BIT fi @@ -6745,21 +6746,21 @@ test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selar test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6753: checking for $ac_hdr" >&5 +echo "configure:6754: 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 6758 "configure" +#line 6759 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6764: \"$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* @@ -6788,12 +6789,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6792: checking for $ac_func" >&5 +echo "configure:6793: 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 6797 "configure" +#line 6798 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6816,7 +6817,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6821: \"$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 @@ -6841,7 +6842,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6845: checking for working mmap" >&5 +echo "configure:6846: 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 @@ -6849,7 +6850,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 6853 "configure" +#line 6854 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -6877,11 +6878,24 @@ else #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 @@ -6989,7 +7003,7 @@ main() } EOF -if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7007: \"$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 @@ -7014,12 +7028,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7018: checking for $ac_func" >&5 +echo "configure:7032: 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 7023 "configure" +#line 7037 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7042,7 +7056,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7060: \"$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 diff --git a/bfd/configure.in b/bfd/configure.in index f196265..e08a663 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -132,18 +132,18 @@ fi AC_COMPILE_CHECK_SIZEOF(long) if test "x${ac_cv_sizeof_long}" = "x8"; then host64=true - HOST_64BIT_TYPE="long" + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - HOST_64BIT_TYPE="long long" - HOST_U_64BIT_TYPE="unsigned long long" + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" fi -if test "x${HOST_64BIT_TYPE}" = "xlong"; then - BFD_HOST_64BIT_LONG=1 -elif test "x${HOST_64BIT_TYPE}" != "x"; then +if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT=${HOST_64BIT_TYPE} - BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} + BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" + BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" fi AC_SUBST(BFD_HOST_64BIT_LONG) @@ -405,7 +405,9 @@ changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/vaxbsd.h"' ;; - x86_64-*-netbsd*) COREFILE=netbsd-core.lo ;; + x86_64-*-netbsd* | x86_64-*-openbsd*) + COREFILE=netbsd-core.lo + ;; esac case "$COREFILE" in @@ -886,7 +888,7 @@ case ${host64}-${target64}-${want64} in wordsize=64 bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)' all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' - if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then + if test $BFD_HOST_64_BIT_DEFINED = 0; then AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) AC_MSG_WARN([your compiler may not have a 64 bit integral type]) fi @@ -923,17 +925,14 @@ AC_SUBST(bfd_default_target_size) # Hopefully a reasonable assumption since fseeko et.al. should be # upward compatible. AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64) -AC_MSG_CHECKING([file_ptr type]) -bfd_file_ptr="long" -bfd_ufile_ptr="unsigned long" if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then AC_COMPILE_CHECK_SIZEOF(off_t) - if test "x${ac_cv_sizeof_off_t}" = "x8"; then - bfd_file_ptr=BFD_HOST_64_BIT - bfd_ufile_ptr=BFD_HOST_U_64_BIT - fi fi -if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then +AC_MSG_CHECKING([file_ptr type]) +bfd_file_ptr="long" +bfd_ufile_ptr="unsigned long" +if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ + -o x"${ac_cv_sizeof_off_t}" = x8; then bfd_file_ptr=BFD_HOST_64_BIT bfd_ufile_ptr=BFD_HOST_U_64_BIT fi diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog index 3316383..c2ab8aa 100644 --- a/bfd/doc/ChangeLog +++ b/bfd/doc/ChangeLog @@ -1,3 +1,6 @@ +2004-03-19 Alan Modra <amodra@bigpond.net.au> + + * Makefile.in: Regenerate. For older changes see ChangeLog-9103 diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in index 1c1fce9..85d6427 100644 --- a/bfd/doc/Makefile.in +++ b/bfd/doc/Makefile.in @@ -117,8 +117,10 @@ WIN32LIBADD = @WIN32LIBADD@ all_backends = @all_backends@ bfd_backends = @bfd_backends@ bfd_default_target_size = @bfd_default_target_size@ +bfd_file_ptr = @bfd_file_ptr@ bfd_libs = @bfd_libs@ bfd_machines = @bfd_machines@ +bfd_ufile_ptr = @bfd_ufile_ptr@ bfd_version = @bfd_version@ bfd_version_string = @bfd_version_string@ bfdincludedir = @bfdincludedir@ @@ -255,7 +257,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index c109fa7..ceb28af 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -61,8 +61,8 @@ struct attribute { char *str; struct dwarf_block *blk; - bfd_vma val; - bfd_signed_vma sval; + bfd_uint64_t val; + bfd_int64_t sval; } u; }; @@ -230,7 +230,7 @@ read_4_bytes (bfd *abfd, char *buf) return bfd_get_32 (abfd, buf); } -static bfd_vma +static bfd_uint64_t read_8_bytes (bfd *abfd, char *buf) { return bfd_get_64 (abfd, buf); @@ -268,7 +268,7 @@ read_indirect_string (struct comp_unit* unit, char *buf, unsigned int *bytes_read_ptr) { - bfd_vma offset; + bfd_uint64_t offset; struct dwarf2_debug *stash = unit->stash; if (unit->offset_size == 4) @@ -378,7 +378,7 @@ read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED, /* END VERBATIM */ -static bfd_vma +static bfd_uint64_t read_address (struct comp_unit *unit, char *buf) { switch (unit->addr_size) @@ -422,7 +422,7 @@ lookup_abbrev (unsigned int number, struct abbrev_info **abbrevs) in a hash table. */ static struct abbrev_info** -read_abbrevs (bfd *abfd, bfd_vma offset, struct dwarf2_debug *stash) +read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash) { struct abbrev_info **abbrevs; char *abbrev_ptr; @@ -1436,7 +1436,7 @@ parse_comp_unit (bfd *abfd, { struct comp_unit* unit; unsigned int version; - bfd_vma abbrev_offset = 0; + bfd_uint64_t abbrev_offset = 0; unsigned int addr_size; struct abbrev_info** abbrevs; unsigned int abbrev_number, bytes_read, i; diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 5f4bcd8..a5e52ab 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1,6 +1,6 @@ /* BFD back-end data structures for ELF files. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003 Free Software Foundation, Inc. + 2002, 2003, 2004 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -1132,9 +1132,6 @@ struct elf_obj_tdata bfd_vma gp; /* The gp value */ unsigned int gp_size; /* The gp size */ - Elf_Internal_Shdr **group_sect_ptr; - int num_group; - /* Information grabbed from an elf core file. */ int core_signal; int core_pid; @@ -1142,10 +1139,6 @@ struct elf_obj_tdata char* core_program; char* core_command; - /* This is set to TRUE if the object was created by the backend - linker. */ - bfd_boolean linker; - /* A mapping from external symbols to entries in the linker hash table, used when linking. This is indexed by the symbol index minus the sh_info field of the symbol table header. */ @@ -1171,21 +1164,6 @@ struct elf_obj_tdata one. */ const char *dt_name; - /* When a reference in a regular object is resolved by a shared - object is loaded into via the DT_NEEDED entries by the linker - ELF emulation code, we need to add the shared object to the - DT_NEEDED list of the resulting binary to indicate the dependency - as if the -l option is passed to the linker. This field holds the - name of the loaded shared object. */ - const char *dt_soname; - - /* Irix 5 often screws up the symbol table, sorting local symbols - after global symbols. This flag is set if the symbol table in - this BFD appears to be screwed up. If it is, we ignore the - sh_info field in the symbol table header, and always read all the - symbols. */ - bfd_boolean bad_symtab; - /* Records the result of `get_program_header_size'. */ bfd_size_type program_header_size; @@ -1213,8 +1191,8 @@ struct elf_obj_tdata created. */ asection *eh_frame_hdr; - /* Used to determine if the e_flags field has been initialized */ - bfd_boolean flags_init; + Elf_Internal_Shdr **group_sect_ptr; + int num_group; /* Number of symbol version definitions we are about to emit. */ unsigned int cverdefs; @@ -1237,6 +1215,25 @@ struct elf_obj_tdata asymbol *elf_text_symbol; asection *elf_data_section; asection *elf_text_section; + + /* Whether a dyanmic object was specified normally on the linker + command line, or was specified when --as-needed was in effect, + or was found via a DT_NEEDED entry. */ + enum dynamic_lib_link_class dyn_lib_class; + + /* This is set to TRUE if the object was created by the backend + linker. */ + bfd_boolean linker; + + /* Irix 5 often screws up the symbol table, sorting local symbols + after global symbols. This flag is set if the symbol table in + this BFD appears to be screwed up. If it is, we ignore the + sh_info field in the symbol table header, and always read all the + symbols. */ + bfd_boolean bad_symtab; + + /* Used to determine if the e_flags field has been initialized */ + bfd_boolean flags_init; }; #define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data) @@ -1263,7 +1260,7 @@ struct elf_obj_tdata #define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets) #define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents) #define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name) -#define elf_dt_soname(bfd) (elf_tdata(bfd) -> dt_soname) +#define elf_dyn_lib_class(bfd) (elf_tdata(bfd) -> dyn_lib_class) #define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab) #define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init) @@ -1479,12 +1476,12 @@ extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr extern bfd_boolean _bfd_elf_merge_symbol (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection **, bfd_vma *, struct elf_link_hash_entry **, bfd_boolean *, - bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean); + bfd_boolean *, bfd_boolean *, bfd_boolean *); extern bfd_boolean _bfd_elf_add_default_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, const char *, Elf_Internal_Sym *, asection **, bfd_vma *, - bfd_boolean *, bfd_boolean, bfd_boolean); + bfd_boolean *, bfd_boolean); extern bfd_boolean _bfd_elf_export_symbol (struct elf_link_hash_entry *, void *); @@ -1757,8 +1754,7 @@ extern bfd_boolean _sh_elf_set_mach_from_flags } \ else if (h->root.type == bfd_link_hash_undefweak) \ ; \ - else if (!info->executable \ - && info->unresolved_syms_in_objects == RM_IGNORE \ + else if (info->unresolved_syms_in_objects == RM_IGNORE \ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \ ; \ else \ @@ -1766,8 +1762,7 @@ extern bfd_boolean _sh_elf_set_mach_from_flags if (! info->callbacks->undefined_symbol \ (info, h->root.root.string, input_bfd, \ input_section, rel->r_offset, \ - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) \ - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) \ + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \ || ELF_ST_VISIBILITY (h->other)) \ )) \ return FALSE; \ diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index 29579a4..f5aba51 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -812,6 +812,28 @@ elf_hppa_reloc_final_type (bfd *abfd, } break; + case 32: + switch (field) + { + case e_fsel: + final_type = R_PARISC_PCREL32; + break; + default: + return R_PARISC_NONE; + } + break; + + case 64: + switch (field) + { + case e_fsel: + final_type = R_PARISC_PCREL64; + break; + default: + return R_PARISC_NONE; + } + break; + default: return R_PARISC_NONE; } @@ -1096,8 +1118,7 @@ elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, Ultimately we should have better controls over the generic ELF BFD linker code. */ if (! info->relocatable - && ! (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE) + && info->unresolved_syms_in_shared_libs != RM_IGNORE && h->root.type == bfd_link_hash_undefined && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) @@ -1131,8 +1152,7 @@ elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, Ultimately we should have better controls over the generic ELF BFD linker code. */ if (! info->relocatable - && ! (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE) + && info->unresolved_syms_in_shared_libs != RM_IGNORE && h->root.type == bfd_link_hash_undefined && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0 @@ -1350,7 +1370,7 @@ elf_hppa_relocate_section (bfd *output_bfd, /* If this symbol has an entry in the PA64 dynamic hash table, then get it. */ - dyn_name = get_dyn_name (input_section, h, rel, + dyn_name = get_dyn_name (input_bfd, h, rel, &dynh_buf, &dynh_buflen); dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, dyn_name, FALSE, FALSE); @@ -1373,7 +1393,7 @@ elf_hppa_relocate_section (bfd *output_bfd, /* If this symbol has an entry in the PA64 dynamic hash table, then get it. */ - dyn_name = get_dyn_name (input_section, h, rel, + dyn_name = get_dyn_name (input_bfd, h, rel, &dynh_buf, &dynh_buflen); dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, dyn_name, FALSE, FALSE); @@ -1398,19 +1418,12 @@ elf_hppa_relocate_section (bfd *output_bfd, else relocation = 0; } - /* Allow undefined symbols in shared libraries. */ - else if (info->shared - && info->unresolved_syms_in_shared_libs == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) { - if (info->symbolic) - (*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, FALSE); - /* If this symbol has an entry in the PA64 dynamic hash table, then get it. */ - dyn_name = get_dyn_name (input_section, h, rel, + dyn_name = get_dyn_name (input_bfd, h, rel, &dynh_buf, &dynh_buflen); dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, dyn_name, FALSE, FALSE); @@ -1426,7 +1439,7 @@ elf_hppa_relocate_section (bfd *output_bfd, } else if (h->root.type == bfd_link_hash_undefweak) { - dyn_name = get_dyn_name (input_section, h, rel, + dyn_name = get_dyn_name (input_bfd, h, rel, &dynh_buf, &dynh_buflen); dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, dyn_name, FALSE, FALSE); @@ -1449,7 +1462,9 @@ elf_hppa_relocate_section (bfd *output_bfd, { if (!((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (h->other))))) return FALSE; break; } diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c index 133d2a9..92cea80 100644 --- a/bfd/elf-m10200.c +++ b/bfd/elf-m10200.c @@ -377,28 +377,11 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + bfd_boolean unresolved_reloc, warned; + + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } r = mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd, @@ -1479,8 +1479,7 @@ _bfd_elf_link_hash_table_create (bfd *abfd) /* This is a hook for the ELF emulation code in the generic linker to tell the backend linker what file name to use for the DT_NEEDED - entry for a dynamic object. The generic linker passes name as an - empty string to indicate that no DT_NEEDED entry should be made. */ + entry for a dynamic object. */ void bfd_elf_set_dt_needed_name (bfd *abfd, const char *name) @@ -1491,11 +1490,11 @@ bfd_elf_set_dt_needed_name (bfd *abfd, const char *name) } void -bfd_elf_set_dt_needed_soname (bfd *abfd, const char *name) +bfd_elf_set_dyn_lib_class (bfd *abfd, int lib_class) { if (bfd_get_flavour (abfd) == bfd_target_elf_flavour && bfd_get_format (abfd) == bfd_object) - elf_dt_soname (abfd) = name; + elf_dyn_lib_class (abfd) = lib_class; } /* Get the list of DT_NEEDED entries for a link. This is a hook for diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 7c284c1..f8c859f 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -1,5 +1,6 @@ /* 32-bit ELF support for ARM - Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2430,11 +2431,16 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) not, its flags may not have been initialised either, but it cannot actually cause any incompatibility. Do not short-circuit dynamic objects; their section list may be emptied by - elf_link_add_object_symbols. */ + elf_link_add_object_symbols. + Also check to see if there are no code sections in the input. + In this case there is no need to check for code specific flags. + XXX - do we need to worry about floating-point format compatability + in data sections ? */ if (!(ibfd->flags & DYNAMIC)) { bfd_boolean null_input_bfd = TRUE; + bfd_boolean only_data_sections = TRUE; for (sec = ibfd->sections; sec != NULL; sec = sec->next) { @@ -2442,11 +2448,17 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) if (strcmp (sec->name, ".glue_7") && strcmp (sec->name, ".glue_7t")) { + if ((bfd_get_section_flags (ibfd, sec) + & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + only_data_sections = FALSE; + null_input_bfd = FALSE; break; } } - if (null_input_bfd) + + if (null_input_bfd || only_data_sections) return TRUE; } diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 44f2b38..7649d45 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -758,34 +758,11 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - 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) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - { - relocation = 0; - } - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } r = avr_final_link_relocate (howto, input_bfd, input_section, diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index f9454ff..6d3b02d 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -517,28 +517,11 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; - else - { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + bfd_boolean unresolved_reloc, warned; + + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } if (h != NULL) diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index 472a07a..aaa90f2 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -566,47 +566,11 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - 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) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); -#if 0 - fprintf (stderr, - "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n", - sec->name, name, h->root.u.def.value, - sec->output_section->vma, sec->output_offset, relocation); -#endif - } - else if (h->root.type == bfd_link_hash_undefweak) - { -#if 0 - fprintf (stderr, "undefined: sec: %s, name: %s\n", - sec->name, name); -#endif - relocation = 0; - } - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; -#if 0 - fprintf (stderr, "unknown: name: %s\n", name); -#endif - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } r = fr30_final_link_relocate (howto, input_bfd, input_section, diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index de7a113..eedc55d 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -1958,16 +1958,16 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section, { relocation = 0; } - else if ( ! info->executable - && ! info->symbolic - && info->unresolved_syms_in_objects == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (h->other))))) return FALSE; relocation = 0; } diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 547adfa..c933f40 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -439,28 +439,11 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + bfd_boolean unresolved_reloc, warned; + + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } r = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd, diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index cf6c630..cb184f5 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1147,12 +1147,13 @@ elf32_hppa_check_relocs (bfd *abfd, } break; - case R_PARISC_SEGBASE: /* Used to set segment base. */ + case R_PARISC_SEGBASE: /* Used to set segment base. */ case R_PARISC_SEGREL32: /* Relative reloc, used for unwind. */ case R_PARISC_PCREL14F: /* PC relative load/store. */ case R_PARISC_PCREL14R: case R_PARISC_PCREL17R: /* External branches. */ case R_PARISC_PCREL21L: /* As above, and for load/store too. */ + case R_PARISC_PCREL32: /* We don't need to propagate the relocation if linking a shared object since these are section relative. */ continue; @@ -2792,8 +2793,7 @@ elf32_hppa_size_stubs } else if (hash->elf.root.type == bfd_link_hash_undefined) { - if (! (info->shared - && info->unresolved_syms_in_objects == RM_IGNORE + if (! (info->unresolved_syms_in_objects == RM_IGNORE && (ELF_ST_VISIBILITY (hash->elf.other) == STV_DEFAULT) && hash->elf.type != STT_PARISC_MILLI)) @@ -3145,6 +3145,7 @@ final_link_relocate (asection *input_section, case R_PARISC_PCREL17R: case R_PARISC_PCREL14R: case R_PARISC_PCREL14F: + case R_PARISC_PCREL32: /* Make it a pc relative offset. */ value -= location; addend -= 8; @@ -3238,6 +3239,7 @@ final_link_relocate (asection *input_section, case R_PARISC_DIR17F: case R_PARISC_PCREL17C: case R_PARISC_PCREL14F: + case R_PARISC_PCREL32: case R_PARISC_DPREL14F: case R_PARISC_PLABEL32: case R_PARISC_DLTIND14F: @@ -3440,16 +3442,13 @@ elf32_hppa_relocate_section (bfd *output_bfd, && hh->root.type != bfd_link_hash_defweak && hh->root.type != bfd_link_hash_undefweak) { - if (!info->executable - && info->unresolved_syms_in_objects == RM_IGNORE + if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (hh->other) == STV_DEFAULT && hh->type == STT_PARISC_MILLI) { if (! info->callbacks->undefined_symbol (info, hh->root.root.string, input_bfd, - input_section, rel->r_offset, - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR)))) + input_section, rel->r_offset, FALSE)) return FALSE; warned_undef = TRUE; } diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c index 80c45f6..57854c8 100644 --- a/bfd/elf32-i370.c +++ b/bfd/elf32-i370.c @@ -1246,19 +1246,21 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (info->shared + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { - (*info->callbacks->undefined_symbol) (info, - h->root.root.string, - input_bfd, - input_section, - rel->r_offset, - TRUE); - ret = FALSE; - continue; + if ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (h->other)))) + { + ret = FALSE; + continue; + } + relocation = 0; } } diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c index 8ab3c92..c545d8c 100644 --- a/bfd/elf32-i860.c +++ b/bfd/elf32-i860.c @@ -1112,34 +1112,11 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - 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) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - { - relocation = 0; - } - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } switch (r_type) diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 3edf4a9..e3c6ffb 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1,5 +1,5 @@ /* M32R-specific support for 32-bit ELF. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -93,11 +93,11 @@ static bfd_boolean m32r_elf_create_dynamic_sections static bfd_boolean m32r_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); - + static bfd_boolean m32r_elf_finish_dynamic_symbol PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); - + static bfd_boolean allocate_dynrelocs PARAMS ((struct elf_link_hash_entry *, PTR)); static bfd_boolean readonly_dynrelocs @@ -122,39 +122,39 @@ static bfd_boolean m32r_elf_fake_sections /* Use RELA. But use REL to link old objects for backwords compatibility. */ /* Functions for the M32R ELF linker. */ - + /* The name of the dynamic interpreter. This is put in the .interp section. */ - + #define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1" - + /* The nop opcode we use. */ - + #define M32R_NOP 0x7000f000 - + #define PLT_EMPTY 0x10101010 /* RIE -> RIE */ - + /* The size in bytes of an entry in the procedure linkage table. */ #define PLT_ENTRY_SIZE 20 #define PLT_HEADER_SIZE 20 - + /* The first one entries in a procedure linkage table are reserved, and the initial contents are unimportant (we zero them out). Subsequent entries look like this. */ - + #define PLT0_ENTRY_WORD0 0xd6c00000 /* seth r6, #high(.got+4) */ #define PLT0_ENTRY_WORD1 0x86e60000 /* or3 r6, r6, #low(.got)+4) */ #define PLT0_ENTRY_WORD2 0x24e626c6 /* ld r4, @r6+ -> ld r6, @r6 */ #define PLT0_ENTRY_WORD3 0x1fc6f000 /* jmp r6 || pnop */ #define PLT0_ENTRY_WORD4 PLT_EMPTY /* RIE -> RIE */ - + #define PLT0_PIC_ENTRY_WORD0 0xa4cc0004 /* ld r4, @(4,r12) */ #define PLT0_PIC_ENTRY_WORD1 0xa6cc0008 /* ld r6, @(8,r12) */ #define PLT0_PIC_ENTRY_WORD2 0x1fc6f000 /* jmp r6 || nop */ #define PLT0_PIC_ENTRY_WORD3 PLT_EMPTY /* RIE -> RIE */ #define PLT0_PIC_ENTRY_WORD4 PLT_EMPTY /* RIE -> RIE */ - + #define PLT_ENTRY_WORD0 0xe6000000 /* ld24 r6, .name_in_GOT */ #define PLT_ENTRY_WORD1 0x06acf000 /* add r6, r12 || nop */ #define PLT_ENTRY_WORD0b 0xd6c00000 /* seth r6, #high(.name_in_GOT) */ @@ -1248,7 +1248,7 @@ static const struct m32r_reloc_map m32r_reloc_map[] = { BFD_RELOC_M32R_SDA16, R_M32R_SDA16_RELA }, { BFD_RELOC_VTABLE_INHERIT, R_M32R_RELA_GNU_VTINHERIT }, { BFD_RELOC_VTABLE_ENTRY, R_M32R_RELA_GNU_VTENTRY }, - + { BFD_RELOC_M32R_GOT24, R_M32R_GOT24 }, { BFD_RELOC_M32R_26_PLTREL, R_M32R_26_PLTREL }, { BFD_RELOC_M32R_COPY, R_M32R_COPY }, @@ -1596,7 +1596,7 @@ m32r_elf_link_hash_newfunc (entry, table, string) { struct elf_m32r_link_hash_entry *ret = (struct elf_m32r_link_hash_entry *) entry; - + /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == (struct elf_m32r_link_hash_entry *) NULL) @@ -1605,7 +1605,7 @@ m32r_elf_link_hash_newfunc (entry, table, string) sizeof (struct elf_m32r_link_hash_entry))); if (ret == (struct elf_m32r_link_hash_entry *) NULL) return (struct bfd_hash_entry *) ret; - + /* Call the allocation method of the superclass. */ ret = ((struct elf_m32r_link_hash_entry *) _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, @@ -1613,13 +1613,13 @@ m32r_elf_link_hash_newfunc (entry, table, string) if (ret != (struct elf_m32r_link_hash_entry *) NULL) { struct elf_m32r_link_hash_entry *eh; - + eh = (struct elf_m32r_link_hash_entry *) ret; eh->dyn_relocs = NULL; // eh->gotplt_refcount = 0; /* eh->pcrel_relocs_copied = NULL; FIXME */ } - + return (struct bfd_hash_entry *) ret; } @@ -1632,18 +1632,18 @@ m32r_elf_link_hash_table_create (abfd) { struct elf_m32r_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_m32r_link_hash_table); - + ret = (struct elf_m32r_link_hash_table *) bfd_malloc (amt); if (ret == (struct elf_m32r_link_hash_table *) NULL) return NULL; - + if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, m32r_elf_link_hash_newfunc)) { free (ret); return NULL; } - + ret->sgot = NULL; ret->sgotplt = NULL; ret->srelgot = NULL; @@ -1652,7 +1652,7 @@ m32r_elf_link_hash_table_create (abfd) ret->sdynbss = NULL; ret->srelbss = NULL; ret->sym_sec.abfd = NULL; - + return &ret->root.root; } @@ -1730,13 +1730,14 @@ m32r_elf_create_dynamic_sections (abfd, info) { /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. */ - struct elf_link_hash_entry *h = NULL; + struct bfd_link_hash_entry *bh = NULL; + struct elf_link_hash_entry *h; if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, (bfd_vma) 0, (const char *) NULL, FALSE, - get_elf_backend_data (abfd)->collect, - (struct bfd_link_hash_entry **) &h))) + get_elf_backend_data (abfd)->collect, &bh))) return FALSE; + h = (struct elf_link_hash_entry *) bh; h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; h->type = STT_OBJECT; @@ -1827,33 +1828,33 @@ m32r_elf_create_dynamic_sections (abfd, info) static void m32r_elf_copy_indirect_symbol (const struct elf_backend_data *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); - + static void m32r_elf_copy_indirect_symbol (const struct elf_backend_data *bed, struct elf_link_hash_entry *dir, struct elf_link_hash_entry *ind) { struct elf_m32r_link_hash_entry *edir, *eind; - + edir = (struct elf_m32r_link_hash_entry *) dir; eind = (struct elf_m32r_link_hash_entry *) ind; - + if (eind->dyn_relocs != NULL) { if (edir->dyn_relocs != NULL) { struct elf_m32r_dyn_relocs **pp; struct elf_m32r_dyn_relocs *p; - + if (ind->root.type == bfd_link_hash_indirect) abort (); - + /* Add reloc counts against the weak sym to the strong sym list. Merge any entries against the same section. */ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) { struct elf_m32r_dyn_relocs *q; - + for (q = edir->dyn_relocs; q != NULL; q = q->next) if (q->sec == p->sec) { @@ -1867,11 +1868,11 @@ m32r_elf_copy_indirect_symbol (const struct elf_backend_data *bed, } *pp = edir->dyn_relocs; } - + edir->dyn_relocs = eind->dyn_relocs; eind->dyn_relocs = NULL; } - + // if (ind->root.type == bfd_link_hash_indirect // && dir->got.refcount <= 0) // { @@ -1887,7 +1888,7 @@ m32r_elf_copy_indirect_symbol (const struct elf_backend_data *bed, dynamic object, but we're not including those sections. We have to change the definition to something the rest of the link can understand. */ - + static bfd_boolean m32r_elf_adjust_dynamic_symbol (info, h) struct bfd_link_info *info; @@ -1903,9 +1904,9 @@ m32r_elf_adjust_dynamic_symbol (info, h) #ifdef DEBUG_PIC printf("m32r_elf_adjust_dynamic_symbol()\n"); #endif - + dynobj = elf_hash_table (info)->dynobj; - + /* Make sure we know what is going on here. */ BFD_ASSERT (dynobj != NULL && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) @@ -1917,7 +1918,7 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))); - + /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, when we know the address of the .got section. */ @@ -1943,7 +1944,7 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); } else h->plt.offset = (bfd_vma) -1; - + /* If this is a weak symbol, and there is a real definition, the processor independent code will have arranged for us to see the real definition first, and we can just use the same value. */ @@ -1955,17 +1956,17 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); h->root.u.def.value = h->weakdef->root.u.def.value; return TRUE; } - + /* This is a reference to a symbol defined by a dynamic object which is not a function. */ - + /* If we are creating a shared library, we must presume that the only references to the symbol are via the global offset table. For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (info->shared) return TRUE; - + /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0) @@ -2004,11 +2005,11 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); determine the address it must put in the global offset table, so both the dynamic object and the regular object will refer to the same memory location for the variable. */ - + htab = m32r_elf_hash_table (info); s = htab->sdynbss; BFD_ASSERT (s != NULL); - + /* We must generate a R_M32R_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the runtime process image. We need to remember the offset into the @@ -2016,19 +2017,19 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) { asection *srel; - + srel = htab->srelbss; BFD_ASSERT (srel != NULL); srel->_raw_size += sizeof (Elf32_External_Rela); h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY; } - + /* We need to figure out the alignment required for this symbol. I have no idea how ELF linkers handle this. */ power_of_two = bfd_log2 (h->size); if (power_of_two > 3) power_of_two = 3; - + /* Apply the required alignment. */ s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two)); @@ -2037,14 +2038,14 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); if (! bfd_set_section_alignment (dynobj, s, power_of_two)) return FALSE; } - + /* Define the symbol as being at this point in the section. */ h->root.u.def.section = s; h->root.u.def.value = s->_raw_size; - + /* Increment the section size to make room for the symbol. */ s->_raw_size += h->size; - + return TRUE; } @@ -2061,7 +2062,7 @@ printf("m32r_elf_adjust_dynamic_symbol()\n"); /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ - + static bfd_boolean allocate_dynrelocs (h, inf) struct elf_link_hash_entry *h; @@ -2071,19 +2072,19 @@ allocate_dynrelocs (h, inf) struct elf_m32r_link_hash_table *htab; struct elf_m32r_link_hash_entry *eh; struct elf_m32r_dyn_relocs *p; - + if (h->root.type == bfd_link_hash_indirect) return TRUE; - + if (h->root.type == bfd_link_hash_warning) /* When warning symbols are created, they **replace** the "real" entry in the hash table, thus we never get to see the real symbol in a hash traversal. So look at it now. */ h = (struct elf_link_hash_entry *) h->root.u.i.link; - + info = (struct bfd_link_info *) inf; htab = m32r_elf_hash_table (info); - + eh = (struct elf_m32r_link_hash_entry *) h; // if ((h->got.refcount > 0 // || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) @@ -2095,7 +2096,7 @@ allocate_dynrelocs (h, inf) // if (h->plt.refcount >= eh->gotplt_refcount) // h->plt.refcount -= eh->gotplt_refcount; // } - + if (htab->root.dynamic_sections_created && h->plt.refcount > 0) { @@ -2107,18 +2108,18 @@ allocate_dynrelocs (h, inf) if (! bfd_elf32_link_record_dynamic_symbol (info, h)) return FALSE; } - + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) { asection *s = htab->splt; - + /* If this is the first .plt entry, make room for the special first entry. */ if (s->_raw_size == 0) s->_raw_size += PLT_ENTRY_SIZE; - + h->plt.offset = s->_raw_size; - + /* If this symbol is not defined in a regular file, and we are not generating a shared library, then set the symbol to this location in the .plt. This is required to make function @@ -2130,14 +2131,14 @@ allocate_dynrelocs (h, inf) h->root.u.def.section = s; h->root.u.def.value = h->plt.offset; } - + /* Make room for this entry. */ s->_raw_size += PLT_ENTRY_SIZE; - + /* We also need to make an entry in the .got.plt section, which will be placed in the .got section by the linker script. */ htab->sgotplt->_raw_size += 4; - + /* We also need to make an entry in the .rel.plt section. */ htab->srelplt->_raw_size += sizeof (Elf32_External_Rela); } @@ -2152,12 +2153,12 @@ allocate_dynrelocs (h, inf) h->plt.offset = (bfd_vma) -1; h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; } - + if (h->got.refcount > 0) { asection *s; bfd_boolean dyn; - + /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ if (h->dynindx == -1 @@ -2166,7 +2167,7 @@ allocate_dynrelocs (h, inf) if (! bfd_elf32_link_record_dynamic_symbol (info, h)) return FALSE; } - + s = htab->sgot; h->got.offset = s->_raw_size; @@ -2177,10 +2178,10 @@ allocate_dynrelocs (h, inf) } else h->got.offset = (bfd_vma) -1; - + if (eh->dyn_relocs == NULL) return TRUE; - + /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be defined in regular objects. For the normal shared case, discard @@ -2210,7 +2211,7 @@ allocate_dynrelocs (h, inf) /* For the non-shared case, discard space for relocs against symbols which turn out to need copy relocs or are not dynamic. */ - + if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) @@ -2226,29 +2227,29 @@ allocate_dynrelocs (h, inf) if (! bfd_elf32_link_record_dynamic_symbol (info, h)) return FALSE; } - + /* If that succeeded, we know we'll be keeping all the relocs. */ if (h->dynindx != -1) goto keep; } - + eh->dyn_relocs = NULL; - + keep: ; } - + /* Finally, allocate space. */ for (p = eh->dyn_relocs; p != NULL; p = p->next) { asection *sreloc = elf_section_data (p->sec)->sreloc; sreloc->_raw_size += p->count * sizeof (Elf32_External_Rela); } - + return TRUE; } /* Find any dynamic relocs that apply to read-only sections. */ - + static bfd_boolean readonly_dynrelocs (h, inf) struct elf_link_hash_entry *h; @@ -2279,7 +2280,7 @@ readonly_dynrelocs (h, inf) } /* Set the sizes of the dynamic sections. */ - + static bfd_boolean m32r_elf_size_dynamic_sections (output_bfd, info) bfd *output_bfd ATTRIBUTE_UNUSED; @@ -2541,7 +2542,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, dynobj = htab->root.dynobj; local_got_offsets = elf_local_got_offsets (input_bfd); - + sgot = htab->sgot; splt = htab->splt; sreloc = NULL; @@ -2681,7 +2682,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, section symbol winds up in the output section. */ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) rel->r_addend += sec->output_offset + sym->st_value; - + continue; } } @@ -2744,7 +2745,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_M32R_26_PCREL_RELA) && ((input_section->flags & SEC_ALLOC) != 0 /* DWARF will emit R_M32R_16(24,32) relocations - in its sections against symbols defined + in its sections against symbols defined externally in shared libraries. We can't do anything with them here. */ || ((input_section->flags & SEC_DEBUGGING) != 0 @@ -2772,8 +2773,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (info->shared - && (!info->symbolic) + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else @@ -2781,7 +2781,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, offset, - (!info->shared + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR || ELF_ST_VISIBILITY (h->other))))) return FALSE; relocation = 0; @@ -2806,7 +2806,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, case R_M32R_GOTPC_HI_ULO: case R_M32R_GOTPC_HI_SLO: - case R_M32R_GOTPC_LO: + case R_M32R_GOTPC_LO: { /* .got(_GLOBAL_OFFSET_TABLE_) - pc relocation bl .+4 @@ -2821,7 +2821,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation -= (input_section->output_section->vma + input_section->output_offset + rel->r_offset); - if ((r_type == R_M32R_GOTPC_HI_SLO) + if ((r_type == R_M32R_GOTPC_HI_SLO) && ((relocation + rel->r_addend) & 0x8000)) rel->r_addend += 0x10000; @@ -2829,18 +2829,18 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, } case R_M32R_GOT16_HI_ULO: case R_M32R_GOT16_HI_SLO: - case R_M32R_GOT16_LO: + case R_M32R_GOT16_LO: /* Fall through. */ case R_M32R_GOT24: /* Relocation is to the entry for this symbol in the global offset table. */ BFD_ASSERT (sgot != NULL); - + if (h != NULL) { bfd_boolean dyn; bfd_vma off; - + off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -2860,7 +2860,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, offset must always be a multiple of 4, we use the least significant bit to record whether we have initialized it already. - + When doing a dynamic link, we create a .rela.got relocation entry to initialize the value. This is done in the finish_dynamic_symbol routine. */ @@ -2873,19 +2873,19 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, h->got.offset |= 1; } } - + relocation = sgot->output_offset + off; } else { bfd_vma off; bfd_byte *loc; - + BFD_ASSERT (local_got_offsets != NULL && local_got_offsets[r_symndx] != (bfd_vma) -1); - + off = local_got_offsets[r_symndx]; - + /* The offset must always be a multiple of 4. We use the least significant bit to record whether we have already processed this entry. */ @@ -2894,17 +2894,17 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, else { bfd_put_32 (output_bfd, relocation, sgot->contents + off); - + if (info->shared) { asection *srelgot; Elf_Internal_Rela outrel; - + /* We need to generate a R_M32R_RELATIVE reloc for the dynamic linker. */ srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); BFD_ASSERT (srelgot != NULL); - + outrel.r_offset = (sgot->output_section->vma + sgot->output_offset + off); @@ -2915,10 +2915,10 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_elf32_swap_reloca_out (output_bfd, &outrel,loc); ++srelgot->reloc_count; } - + local_got_offsets[r_symndx] |= 1; } - + relocation = sgot->output_offset + off; } if ((r_type == R_M32R_GOT16_HI_SLO) @@ -2926,11 +2926,11 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, rel->r_addend += 0x10000; break; - + case R_M32R_26_PLTREL: /* Relocation is to the entry for this symbol in the procedure linkage table. */ - + /* The native assembler will generate a 26_PLTREL reloc for a local symbol if you assemble a call from one section to another when using -K pic. */ @@ -2950,12 +2950,12 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, using -Bsymbolic. */ break; } - + relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); break; - + case R_M32R_HI16_SLO_RELA: { if ((relocation + rel->r_addend) & 0x8000) @@ -2986,34 +2986,34 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, Elf_Internal_Rela outrel; bfd_boolean skip, relocate; bfd_byte *loc; - + /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - + if (sreloc == NULL) { 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)); if (name == NULL) return FALSE; - + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 && strcmp (bfd_get_section_name (input_bfd, input_section), name + 5) == 0); - + sreloc = bfd_get_section_by_name (dynobj, name); BFD_ASSERT (sreloc != NULL); } - + skip = FALSE; relocate = FALSE; - + outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, @@ -3024,7 +3024,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, skip = TRUE, relocate = TRUE; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); - + if (skip) memset (&outrel, 0, sizeof outrel); else if (r_type == R_M32R_18_PCREL_RELA @@ -3068,7 +3068,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section, continue; } break; - + case (int) R_M32R_10_PCREL : r = m32r_elf_do_10_pcrel_reloc (input_bfd, howto, input_section, contents, offset, @@ -3238,11 +3238,11 @@ m32r_elf_finish_dynamic_symbol (output_bfd, info, h, sym) struct elf_m32r_link_hash_table *htab; bfd *dynobj; bfd_byte *loc; - + #ifdef DEBUG_PIC printf("m32r_elf_finish_dynamic_symbol()\n"); #endif - + htab = m32r_elf_hash_table (info); dynobj = htab->root.dynobj; @@ -3255,12 +3255,12 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); bfd_vma plt_index; bfd_vma got_offset; Elf_Internal_Rela rela; - + /* This symbol has an entry in the procedure linkage table. Set it up. */ - + BFD_ASSERT (h->dynindx != -1); - + splt = htab->splt; sgot = htab->sgotplt; srela = htab->srelplt; @@ -3321,7 +3321,7 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); + (((unsigned int) ((- (h->plt.offset + 16)) >> 2)) & 0xffffff)), splt->contents + h->plt.offset + 16); } - + /* Fill in the entry in the global offset table. */ bfd_put_32 (output_bfd, (splt->output_section->vma @@ -3339,7 +3339,7 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); loc = srela->contents; loc += plt_index * sizeof(Elf32_External_Rela); bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); - + if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) { /* Mark the symbol as undefined, rather than as defined in @@ -3353,18 +3353,18 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); asection *sgot; asection *srela; Elf_Internal_Rela rela; - + /* This symbol has an entry in the global offset table. Set it up. */ - + sgot = htab->sgot; srela = htab->srelgot; BFD_ASSERT (sgot != NULL && srela != NULL); - + rela.r_offset = (sgot->output_section->vma + sgot->output_offset + (h->got.offset &~ 1)); - + /* If this is a -Bsymbolic link, and the symbol is defined locally, we just want to emit a RELATIVE reloc. Likewise if the symbol was forced to be local because of a version file. @@ -3388,28 +3388,28 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); rela.r_info = ELF32_R_INFO (h->dynindx, R_M32R_GLOB_DAT); rela.r_addend = 0; } - + loc = srela->contents; loc += srela->reloc_count * sizeof(Elf32_External_Rela); bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); ++srela->reloc_count; } - + if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0) { asection *s; Elf_Internal_Rela rela; - + /* This symbols needs a copy reloc. Set it up. */ - + BFD_ASSERT (h->dynindx != -1 && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)); - + s = bfd_get_section_by_name (h->root.u.def.section->owner, ".rela.bss"); BFD_ASSERT (s != NULL); - + rela.r_offset = (h->root.u.def.value + h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset); @@ -3420,18 +3420,18 @@ printf("m32r_elf_finish_dynamic_symbol()\n"); bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); ++s->reloc_count; } - + /* Mark some specially defined symbols as absolute. */ if (strcmp (h->root.root.string, "_DYNAMIC") == 0 || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) sym->st_shndx = SHN_ABS; - + return TRUE; } /* Finish up the dynamic sections. */ - + static bfd_boolean m32r_elf_finish_dynamic_sections (output_bfd, info) bfd *output_bfd; @@ -3445,20 +3445,20 @@ m32r_elf_finish_dynamic_sections (output_bfd, info) #ifdef DEBUG_PIC printf("m32r_elf_finish_dynamic_sections()\n"); #endif - + htab = m32r_elf_hash_table (info); dynobj = htab->root.dynobj; sgot = htab->sgotplt; sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); - + if (htab->root.dynamic_sections_created) { asection *splt; Elf32_External_Dyn *dyncon, *dynconend; - + BFD_ASSERT (sgot != NULL && sdyn != NULL); - + dyncon = (Elf32_External_Dyn *) sdyn->contents; dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size); @@ -3467,9 +3467,9 @@ printf("m32r_elf_finish_dynamic_sections()\n"); Elf_Internal_Dyn dyn; const char *name; asection *s; - + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); - + switch (dyn.d_tag) { default: @@ -3477,7 +3477,7 @@ printf("m32r_elf_finish_dynamic_sections()\n"); case DT_PLTGOT: name = ".got"; - s = htab->sgot->output_section; + s = htab->sgot->output_section; goto get_vma; case DT_JMPREL: name = ".rela.plt"; @@ -3520,7 +3520,7 @@ printf("m32r_elf_finish_dynamic_sections()\n"); break; } } - + /* Fill in the first entry in the procedure linkage table. */ splt = htab->splt; if (splt && splt->_raw_size > 0) @@ -3541,7 +3541,7 @@ printf("m32r_elf_finish_dynamic_sections()\n"); bfd_put_32 (output_bfd, PLT0_ENTRY_WORD0 | ((addr >> 16) & 0xffff), splt->contents); - bfd_put_32 (output_bfd, + bfd_put_32 (output_bfd, PLT0_ENTRY_WORD1 | (addr & 0xffff), splt->contents + 4); bfd_put_32 (output_bfd, PLT0_ENTRY_WORD2, splt->contents + 8); @@ -3568,7 +3568,7 @@ printf("m32r_elf_finish_dynamic_sections()\n"); elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; } - + return TRUE; } @@ -4473,7 +4473,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs) { case R_M32R_GOT16_HI_ULO: case R_M32R_GOT16_HI_SLO: - case R_M32R_GOT16_LO: + case R_M32R_GOT16_LO: case R_M32R_GOT24: if (h != NULL) @@ -4507,7 +4507,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs) 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 this is a local symbol, we resolve it directly without creating a procedure linkage table entry. */ if (h == NULL) @@ -4583,23 +4583,23 @@ m32r_elf_check_relocs (abfd, info, sec, relocs) if (sreloc == NULL) { const char *name; - + name = (bfd_elf_string_from_elf_section (abfd, elf_elfheader (abfd)->e_shstrndx, elf_section_data (sec)->rel_hdr.sh_name)); if (name == NULL) return FALSE; - + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 && strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0); - + sreloc = bfd_get_section_by_name (dynobj, name); if (sreloc == NULL) { flagword flags; - + sreloc = bfd_make_section (dynobj, name); flags = (SEC_HAS_CONTENTS | SEC_READONLY | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -4612,7 +4612,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs) } elf_section_data (sec)->sreloc = sreloc; } - + /* If this is a global symbol, we count the number of relocations we need for this symbol. */ if (h != NULL) diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 709b8f4..24460ef 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -47,16 +47,6 @@ static void m68hc11_elf_set_symbol (bfd* abfd, struct bfd_link_info *info, static bfd_boolean m68hc11_elf_export_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg); -static bfd_boolean m68hc11_get_relocation_value - (bfd* abfd, - struct bfd_link_info* info, - asection **local_sections, - Elf_Internal_Sym* local_syms, - Elf_Internal_Rela* rel, - const char** name, - bfd_vma* relocation, - bfd_boolean* is_far); - static void scan_sections_for_abi (bfd*, asection*, PTR); struct m68hc11_scan_param @@ -919,7 +909,8 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info, } static bfd_boolean -m68hc11_get_relocation_value (bfd *abfd, struct bfd_link_info *info, +m68hc11_get_relocation_value (bfd *input_bfd, struct bfd_link_info *info, + asection *input_section, asection **local_sections, Elf_Internal_Sym *local_syms, Elf_Internal_Rela *rel, @@ -934,8 +925,8 @@ m68hc11_get_relocation_value (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym; const char* stub_name = 0; - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - sym_hashes = elf_sym_hashes (abfd); + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (input_bfd); r_symndx = ELF32_R_SYM (rel->r_info); @@ -953,33 +944,17 @@ m68hc11_get_relocation_value (bfd *abfd, struct bfd_link_info *info, *is_far = (sym && (sym->st_other & STO_M68HC12_FAR)); if (*is_far) stub_name = (bfd_elf_string_from_elf_section - (abfd, symtab_hdr->sh_link, + (input_bfd, symtab_hdr->sh_link, sym->st_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; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - *relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - *relocation = 0; - else - { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, abfd, - sec, rel->r_offset, TRUE))) - return FALSE; - *relocation = 0; - } + bfd_boolean unresolved_reloc, warned; + + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + *relocation, sec, unresolved_reloc, + info, warned); + *is_far = (h && (h->other & STO_M68HC12_FAR)); stub_name = h->root.root.string; } @@ -989,7 +964,7 @@ m68hc11_get_relocation_value (bfd *abfd, struct bfd_link_info *info, else { *name = (bfd_elf_string_from_elf_section - (abfd, symtab_hdr->sh_link, sym->st_name)); + (input_bfd, symtab_hdr->sh_link, sym->st_name)); if (*name == NULL || **name == '\0') *name = bfd_section_name (input_bfd, sec); } @@ -1082,8 +1057,8 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (*ebd->elf_info_to_howto_rel) (input_bfd, &arel, rel); howto = arel.howto; - m68hc11_get_relocation_value (input_bfd, info, - local_sections, local_syms, + m68hc11_get_relocation_value (input_bfd, info, input_section, + local_sections, local_syms, rel, &name, &relocation, &is_far); /* Do the memory bank mapping. */ diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c index 0fc9768..4d431f6 100644 --- a/bfd/elf32-mcore.c +++ b/bfd/elf32-mcore.c @@ -472,30 +472,11 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; - if ( h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; - else if (info->shared - && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - relocation = 0; - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; + bfd_boolean unresolved_reloc, warned; - ret = FALSE; - continue; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } switch (r_type) diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 306a798..ad4779d 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -457,33 +457,11 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - 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) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - { - relocation = 0; - } - else - { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } r = msp430_final_link_relocate (howto, input_bfd, input_section, diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c index 62f86d4..7a4d5ec 100644 --- a/bfd/elf32-openrisc.c +++ b/bfd/elf32-openrisc.c @@ -383,33 +383,12 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); - name = h->root.root.string; - - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - { - relocation = 0; - } - else - { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } } r = openrisc_final_link_relocate (howto, input_bfd, input_section, diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 8bd7115..6849da8 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1,6 +1,6 @@ /* PowerPC-specific support for 32-bit ELF - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -1816,10 +1816,7 @@ ppc_elf_relax_section (bfd *abfd, symaddr = tsec->output_section->vma + tsec->output_offset + toff; roff = irel->r_offset; - - reladdr = (isec->output_section->vma - + isec->output_offset - + roff); + reladdr = isec->output_section->vma + isec->output_offset + roff; /* If the branch is in range, no need to do anything. */ if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset) diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 5ab56bc..28a2fcc 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4938,8 +4938,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (! info->executable - && info->unresolved_syms_in_objects == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else @@ -4947,8 +4946,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (! info->callbacks->undefined_symbol (info, h->root.root.string, input_bfd, input_section, rel->r_offset, - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR || ELF_ST_VISIBILITY (h->other)))) return FALSE; relocation = 0; diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 45bb4f6..0218ddc 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1696,43 +1696,11 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); -#if 0 - fprintf (stderr, "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n", - sec->name, h->root.root.string, h->root.u.def.value, sec->output_section->vma, sec->output_offset, relocation); -#endif - } - else if (h->root.type == bfd_link_hash_undefweak) - { -#if 0 - fprintf (stderr, "undefined: sec: %s, name: %s\n", - sec->name, h->root.root.string); -#endif - relocation = 0; - } - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; -#if 0 - fprintf (stderr, "unknown: name: %s\n", h->root.root.string); -#endif - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } /* FIXME: We should use the addend, but the COFF relocations don't. */ diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index 1377ff2..b3b40fb 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -853,34 +853,11 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc, warned; - 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) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - { - relocation = 0; - } - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, warned); } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 06aff7b..5bc9309 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -173,7 +173,7 @@ static void elf64_hppa_dyn_hash_traverse PTR info)); static const char *get_dyn_name - PARAMS ((asection *, struct elf_link_hash_entry *, + PARAMS ((bfd *, struct elf_link_hash_entry *, const Elf_Internal_Rela *, char **, size_t *)); /* This must follow the definitions of the various derived linker @@ -446,13 +446,14 @@ elf64_hppa_section_from_shdr (abfd, hdr, name) allocate memory as necessary, possibly reusing PBUF/PLEN. */ static const char * -get_dyn_name (sec, h, rel, pbuf, plen) - asection *sec; +get_dyn_name (abfd, h, rel, pbuf, plen) + bfd *abfd; struct elf_link_hash_entry *h; const Elf_Internal_Rela *rel; char **pbuf; size_t *plen; { + asection *sec = abfd->sections; size_t nlen, tlen; char *buf; size_t len; @@ -858,7 +859,7 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) continue; /* Collect a canonical name for this address. */ - addr_name = get_dyn_name (sec, h, rel, &buf, &buf_len); + addr_name = get_dyn_name (abfd, h, rel, &buf, &buf_len); /* Collect the canonical entry data for this address. */ dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index ca627ef..3e769d3 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -1480,39 +1480,11 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = sym_hashes [r_symndx - symtab_hdr->sh_info]; + bfd_boolean unresolved_reloc; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - name = h->root.root.string; - - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - relocation = 0; - else if (info->shared - && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - relocation = 0; - else - { - /* The test on undefined_signalled is redundant at the - moment, but kept for symmetry. */ - if (! undefined_signalled - && ! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) - return FALSE; - undefined_signalled = TRUE; - relocation = 0; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, + relocation, sec, unresolved_reloc, + info, undefined_signalled); } r = mmix_final_link_relocate (howto, input_section, diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index 15c2992..03196c5 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -1703,15 +1703,16 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (info->shared - && !info->symbolic - && info->unresolved_syms_in_objects == RM_IGNORE) + else if (info->unresolved_syms_in_objects == RM_IGNORE + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, TRUE))) + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (h->other))))) return FALSE; relocation = 0; } diff --git a/bfd/elflink.c b/bfd/elflink.c index 5051364..39bf46f 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1,5 +1,5 @@ /* ELF linking support for BFD. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -653,8 +653,7 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info) TYPE_CHANGE_OK if it is OK for the type to change. We set SIZE_CHANGE_OK if it is OK for the size to change. By OK to change, we mean that we shouldn't warn if the type or size does - change. DT_NEEDED indicates if it comes from a DT_NEEDED entry of - a shared object. */ + change. */ bfd_boolean _bfd_elf_merge_symbol (bfd *abfd, @@ -667,8 +666,7 @@ _bfd_elf_merge_symbol (bfd *abfd, bfd_boolean *skip, bfd_boolean *override, bfd_boolean *type_change_ok, - bfd_boolean *size_change_ok, - bfd_boolean dt_needed) + bfd_boolean *size_change_ok) { asection *sec; struct elf_link_hash_entry *h; @@ -676,7 +674,7 @@ _bfd_elf_merge_symbol (bfd *abfd, int bind; bfd *oldbfd; bfd_boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon; - bfd_boolean newweakdef, oldweakdef, newweakundef, oldweakundef; + bfd_boolean newweak, oldweak; *skip = FALSE; *override = FALSE; @@ -814,7 +812,7 @@ _bfd_elf_merge_symbol (bfd *abfd, is the first time we see it in a dynamic object, we mark if it is weak. Otherwise, we clear it. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) - { + { if (bind == STB_WEAK) h->elf_link_hash_flags |= ELF_LINK_DYNAMIC_WEAK; } @@ -882,48 +880,39 @@ _bfd_elf_merge_symbol (bfd *abfd, return TRUE; } - /* We need to treat weak definition right, depending on if there is a - definition from a dynamic object. */ - if (bind == STB_WEAK) - { - if (olddef) - { - newweakdef = TRUE; - newweakundef = FALSE; - } - else - { - newweakdef = FALSE; - newweakundef = TRUE; - } - } - else - newweakdef = newweakundef = FALSE; + /* Differentiate strong and weak symbols. */ + newweak = bind == STB_WEAK; + oldweak = (h->root.type == bfd_link_hash_defweak + || h->root.type == bfd_link_hash_undefweak); - /* If the new weak definition comes from a relocatable file and the - old symbol comes from a dynamic object, we treat the new one as - strong. */ - if (newweakdef && !newdyn && olddyn) - newweakdef = FALSE; + /* If a new weak symbol comes from a regular file and the old symbol + comes from a dynamic library, we treat the new one as strong. + Similarly, an old weak symbol from a regular file is treated as + strong when the new symbol comes from a dynamic library. Further, + an old weak symbol from a dynamic library is treated as strong if + the new symbol is from a dynamic library. This reflects the way + glibc's ld.so works. */ + if (!newdyn && olddyn) + newweak = FALSE; + if (newdyn) + oldweak = FALSE; - if (h->root.type == bfd_link_hash_defweak) - { - oldweakdef = TRUE; - oldweakundef = FALSE; - } - else if (h->root.type == bfd_link_hash_undefweak) - { - oldweakdef = FALSE; - oldweakundef = TRUE; - } - else - oldweakdef = oldweakundef = FALSE; + /* It's OK to change the type if either the existing symbol or the + new symbol is weak. A type change is also OK if the old symbol + is undefined and the new symbol is defined. */ + + if (oldweak + || newweak + || (newdef + && h->root.type == bfd_link_hash_undefined)) + *type_change_ok = TRUE; - /* If the old weak definition comes from a relocatable file and the - new symbol comes from a dynamic object, we treat the old one as - strong. */ - if (oldweakdef && !olddyn && newdyn) - oldweakdef = FALSE; + /* It's OK to change the size if either the existing symbol or the + new symbol is weak, or if the old symbol is undefined. */ + + if (*type_change_ok + || h->root.type == bfd_link_hash_undefined) + *size_change_ok = TRUE; /* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old symbol, respectively, appears to be a common symbol in a dynamic @@ -950,11 +939,10 @@ _bfd_elf_merge_symbol (bfd *abfd, if (newdyn && newdef + && !newweak && (sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_LOAD) == 0 && sym->st_size > 0 - && !newweakdef - && !newweakundef && ELF_ST_TYPE (sym->st_info) != STT_FUNC) newdyncommon = TRUE; else @@ -972,28 +960,6 @@ _bfd_elf_merge_symbol (bfd *abfd, else olddyncommon = FALSE; - /* It's OK to change the type if either the existing symbol or the - new symbol is weak unless it comes from a DT_NEEDED entry of - a shared object, in which case, the DT_NEEDED entry may not be - required at the run time. The type change is also OK if the - old symbol is undefined and the new symbol is defined. */ - - if ((! dt_needed && oldweakdef) - || oldweakundef - || newweakdef - || newweakundef - || (newdef - && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak))) - *type_change_ok = TRUE; - - /* It's OK to change the size if either the existing symbol or the - new symbol is weak, or if the old symbol is undefined. */ - - if (*type_change_ok - || h->root.type == bfd_link_hash_undefined) - *size_change_ok = TRUE; - /* If both the old and the new symbols look like common symbols in a dynamic object, set the size of the symbol to the larger of the two. */ @@ -1031,24 +997,14 @@ _bfd_elf_merge_symbol (bfd *abfd, represent variables; this can cause confusion in principle, but any such confusion would seem to indicate an erroneous program or shared library. We also permit a common symbol in a regular - object to override a weak symbol in a shared object. - - We prefer a non-weak definition in a shared library to a weak - definition in the executable unless it comes from a DT_NEEDED - entry of a shared object, in which case, the DT_NEEDED entry - may not be required at the run time. */ + object to override a weak symbol in a shared object. */ if (newdyn && newdef && (olddef || (h->root.type == bfd_link_hash_common - && (newweakdef - || newweakundef - || ELF_ST_TYPE (sym->st_info) == STT_FUNC))) - && (!oldweakdef - || dt_needed - || newweakdef - || newweakundef)) + && (newweak + || ELF_ST_TYPE (sym->st_info) == STT_FUNC)))) { *override = TRUE; newdef = FALSE; @@ -1092,20 +1048,17 @@ _bfd_elf_merge_symbol (bfd *abfd, As above, we again permit a common symbol in a regular object to override a definition in a shared object if the shared object - symbol is a function or is weak. - - As above, we permit a non-weak definition in a shared object to - override a weak definition in a regular object. */ + symbol is a function or is weak. */ flip = NULL; if (! newdyn && (newdef || (bfd_is_com_section (sec) - && (oldweakdef || h->type == STT_FUNC))) + && (oldweak + || h->type == STT_FUNC))) && olddyn && olddef - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 - && ((!newweakdef && !newweakundef) || oldweakdef)) + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0) { /* Change the hash table entry to undefined, and let _bfd_generic_link_add_one_symbol do the right thing with the @@ -1194,57 +1147,13 @@ _bfd_elf_merge_symbol (bfd *abfd, } } - /* Handle the special case of a weak definition in a regular object - followed by a non-weak definition in a shared object. In this - case, we prefer the definition in the shared object unless it - comes from a DT_NEEDED entry of a shared object, in which case, - the DT_NEEDED entry may not be required at the run time. */ - if (olddef - && ! dt_needed - && oldweakdef - && newdef - && newdyn - && !newweakdef - && !newweakundef) - { - /* To make this work we have to frob the flags so that the rest - of the code does not think we are using the regular - definition. */ - if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) - h->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR; - else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0) - h->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC; - h->elf_link_hash_flags &= ~ (ELF_LINK_HASH_DEF_REGULAR - | ELF_LINK_HASH_DEF_DYNAMIC); - - /* If H is the target of an indirection, we want the caller to - use H rather than the indirect symbol. Otherwise if we are - defining a new indirect symbol we will wind up attaching it - to the entry we are overriding. */ - *sym_hash = h; - } - - /* Handle the special case of a non-weak definition in a shared - object followed by a weak definition in a regular object. In - this case we prefer the definition in the shared object. To make - this work we have to tell the caller to not treat the new symbol - as a definition. */ - if (olddef - && olddyn - && !oldweakdef - && newdef - && ! newdyn - && (newweakdef || newweakundef)) - *override = TRUE; - return TRUE; } /* This function is called to create an indirect symbol from the default for the symbol with the default version if needed. The symbol is described by H, NAME, SYM, PSEC, VALUE, and OVERRIDE. We - set DYNSYM if the new indirect symbol is dynamic. DT_NEEDED - indicates if it comes from a DT_NEEDED entry of a shared object. */ + set DYNSYM if the new indirect symbol is dynamic. */ bfd_boolean _bfd_elf_add_default_symbol (bfd *abfd, @@ -1255,8 +1164,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, asection **psec, bfd_vma *value, bfd_boolean *dynsym, - bfd_boolean override, - bfd_boolean dt_needed) + bfd_boolean override) { bfd_boolean type_change_ok; bfd_boolean size_change_ok; @@ -1317,7 +1225,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, sec = *psec; if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, value, &hi, &skip, &override, &type_change_ok, - &size_change_ok, dt_needed)) + &size_change_ok)) return FALSE; if (skip) @@ -1384,12 +1292,6 @@ _bfd_elf_add_default_symbol (bfd *abfd, { struct elf_link_hash_entry *ht; - /* If the symbol became indirect, then we assume that we have - not seen a definition before. */ - BFD_ASSERT ((hi->elf_link_hash_flags - & (ELF_LINK_HASH_DEF_DYNAMIC - | ELF_LINK_HASH_DEF_REGULAR)) == 0); - ht = (struct elf_link_hash_entry *) hi->root.u.i.link; (*bed->elf_backend_copy_indirect_symbol) (bed, ht, hi); @@ -1430,7 +1332,7 @@ nondefault: sec = *psec; if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, value, &hi, &skip, &override, &type_change_ok, - &size_change_ok, dt_needed)) + &size_change_ok)) return FALSE; if (skip) @@ -1462,12 +1364,6 @@ nondefault: if (hi->root.type == bfd_link_hash_indirect) { - /* If the symbol became indirect, then we assume that we have - not seen a definition before. */ - BFD_ASSERT ((hi->elf_link_hash_flags - & (ELF_LINK_HASH_DEF_DYNAMIC - | ELF_LINK_HASH_DEF_REGULAR)) == 0); - (*bed->elf_backend_copy_indirect_symbol) (bed, h, hi); /* See if the new flags lead us to realize that the symbol @@ -1880,10 +1776,6 @@ elf_link_read_relocs_from_section (bfd *abfd, Elf_Internal_Shdr *symtab_hdr; size_t nsyms; - /* If there aren't any relocations, that's OK. */ - if (!shdr) - return TRUE; - /* Position ourselves at the start of the section. */ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0) return FALSE; @@ -1909,7 +1801,7 @@ elf_link_read_relocs_from_section (bfd *abfd, } erela = external_relocs; - erelaend = erela + NUM_SHDR_ENTRIES (shdr) * shdr->sh_entsize; + erelaend = erela + shdr->sh_size; irela = internal_relocs; while (erela < erelaend) { @@ -1995,12 +1887,13 @@ _bfd_elf_link_read_relocs (bfd *abfd, external_relocs, internal_relocs)) goto error_return; - if (!elf_link_read_relocs_from_section - (abfd, o, - elf_section_data (o)->rel_hdr2, - ((bfd_byte *) external_relocs) + rel_hdr->sh_size, - internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr) - * bed->s->int_rels_per_ext_rel))) + if (elf_section_data (o)->rel_hdr2 + && (!elf_link_read_relocs_from_section + (abfd, o, + elf_section_data (o)->rel_hdr2, + ((bfd_byte *) external_relocs) + rel_hdr->sh_size, + internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr) + * bed->s->int_rels_per_ext_rel)))) goto error_return; /* Cache the results for next time, if we can. */ diff --git a/bfd/elflink.h b/bfd/elflink.h index 05f7c68..adecd80 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -1,5 +1,5 @@ /* ELF linker support. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -68,6 +68,59 @@ sort_symbol (const void *arg1, const void *arg2) } } +/* Add a DT_NEEDED entry for this dynamic object. Returns -1 on error, + 1 if a DT_NEEDED tag already exists, and 0 on success. */ + +static int +add_dt_needed_tag (struct bfd_link_info *info, const char *soname, + bfd_boolean do_it) +{ + struct elf_link_hash_table *hash_table; + bfd_size_type oldsize; + bfd_size_type strindex; + + hash_table = elf_hash_table (info); + oldsize = _bfd_elf_strtab_size (hash_table->dynstr); + strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE); + if (strindex == (bfd_size_type) -1) + return -1; + + if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) + { + asection *sdyn; + Elf_External_Dyn *dyncon, *dynconend; + + sdyn = bfd_get_section_by_name (hash_table->dynobj, ".dynamic"); + BFD_ASSERT (sdyn != NULL); + + dyncon = (Elf_External_Dyn *) sdyn->contents; + dynconend = (Elf_External_Dyn *) (sdyn->contents + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) + { + Elf_Internal_Dyn dyn; + + elf_swap_dyn_in (hash_table->dynobj, dyncon, & dyn); + if (dyn.d_tag == DT_NEEDED + && dyn.d_un.d_val == strindex) + { + _bfd_elf_strtab_delref (hash_table->dynstr, strindex); + return 1; + } + } + } + + if (do_it) + { + if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex)) + return -1; + } + else + /* We were just checking for existence of the tag. */ + _bfd_elf_strtab_delref (hash_table->dynstr, strindex); + + return 0; +} + /* Add symbols from an ELF object file to the linker hash table. */ static bfd_boolean @@ -94,7 +147,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) Elf_Internal_Sym *isym; Elf_Internal_Sym *isymend; const struct elf_backend_data *bed; - bfd_boolean dt_needed; + bfd_boolean add_needed; struct elf_link_hash_table * hash_table; bfd_size_type amt; @@ -200,7 +253,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } } - dt_needed = FALSE; + add_needed = TRUE; if (! dynamic) { /* If we are creating a shared library, create all the dynamic @@ -222,11 +275,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) else { asection *s; - bfd_boolean add_needed; - const char *name; - bfd_size_type oldsize; - bfd_size_type strindex; + const char *soname = NULL; struct bfd_link_needed_list *rpath = NULL, *runpath = NULL; + int ret; /* ld --just-symbols and dynamic objects don't mix very well. Test for --just-symbols by looking at info set up by @@ -235,26 +286,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) goto error_return; - /* Find the name to use in a DT_NEEDED entry that refers to this - object. If the object has a DT_SONAME entry, we use it. - Otherwise, if the generic linker stuck something in - elf_dt_name, we use that. Otherwise, we just use the file - name. If the generic linker put a null string into - elf_dt_name, we don't make a DT_NEEDED entry at all, even if - there is a DT_SONAME entry. */ - add_needed = TRUE; - name = bfd_get_filename (abfd); - if (elf_dt_name (abfd) != NULL) - { - name = elf_dt_name (abfd); - if (*name == '\0') - { - if (elf_dt_soname (abfd) != NULL) - dt_needed = TRUE; + /* If this dynamic lib was specified on the command line with + --as-needed in effect, then we don't want to add a DT_NEEDED + tag unless the lib is actually used. Similary for libs brought + in by another lib's DT_NEEDED. */ + add_needed = elf_dyn_lib_class (abfd) == DYN_NORMAL; - add_needed = FALSE; - } - } s = bfd_get_section_by_name (abfd, ".dynamic"); if (s != NULL) { @@ -286,8 +323,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (dyn.d_tag == DT_SONAME) { unsigned int tagv = dyn.d_un.d_val; - name = bfd_elf_string_from_elf_section (abfd, shlink, tagv); - if (name == NULL) + soname = bfd_elf_string_from_elf_section (abfd, shlink, tagv); + if (soname == NULL) goto error_free_dyn; } if (dyn.d_tag == DT_NEEDED) @@ -404,53 +441,31 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (! _bfd_elf_link_create_dynamic_sections (abfd, info)) goto error_return; - if (add_needed) + /* Find the name to use in a DT_NEEDED entry that refers to this + object. If the object has a DT_SONAME entry, we use it. + Otherwise, if the generic linker stuck something in + elf_dt_name, we use that. Otherwise, we just use the file + name. */ + if (soname == NULL || *soname == '\0') { - /* Add a DT_NEEDED entry for this dynamic object. */ - oldsize = _bfd_elf_strtab_size (hash_table->dynstr); - strindex = _bfd_elf_strtab_add (hash_table->dynstr, name, FALSE); - if (strindex == (bfd_size_type) -1) - goto error_return; - - if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) - { - asection *sdyn; - Elf_External_Dyn *dyncon, *dynconend; - - /* The hash table size did not change, which means that - the dynamic object name was already entered. If we - have already included this dynamic object in the - link, just ignore it. There is no reason to include - a particular dynamic object more than once. */ - sdyn = bfd_get_section_by_name (hash_table->dynobj, ".dynamic"); - BFD_ASSERT (sdyn != NULL); - - dyncon = (Elf_External_Dyn *) sdyn->contents; - dynconend = (Elf_External_Dyn *) (sdyn->contents + - sdyn->_raw_size); - for (; dyncon < dynconend; dyncon++) - { - Elf_Internal_Dyn dyn; + soname = elf_dt_name (abfd); + if (soname == NULL || *soname == '\0') + soname = bfd_get_filename (abfd); + } - elf_swap_dyn_in (hash_table->dynobj, dyncon, & dyn); - if (dyn.d_tag == DT_NEEDED - && dyn.d_un.d_val == strindex) - { - _bfd_elf_strtab_delref (hash_table->dynstr, strindex); - return TRUE; - } - } - } + /* Save the SONAME because sometimes the linker emulation code + will need to know it. */ + elf_dt_name (abfd) = soname; - if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex)) - goto error_return; - } + ret = add_dt_needed_tag (info, soname, add_needed); + if (ret < 0) + goto error_return; - /* Save the SONAME, if there is one, because sometimes the - linker emulation code will need to know it. */ - if (*name == '\0') - name = basename (bfd_get_filename (abfd)); - elf_dt_name (abfd) = name; + /* If we have already included this dynamic object in the + link, just ignore it. There is no reason to include a + particular dynamic object more than once. */ + if (ret > 0) + return TRUE; } /* If this is a dynamic object, we always link against the .dynsym @@ -748,8 +763,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (!_bfd_elf_merge_symbol (abfd, info, name, isym, &sec, &value, sym_hash, &skip, &override, - &type_change_ok, &size_change_ok, - dt_needed)) + &type_change_ok, &size_change_ok)) goto error_free_vers; if (skip) @@ -778,7 +792,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) case bfd_link_hash_defweak: old_bfd = h->root.u.def.section->owner; break; - + case bfd_link_hash_common: old_bfd = h->root.u.c.p->section->owner; old_alignment = h->root.u.c.p->alignment_power; @@ -1006,7 +1020,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (definition || h->root.type == bfd_link_hash_common) if (!_bfd_elf_add_default_symbol (abfd, info, h, name, isym, &sec, &value, &dynsym, - override, dt_needed)) + override)) goto error_free_vers; if (definition && !dynamic) @@ -1050,49 +1064,21 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) break; } - if (dt_needed && definition + if (!add_needed && definition && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) != 0) { - bfd_size_type oldsize; - bfd_size_type strindex; - - /* The symbol from a DT_NEEDED object is referenced from - the regular object to create a dynamic executable. We - have to make sure there is a DT_NEEDED entry for it. */ - - dt_needed = FALSE; - oldsize = _bfd_elf_strtab_size (hash_table->dynstr); - strindex = _bfd_elf_strtab_add (hash_table->dynstr, - elf_dt_soname (abfd), FALSE); - if (strindex == (bfd_size_type) -1) + int ret; + + /* A symbol from a library loaded via DT_NEEDED of some + other library is referenced by a regular object. + Add a DT_NEEDED entry for it. */ + add_needed = TRUE; + ret = add_dt_needed_tag (info, elf_dt_name (abfd), add_needed); + if (ret < 0) goto error_free_vers; - if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr)) - { - asection *sdyn; - Elf_External_Dyn *dyncon, *dynconend; - - sdyn = bfd_get_section_by_name (hash_table->dynobj, - ".dynamic"); - BFD_ASSERT (sdyn != NULL); - - dyncon = (Elf_External_Dyn *) sdyn->contents; - dynconend = (Elf_External_Dyn *) (sdyn->contents + - sdyn->_raw_size); - for (; dyncon < dynconend; dyncon++) - { - Elf_Internal_Dyn dyn; - - elf_swap_dyn_in (hash_table->dynobj, - dyncon, &dyn); - BFD_ASSERT (dyn.d_tag != DT_NEEDED || - dyn.d_un.d_val != strindex); - } - } - - if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex)) - goto error_free_vers; + BFD_ASSERT (ret == 0); } } } @@ -1357,7 +1343,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && (info->strip != strip_all && info->strip != strip_debugger)) { asection *stabstr; - + stabstr = bfd_get_section_by_name (abfd, ".stabstr"); if (stabstr != NULL) { @@ -1372,7 +1358,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && !bfd_is_abs_section (stab->output_section)) { struct bfd_elf_section_data *secdata; - + secdata = elf_section_data (stab); if (! _bfd_link_section_stabs (abfd, & hash_table->stab_info, @@ -3949,7 +3935,8 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, case bfd_link_hash_undefined: case bfd_link_hash_undefweak: abfd = h->root.u.undef.abfd; - if ((abfd->flags & DYNAMIC) == 0 || elf_dt_soname (abfd) == NULL) + if ((abfd->flags & DYNAMIC) == 0 + || elf_dyn_lib_class (abfd) != DYN_DT_NEEDED) return FALSE; break; diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 17d5b02..76b3732 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -3156,8 +3156,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, and check to see if they exist by looking at their addresses. */ symbol = 0; - else if (info->shared - && info->unresolved_syms_in_objects == RM_IGNORE + else if (info->unresolved_syms_in_objects == RM_IGNORE && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT) symbol = 0; else if (strcmp (*namep, "_DYNAMIC_LINK") == 0 || @@ -3178,9 +3177,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.root.string, input_bfd, input_section, relocation->r_offset, - ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) - || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) - || ELF_ST_VISIBILITY (h->root.other))))) + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR) + || ELF_ST_VISIBILITY (h->root.other)))) return bfd_reloc_undefined; symbol = 0; } @@ -9028,10 +9026,10 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) which are automatically generated by gas. */ if (strcmp (sec->name, ".reginfo") && strcmp (sec->name, ".mdebug") - && ((!strcmp (sec->name, ".text") - || !strcmp (sec->name, ".data") - || !strcmp (sec->name, ".bss")) - && sec->_raw_size != 0)) + && (sec->_raw_size != 0 + || (strcmp (sec->name, ".text") + && strcmp (sec->name, ".data") + && strcmp (sec->name, ".bss")))) { null_input_bfd = FALSE; break; diff --git a/bfd/hppabsd-core.c b/bfd/hppabsd-core.c index 4d17ba5..ff88f9d 100644 --- a/bfd/hppabsd-core.c +++ b/bfd/hppabsd-core.c @@ -1,5 +1,5 @@ /* BFD back-end for HPPA BSD core files. - Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002 + Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -236,10 +236,12 @@ swap_abort () abort (); } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target hppabsd_core_vec = { @@ -254,26 +256,26 @@ const bfd_target hppabsd_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - hppabsd_core_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + hppabsd_core_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, BFD_JUMP_TABLE_GENERIC (_bfd_generic), @@ -289,5 +291,5 @@ const bfd_target hppabsd_core_vec = NULL, (PTR) 0 /* backend_data */ -}; + }; #endif diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c index 04d2911..30967c9 100644 --- a/bfd/hpux-core.c +++ b/bfd/hpux-core.c @@ -1,5 +1,5 @@ /* BFD back-end for HP/UX core files. - Copyright 1993, 1994, 1996, 1998, 1999, 2001, 2002 + Copyright 1993, 1994, 1996, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Stu Grossman, Cygnus Support. Converted to back-end form by Ian Lance Taylor, Cygnus SUpport @@ -348,10 +348,13 @@ swap_abort () { abort(); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target hpux_core_vec = { @@ -366,26 +369,26 @@ const bfd_target hpux_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - hpux_core_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + hpux_core_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, BFD_JUMP_TABLE_GENERIC (_bfd_generic), @@ -401,4 +404,4 @@ const bfd_target hpux_core_vec = NULL, (PTR) 0 /* backend_data */ -}; + }; diff --git a/bfd/irix-core.c b/bfd/irix-core.c index 1dd35fe..4868422 100644 --- a/bfd/irix-core.c +++ b/bfd/irix-core.c @@ -1,5 +1,5 @@ /* BFD back-end for Irix core files. - Copyright 1993, 1994, 1996, 1999, 2001, 2002 + Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc. Written by Stu Grossman, Cygnus Support. Converted to back-end form by Ian Lance Taylor, Cygnus Support @@ -299,10 +299,13 @@ swap_abort() { abort(); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target irix_core_vec = { @@ -317,26 +320,26 @@ const bfd_target irix_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - irix_core_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + irix_core_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, BFD_JUMP_TABLE_GENERIC (_bfd_generic), @@ -352,6 +355,6 @@ const bfd_target irix_core_vec = NULL, (PTR) 0 /* backend_data */ -}; + }; #endif /* IRIX_CORE */ diff --git a/bfd/libaout.h b/bfd/libaout.h index 960f9d0..87b49e5 100644 --- a/bfd/libaout.h +++ b/bfd/libaout.h @@ -29,51 +29,23 @@ #include "bfdlink.h" -/* Macros for accessing components in an aout header. Saves cluttering - the source with (bfd_vma) and (bfd_byte *) casts. */ - -#define H_PUT_64(abfd, val, where) \ - bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_32(abfd, val, where) \ - bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_16(abfd, val, where) \ - bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) +/* Macros for accessing components in an aout header. */ +#define H_PUT_64 bfd_h_put_64 +#define H_PUT_32 bfd_h_put_32 +#define H_PUT_16 bfd_h_put_16 #define H_PUT_8 bfd_h_put_8 - -#define H_PUT_S64(abfd, val, where) \ - bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_S32(abfd, val, where) \ - bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - -#define H_PUT_S16(abfd, val, where) \ - bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) - +#define H_PUT_S64 bfd_h_put_signed_64 +#define H_PUT_S32 bfd_h_put_signed_32 +#define H_PUT_S16 bfd_h_put_signed_16 #define H_PUT_S8 bfd_h_put_signed_8 - -#define H_GET_64(abfd, where) \ - bfd_h_get_64 ((abfd), (bfd_byte *) (where)) - -#define H_GET_32(abfd, where) \ - bfd_h_get_32 ((abfd), (bfd_byte *) (where)) - -#define H_GET_16(abfd, where) \ - bfd_h_get_16 ((abfd), (bfd_byte *) (where)) - +#define H_GET_64 bfd_h_get_64 +#define H_GET_32 bfd_h_get_32 +#define H_GET_16 bfd_h_get_16 #define H_GET_8 bfd_h_get_8 - -#define H_GET_S64(abfd, where) \ - bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where)) - -#define H_GET_S32(abfd, where) \ - bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where)) - -#define H_GET_S16(abfd, where) \ - bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where)) - +#define H_GET_S64 bfd_h_get_signed_64 +#define H_GET_S32 bfd_h_get_signed_32 +#define H_GET_S16 bfd_h_get_signed_16 #define H_GET_S8 bfd_h_get_signed_8 /* Parameterize the a.out code based on whether it is being built diff --git a/bfd/libbfd.c b/bfd/libbfd.c index abcf44f..be090e9 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -1,6 +1,6 @@ /* Assorted BFD support routines, only used internally. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003 + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Cygnus Support. @@ -266,7 +266,7 @@ DESCRIPTION .{* Byte swapping macros for user section data. *} . .#define bfd_put_8(abfd, val, ptr) \ -. ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) +. ((void) (*((unsigned char *) (ptr)) = (val) & 0xff)) .#define bfd_put_signed_8 \ . bfd_put_8 .#define bfd_get_8(abfd, ptr) \ @@ -367,103 +367,82 @@ DESCRIPTION .#define bfd_h_get_signed_64(abfd, ptr) \ . BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr)) . -.{* Refinements on the above, which should eventually go away. Save -. cluttering the source with (bfd_vma) and (bfd_byte *) casts. *} +.{* Aliases for the above, which should eventually go away. *} . -.#define H_PUT_64(abfd, val, where) \ -. bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_32(abfd, val, where) \ -. bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_16(abfd, val, where) \ -. bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_8 bfd_h_put_8 -. -.#define H_PUT_S64(abfd, val, where) \ -. bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_S32(abfd, val, where) \ -. bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_S16(abfd, val, where) \ -. bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where)) -. -.#define H_PUT_S8 bfd_h_put_signed_8 -. -.#define H_GET_64(abfd, where) \ -. bfd_h_get_64 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_32(abfd, where) \ -. bfd_h_get_32 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_16(abfd, where) \ -. bfd_h_get_16 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_8 bfd_h_get_8 -. -.#define H_GET_S64(abfd, where) \ -. bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_S32(abfd, where) \ -. bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_S16(abfd, where) \ -. bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where)) -. -.#define H_GET_S8 bfd_h_get_signed_8 +.#define H_PUT_64 bfd_h_put_64 +.#define H_PUT_32 bfd_h_put_32 +.#define H_PUT_16 bfd_h_put_16 +.#define H_PUT_8 bfd_h_put_8 +.#define H_PUT_S64 bfd_h_put_signed_64 +.#define H_PUT_S32 bfd_h_put_signed_32 +.#define H_PUT_S16 bfd_h_put_signed_16 +.#define H_PUT_S8 bfd_h_put_signed_8 +.#define H_GET_64 bfd_h_get_64 +.#define H_GET_32 bfd_h_get_32 +.#define H_GET_16 bfd_h_get_16 +.#define H_GET_8 bfd_h_get_8 +.#define H_GET_S64 bfd_h_get_signed_64 +.#define H_GET_S32 bfd_h_get_signed_32 +.#define H_GET_S16 bfd_h_get_signed_16 +.#define H_GET_S8 bfd_h_get_signed_8 . .*/ /* Sign extension to bfd_signed_vma. */ #define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000) #define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000) -#define EIGHT_GAZILLION ((BFD_HOST_64_BIT) 1 << 63) +#define EIGHT_GAZILLION ((bfd_int64_t) 1 << 63) #define COERCE64(x) \ - (((bfd_signed_vma) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION) + (((bfd_int64_t) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION) bfd_vma -bfd_getb16 (const bfd_byte *addr) +bfd_getb16 (const void *p) { + const bfd_byte *addr = p; return (addr[0] << 8) | addr[1]; } bfd_vma -bfd_getl16 (const bfd_byte *addr) +bfd_getl16 (const void *p) { + const bfd_byte *addr = p; return (addr[1] << 8) | addr[0]; } bfd_signed_vma -bfd_getb_signed_16 (const bfd_byte *addr) +bfd_getb_signed_16 (const void *p) { + const bfd_byte *addr = p; return COERCE16 ((addr[0] << 8) | addr[1]); } bfd_signed_vma -bfd_getl_signed_16 (const bfd_byte *addr) +bfd_getl_signed_16 (const void *p) { + const bfd_byte *addr = p; return COERCE16 ((addr[1] << 8) | addr[0]); } void -bfd_putb16 (bfd_vma data, bfd_byte *addr) +bfd_putb16 (bfd_vma data, void *p) { - addr[0] = (bfd_byte) (data >> 8); - addr[1] = (bfd_byte) data; + bfd_byte *addr = p; + addr[0] = (data >> 8) & 0xff; + addr[1] = data & 0xff; } void -bfd_putl16 (bfd_vma data, bfd_byte *addr) +bfd_putl16 (bfd_vma data, void *p) { - addr[0] = (bfd_byte) data; - addr[1] = (bfd_byte) (data >> 8); + bfd_byte *addr = p; + addr[0] = data & 0xff; + addr[1] = (data >> 8) & 0xff; } bfd_vma -bfd_getb32 (const bfd_byte *addr) +bfd_getb32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[0] << 24; @@ -474,8 +453,9 @@ bfd_getb32 (const bfd_byte *addr) } bfd_vma -bfd_getl32 (const bfd_byte *addr) +bfd_getl32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[0]; @@ -486,8 +466,9 @@ bfd_getl32 (const bfd_byte *addr) } bfd_signed_vma -bfd_getb_signed_32 (const bfd_byte *addr) +bfd_getb_signed_32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[0] << 24; @@ -498,8 +479,9 @@ bfd_getb_signed_32 (const bfd_byte *addr) } bfd_signed_vma -bfd_getl_signed_32 (const bfd_byte *addr) +bfd_getl_signed_32 (const void *p) { + const bfd_byte *addr = p; unsigned long v; v = (unsigned long) addr[0]; @@ -509,11 +491,12 @@ bfd_getl_signed_32 (const bfd_byte *addr) return COERCE32 (v); } -bfd_vma -bfd_getb64 (const bfd_byte *addr ATTRIBUTE_UNUSED) +bfd_uint64_t +bfd_getb64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 - bfd_vma v; +#ifdef BFD_HOST_64_BIT + const bfd_byte *addr = p; + bfd_uint64_t v; v = addr[0]; v <<= 8; v |= addr[1]; v <<= 8; @@ -531,11 +514,12 @@ bfd_getb64 (const bfd_byte *addr ATTRIBUTE_UNUSED) #endif } -bfd_vma -bfd_getl64 (const bfd_byte *addr ATTRIBUTE_UNUSED) +bfd_uint64_t +bfd_getl64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 - bfd_vma v; +#ifdef BFD_HOST_64_BIT + const bfd_byte *addr = p; + bfd_uint64_t v; v = addr[7]; v <<= 8; v |= addr[6]; v <<= 8; @@ -554,12 +538,12 @@ bfd_getl64 (const bfd_byte *addr ATTRIBUTE_UNUSED) } -bfd_signed_vma -bfd_getb_signed_64 (addr) - register const bfd_byte *addr ATTRIBUTE_UNUSED; +bfd_int64_t +bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 - bfd_vma v; +#ifdef BFD_HOST_64_BIT + const bfd_byte *addr = p; + bfd_uint64_t v; v = addr[0]; v <<= 8; v |= addr[1]; v <<= 8; @@ -577,12 +561,12 @@ bfd_getb_signed_64 (addr) #endif } -bfd_signed_vma -bfd_getl_signed_64 (addr) - register const bfd_byte *addr ATTRIBUTE_UNUSED; +bfd_int64_t +bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED) { -#ifdef BFD64 - bfd_vma v; +#ifdef BFD_HOST_64_BIT + const bfd_byte *addr = p; + bfd_uint64_t v; v = addr[7]; v <<= 8; v |= addr[6]; v <<= 8; @@ -601,60 +585,65 @@ bfd_getl_signed_64 (addr) } void -bfd_putb32 (bfd_vma data, bfd_byte *addr) +bfd_putb32 (bfd_vma data, void *p) { - addr[0] = (bfd_byte) (data >> 24); - addr[1] = (bfd_byte) (data >> 16); - addr[2] = (bfd_byte) (data >> 8); - addr[3] = (bfd_byte) data; + bfd_byte *addr = p; + addr[0] = (data >> 24) & 0xff; + addr[1] = (data >> 16) & 0xff; + addr[2] = (data >> 8) & 0xff; + addr[3] = data & 0xff; } void -bfd_putl32 (bfd_vma data, bfd_byte *addr) +bfd_putl32 (bfd_vma data, void *p) { - addr[0] = (bfd_byte) data; - addr[1] = (bfd_byte) (data >> 8); - addr[2] = (bfd_byte) (data >> 16); - addr[3] = (bfd_byte) (data >> 24); + bfd_byte *addr = p; + addr[0] = data & 0xff; + addr[1] = (data >> 8) & 0xff; + addr[2] = (data >> 16) & 0xff; + addr[3] = (data >> 24) & 0xff; } void -bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, bfd_byte *addr ATTRIBUTE_UNUSED) -{ -#ifdef BFD64 - addr[0] = (bfd_byte) (data >> (7*8)); - addr[1] = (bfd_byte) (data >> (6*8)); - addr[2] = (bfd_byte) (data >> (5*8)); - addr[3] = (bfd_byte) (data >> (4*8)); - addr[4] = (bfd_byte) (data >> (3*8)); - addr[5] = (bfd_byte) (data >> (2*8)); - addr[6] = (bfd_byte) (data >> (1*8)); - addr[7] = (bfd_byte) (data >> (0*8)); +bfd_putb64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) +{ +#ifdef BFD_HOST_64_BIT + bfd_byte *addr = p; + addr[0] = (data >> (7*8)) & 0xff; + addr[1] = (data >> (6*8)) & 0xff; + addr[2] = (data >> (5*8)) & 0xff; + addr[3] = (data >> (4*8)) & 0xff; + addr[4] = (data >> (3*8)) & 0xff; + addr[5] = (data >> (2*8)) & 0xff; + addr[6] = (data >> (1*8)) & 0xff; + addr[7] = (data >> (0*8)) & 0xff; #else BFD_FAIL(); #endif } void -bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, bfd_byte *addr ATTRIBUTE_UNUSED) -{ -#ifdef BFD64 - addr[7] = (bfd_byte) (data >> (7*8)); - addr[6] = (bfd_byte) (data >> (6*8)); - addr[5] = (bfd_byte) (data >> (5*8)); - addr[4] = (bfd_byte) (data >> (4*8)); - addr[3] = (bfd_byte) (data >> (3*8)); - addr[2] = (bfd_byte) (data >> (2*8)); - addr[1] = (bfd_byte) (data >> (1*8)); - addr[0] = (bfd_byte) (data >> (0*8)); +bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) +{ +#ifdef BFD_HOST_64_BIT + bfd_byte *addr = p; + addr[7] = (data >> (7*8)) & 0xff; + addr[6] = (data >> (6*8)) & 0xff; + addr[5] = (data >> (5*8)) & 0xff; + addr[4] = (data >> (4*8)) & 0xff; + addr[3] = (data >> (3*8)) & 0xff; + addr[2] = (data >> (2*8)) & 0xff; + addr[1] = (data >> (1*8)) & 0xff; + addr[0] = (data >> (0*8)) & 0xff; #else BFD_FAIL(); #endif } void -bfd_put_bits (bfd_vma data, bfd_byte *addr, int bits, bfd_boolean big_p) +bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) { + bfd_byte *addr = p; int i; int bytes; @@ -666,15 +655,16 @@ bfd_put_bits (bfd_vma data, bfd_byte *addr, int bits, bfd_boolean big_p) { int index = big_p ? bytes - i - 1 : i; - addr[index] = (bfd_byte) data; + addr[index] = data & 0xff; data >>= 8; } } -bfd_vma -bfd_get_bits (bfd_byte *addr, int bits, bfd_boolean big_p) +bfd_uint64_t +bfd_get_bits (const void *p, int bits, bfd_boolean big_p) { - bfd_vma data; + const bfd_byte *addr = p; + bfd_uint64_t data; int i; int bytes; diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 2dc8073..b5d6a72 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -522,7 +522,7 @@ bfd_mach_o_read_header (abfd, header) bfd_mach_o_header *header; { unsigned char buf[28]; - bfd_vma (*get32) PARAMS ((const bfd_byte *)) = NULL; + bfd_vma (*get32) (const void *) = NULL; bfd_seek (abfd, 0, SEEK_SET); diff --git a/bfd/netbsd-core.c b/bfd/netbsd-core.c index adadead..250c6f4 100644 --- a/bfd/netbsd-core.c +++ b/bfd/netbsd-core.c @@ -1,6 +1,6 @@ /* BFD back end for NetBSD style core files Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2001, - 2002, 2004 + 2002, 2003, 2004 Free Software Foundation, Inc. Written by Paul Kranenburg, EUR @@ -34,8 +34,6 @@ NetBSD/sparc64 overlaps with M_MIPS1. */ #define M_SPARC64_OPENBSD M_MIPS1 -/* FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof (struct trapframe)). */ - struct netbsd_core_struct { struct core core; @@ -63,7 +61,7 @@ netbsd_core_file_p (abfd) { int i, val; file_ptr offset; - asection *asect, *asect2; + asection *asect; struct core core; struct coreseg coreseg; bfd_size_type amt = sizeof core; @@ -143,24 +141,6 @@ netbsd_core_file_p (abfd) asect->alignment_power = 2; offset += coreseg.c_size; - -#ifdef CORE_FPU_OFFSET - switch (CORE_GETFLAG (coreseg)) - { - case CORE_CPU: - /* Hackish... */ - asect->_raw_size = CORE_FPU_OFFSET; - asect2 = bfd_make_section_anyway (abfd, ".reg2"); - if (asect2 == NULL) - goto punt; - asect2->_raw_size = coreseg.c_size - CORE_FPU_OFFSET; - asect2->vma = 0; - asect2->filepos = asect->filepos + CORE_FPU_OFFSET; - asect2->alignment_power = 2; - asect2->flags = SEC_ALLOC + SEC_HAS_CONTENTS; - break; - } -#endif } /* Set architecture from machine ID. */ @@ -228,10 +208,12 @@ swap_abort () abort (); } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target netbsd_core_vec = { @@ -246,39 +228,39 @@ const bfd_target netbsd_core_vec = 0, /* Symbol prefix. */ ' ', /* ar_pad_char. */ 16, /* ar_max_namelen. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs. */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs. */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data. */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data. */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data. */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs. */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs. */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs. */ { /* bfd_check_format. */ - _bfd_dummy_target, /* Unknown format. */ - _bfd_dummy_target, /* Object file. */ - _bfd_dummy_target, /* Archive. */ - netbsd_core_file_p /* A core file. */ + _bfd_dummy_target, /* Unknown format. */ + _bfd_dummy_target, /* Object file. */ + _bfd_dummy_target, /* Archive. */ + netbsd_core_file_p /* A core file. */ }, { /* bfd_set_format. */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents. */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, - BFD_JUMP_TABLE_GENERIC (_bfd_generic), - BFD_JUMP_TABLE_COPY (_bfd_generic), - BFD_JUMP_TABLE_CORE (netbsd), - BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), - BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), - BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), - BFD_JUMP_TABLE_WRITE (_bfd_generic), - BFD_JUMP_TABLE_LINK (_bfd_nolink), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + BFD_JUMP_TABLE_GENERIC (_bfd_generic), + BFD_JUMP_TABLE_COPY (_bfd_generic), + BFD_JUMP_TABLE_CORE (netbsd), + BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), + BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), + BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), + BFD_JUMP_TABLE_WRITE (_bfd_generic), + BFD_JUMP_TABLE_LINK (_bfd_nolink), + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, (PTR) 0 /* Backend_data. */ -}; + }; diff --git a/bfd/osf-core.c b/bfd/osf-core.c index 9ba0d18..8273504 100644 --- a/bfd/osf-core.c +++ b/bfd/osf-core.c @@ -1,5 +1,5 @@ /* BFD back-end for OSF/1 core files. - Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002 + Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -185,10 +185,13 @@ swap_abort() { abort(); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target osf_core_vec = { @@ -203,26 +206,26 @@ const bfd_target osf_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - osf_core_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + osf_core_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, BFD_JUMP_TABLE_GENERIC (_bfd_generic), @@ -238,4 +241,4 @@ const bfd_target osf_core_vec = NULL, (PTR) 0 /* backend_data */ -}; + }; diff --git a/bfd/pdp11.c b/bfd/pdp11.c index a4af824..95d2ccd 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -134,9 +134,9 @@ struct pdp11_external_nlist static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd)); #define MY_text_includes_header 1 -bfd_vma bfd_getp32 PARAMS ((const bfd_byte *)); -bfd_signed_vma bfd_getp_signed_32 PARAMS ((const bfd_byte *)); -void bfd_putp32 PARAMS ((bfd_vma, bfd_byte *)); +static bfd_vma bfd_getp32 (const void *); +static bfd_signed_vma bfd_getp_signed_32 (const void *); +static void bfd_putp32 (bfd_vma, void *); #define MY_BFD_TARGET @@ -5004,31 +5004,38 @@ aout_link_reloc_link_order (finfo, o, p) } /* end of modified aoutx.h */ -bfd_vma -bfd_getp32 (addr) - const bfd_byte *addr; +static bfd_vma +bfd_getp32 (const void *p) { - return (((((bfd_vma)addr[1] << 8) | addr[0]) << 8) - | addr[3]) << 8 | addr[2]; + const bfd_byte *addr = p; + unsigned long v; + v = (unsigned long) addr[1] << 24; + v |= (unsigned long) addr[0] << 16; + v |= (unsigned long) addr[3] << 8; + v |= (unsigned long) addr[2]; + return v; } #define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000) -bfd_signed_vma -bfd_getp_signed_32 (addr) - const bfd_byte *addr; +static bfd_signed_vma +bfd_getp_signed_32 (const void *p) { - return COERCE32((((((bfd_vma)addr[1] << 8) | addr[0]) << 8) - | addr[3]) << 8 | addr[2]); + const bfd_byte *addr = p; + unsigned long v; + v = (unsigned long) addr[1] << 24; + v |= (unsigned long) addr[0] << 16; + v |= (unsigned long) addr[3] << 8; + v |= (unsigned long) addr[2]; + return COERCE32 (v); } -void -bfd_putp32 (data, addr) - bfd_vma data; - bfd_byte *addr; +static void +bfd_putp32 (bfd_vma data, void *p) { - addr[0] = (bfd_byte)(data >> 16); - addr[1] = (bfd_byte)(data >> 24); - addr[2] = (bfd_byte)data; - addr[3] = (bfd_byte)(data >> 8); + bfd_byte *addr = p; + addr[0] = (data >> 16) & 0xff; + addr[1] = (data >> 24) & 0xff; + addr[2] = (data >> 0) & 0xff; + addr[3] = (data >> 8) & 0xff; } diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot index 5d4f234..3396c4f 100644 --- a/bfd/po/bfd.pot +++ b/bfd/po/bfd.pot @@ -1,12 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-07-17 14:52+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-03-19 14:59+1030\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -34,22 +36,22 @@ msgstr "" msgid "%s: Bad relocation record imported: %d" msgstr "" -#: aoutx.h:1295 aoutx.h:1716 +#: aoutx.h:1296 aoutx.h:1717 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" msgstr "" -#: aoutx.h:1682 +#: aoutx.h:1683 #, c-format msgid "" "%s: can not represent section for symbol `%s' in a.out object file format" msgstr "" -#: aoutx.h:1684 +#: aoutx.h:1685 msgid "*unknown*" msgstr "" -#: aoutx.h:3776 +#: aoutx.h:3777 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "" @@ -171,15 +173,16 @@ msgid "not mapping: data=%lx mapped=%d\n" msgstr "" #: bfdwin.c:205 +#, c-format msgid "not mapping: env var not set\n" msgstr "" -#: binary.c:306 +#: binary.c:308 #, c-format msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "" -#: coff-rs6000.c:3616 coff64-rs6000.c:2109 +#: coff64-rs6000.c:2108 coff-rs6000.c:3615 #, c-format msgid "%s: symbol `%s' has unrecognized smclas %d" msgstr "" @@ -212,169 +215,181 @@ msgstr "" msgid "using multiple gp values" msgstr "" -#: coff-arm.c:1066 elf32-arm.h:294 +#: coff-arm.c:1066 elf32-arm.h:465 #, c-format msgid "%s: unable to find THUMB glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1096 elf32-arm.h:329 +#: coff-arm.c:1096 elf32-arm.h:500 #, c-format msgid "%s: unable to find ARM glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999 +#: coff-arm.c:1400 coff-arm.c:1495 elf32-arm.h:1063 elf32-arm.h:1170 #, c-format msgid "%s(%s): warning: interworking not enabled." msgstr "" -#: coff-arm.c:1398 elf32-arm.h:1002 +#: coff-arm.c:1404 elf32-arm.h:1173 #, c-format msgid " first occurrence: %s: arm call to thumb" msgstr "" -#: coff-arm.c:1493 elf32-arm.h:895 +#: coff-arm.c:1499 elf32-arm.h:1066 #, c-format msgid " first occurrence: %s: thumb call to arm" msgstr "" -#: coff-arm.c:1496 +#: coff-arm.c:1502 msgid " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038 +#: coff-arm.c:1797 cofflink.c:2987 coff-tic80.c:687 #, c-format msgid "%s: bad reloc address 0x%lx in section `%s'" msgstr "" -#: coff-arm.c:2132 +#: coff-arm.c:2141 #, c-format msgid "%s: illegal symbol index in reloc: %d" msgstr "" -#: coff-arm.c:2265 +#: coff-arm.c:2274 #, c-format msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d" msgstr "" -#: coff-arm.c:2280 elf32-arm.h:2328 +#: coff-arm.c:2289 elf32-arm.h:2494 #, c-format msgid "" "ERROR: %s passes floats in float registers, whereas %s passes them in " "integer registers" msgstr "" -#: coff-arm.c:2283 elf32-arm.h:2333 +#: coff-arm.c:2292 elf32-arm.h:2499 #, c-format msgid "" "ERROR: %s passes floats in integer registers, whereas %s passes them in " "float registers" msgstr "" -#: coff-arm.c:2298 +#: coff-arm.c:2307 #, c-format msgid "" "ERROR: %s is compiled as position independent code, whereas target %s is " "absolute position" msgstr "" -#: coff-arm.c:2301 +#: coff-arm.c:2310 #, c-format msgid "" "ERROR: %s is compiled as absolute position code, whereas target %s is " "position independent" msgstr "" -#: coff-arm.c:2330 elf32-arm.h:2405 +#: coff-arm.c:2339 elf32-arm.h:2571 #, c-format msgid "Warning: %s supports interworking, whereas %s does not" msgstr "" -#: coff-arm.c:2333 elf32-arm.h:2412 +#: coff-arm.c:2342 elf32-arm.h:2578 #, c-format msgid "Warning: %s does not support interworking, whereas %s does" msgstr "" -#: coff-arm.c:2360 +#: coff-arm.c:2369 #, c-format msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2368 elf32-arm.h:2467 +#: coff-arm.c:2377 elf32-arm.h:2633 +#, c-format msgid " [floats passed in float registers]" msgstr "" -#: coff-arm.c:2370 +#: coff-arm.c:2379 +#, c-format msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2373 elf32-arm.h:2470 +#: coff-arm.c:2382 elf32-arm.h:2636 +#, c-format msgid " [position independent]" msgstr "" -#: coff-arm.c:2375 +#: coff-arm.c:2384 +#, c-format msgid " [absolute position]" msgstr "" -#: coff-arm.c:2379 +#: coff-arm.c:2388 +#, c-format msgid " [interworking flag not initialised]" msgstr "" -#: coff-arm.c:2381 +#: coff-arm.c:2390 +#, c-format msgid " [interworking supported]" msgstr "" -#: coff-arm.c:2383 +#: coff-arm.c:2392 +#, c-format msgid " [interworking not supported]" msgstr "" -#: coff-arm.c:2431 elf32-arm.h:2150 +#: coff-arm.c:2440 elf32-arm.h:2298 #, c-format msgid "" "Warning: Not setting interworking flag of %s since it has already been " "specified as non-interworking" msgstr "" -#: coff-arm.c:2435 elf32-arm.h:2154 +#: coff-arm.c:2444 elf32-arm.h:2302 #, c-format msgid "Warning: Clearing the interworking flag of %s due to outside request" msgstr "" -#: coffcode.h:1108 +#: coffcode.h:1112 #, c-format msgid "%s (%s): Section flag %s (0x%x) ignored" msgstr "" -#: coffcode.h:2214 +#: coffcode.h:2224 #, c-format msgid "Unrecognized TI COFF target id '0x%x'" msgstr "" -#: coffcode.h:4439 +#: coffcode.h:4428 +#, c-format +msgid "%s: warning: line number table read failed" +msgstr "" + +#: coffcode.h:4461 #, c-format msgid "%s: warning: illegal symbol index %ld in line numbers" msgstr "" -#: coffcode.h:4453 +#: coffcode.h:4475 #, c-format msgid "%s: warning: duplicate line number information for `%s'" msgstr "" -#: coffcode.h:4807 +#: coffcode.h:4831 #, c-format msgid "%s: Unrecognized storage class %d for %s symbol `%s'" msgstr "" -#: coffcode.h:4940 +#: coffcode.h:4964 #, c-format msgid "warning: %s: local symbol `%s' has no section" msgstr "" -#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5047 +#: coffcode.h:5071 coff-i860.c:610 coff-tic4x.c:218 coff-tic54x.c:366 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "" -#: coffcode.h:5085 +#: coffcode.h:5109 #, c-format msgid "%s: illegal relocation type %d at address 0x%lx" msgstr "" @@ -384,40 +399,45 @@ msgstr "" msgid "%s: bad string table size %lu" msgstr "" -#: coff-h8300.c:1047 +#: coff-h8300.c:1124 #, c-format msgid "cannot handle R_MEM_INDIRECT reloc when using %s output" msgstr "" +#: coff-i860.c:142 +#, c-format +msgid "Relocation `%s' not yet implemented\n" +msgstr "" + #: coff-i960.c:137 coff-i960.c:486 msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: cofflink.c:538 elflink.h:1276 +#: cofflink.c:506 elflink.h:945 #, c-format msgid "Warning: type of symbol `%s' changed from %d to %d in %s" msgstr "" -#: cofflink.c:2328 +#: cofflink.c:2293 #, c-format msgid "%s: relocs in section `%s', but it has no contents" msgstr "" -#: cofflink.c:2671 coffswap.h:890 +#: cofflink.c:2629 coffswap.h:890 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: cofflink.c:2680 coffswap.h:876 +#: cofflink.c:2638 coffswap.h:876 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783 +#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2153 elf32-mips.c:1405 msgid "unsupported reloc type" msgstr "" -#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554 +#: coff-mips.c:839 elf32-mips.c:795 elf64-mips.c:1490 elfn32-mips.c:1301 msgid "GP relative relocation when _gp not defined" msgstr "" @@ -431,17 +451,17 @@ msgstr "" msgid "reloc not properly aligned" msgstr "" -#: coff-rs6000.c:2790 +#: coff-rs6000.c:2789 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "" -#: coff-rs6000.c:2883 +#: coff-rs6000.c:2882 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "" -#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450 +#: coff-tic4x.c:170 coff-tic54x.c:281 coff-tic80.c:450 #, c-format msgid "Unrecognized reloc type 0x%x" msgstr "" @@ -461,72 +481,72 @@ msgstr "" msgid "warning: unable to update contents of %s section in %s" msgstr "" -#: dwarf2.c:380 +#: dwarf2.c:289 msgid "Dwarf Error: Can't find .debug_str section." msgstr "" -#: dwarf2.c:397 +#: dwarf2.c:306 #, c-format msgid "" "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str " "size (%lu)." msgstr "" -#: dwarf2.c:541 +#: dwarf2.c:441 msgid "Dwarf Error: Can't find .debug_abbrev section." msgstr "" -#: dwarf2.c:556 +#: dwarf2.c:456 #, c-format msgid "" "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size " "(%lu)." msgstr "" -#: dwarf2.c:756 +#: dwarf2.c:654 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %u." msgstr "" -#: dwarf2.c:933 +#: dwarf2.c:827 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "" -#: dwarf2.c:1032 +#: dwarf2.c:920 msgid "Dwarf Error: Can't find .debug_line section." msgstr "" -#: dwarf2.c:1049 +#: dwarf2.c:937 #, c-format msgid "" "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%" "lu)." msgstr "" -#: dwarf2.c:1255 +#: dwarf2.c:1142 msgid "Dwarf Error: mangled line number section." msgstr "" -#: dwarf2.c:1470 dwarf2.c:1620 +#: dwarf2.c:1352 dwarf2.c:1501 #, c-format msgid "Dwarf Error: Could not find abbrev number %u." msgstr "" -#: dwarf2.c:1581 +#: dwarf2.c:1462 #, c-format msgid "" "Dwarf Error: found dwarf version '%u', this reader only handles version 2 " "information." msgstr "" -#: dwarf2.c:1588 +#: dwarf2.c:1469 #, c-format msgid "" "Dwarf Error: found address size '%u', this reader can not handle sizes " "greater than '%u'." msgstr "" -#: dwarf2.c:1611 +#: dwarf2.c:1492 #, c-format msgid "Dwarf Error: Bad abbrev number: %u." msgstr "" @@ -592,269 +612,324 @@ msgid "" " Type: %s" msgstr "" -#: elf32-arm.h:1228 +#: elf32-arm.h:1428 #, c-format msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "" -#: elf32-arm.h:1424 +#: elf32-arm.h:1624 #, c-format msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "" -#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613 +#: elf32-arm.h:2092 elf32-sh.c:4819 elf64-sh64.c:1596 #, c-format msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section" msgstr "" -#: elf32-arm.h:2012 +#: elf32-arm.h:2184 #, c-format msgid "" "%s: warning: unresolvable relocation %d against symbol `%s' from %s section" msgstr "" -#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812 -#: elf32-cris.c:1390 elf32-d10v.c:482 elf32-fr30.c:634 elf32-frv.c:815 -#: elf32-h8300.c:509 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699 -#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510 -#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976 -#: elf64-mmix.c:1332 +#: elf32-arm.h:2236 elf32-avr.c:812 elf32-cris.c:1352 elf32-d10v.c:579 +#: elf32-fr30.c:634 elf32-frv.c:2499 elf32-h8300.c:509 elf32-i860.c:1218 +#: elf32-ip2k.c:1565 elf32-iq2000.c:665 elf32-m32r.c:3202 elf32-m68hc1x.c:1214 +#: elf32-msp430.c:510 elf32-openrisc.c:436 elf32-v850.c:1777 +#: elf32-xstormy16.c:976 elf64-mmix.c:1545 elf-m10200.c:442 elf-m10300.c:1677 msgid "internal error: out of range error" msgstr "" -#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816 -#: elf32-cris.c:1394 elf32-d10v.c:486 elf32-fr30.c:638 elf32-frv.c:819 -#: elf32-h8300.c:513 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287 -#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440 -#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452 +#: elf32-arm.h:2240 elf32-avr.c:816 elf32-cris.c:1356 elf32-d10v.c:583 +#: elf32-fr30.c:638 elf32-frv.c:2503 elf32-h8300.c:513 elf32-i860.c:1222 +#: elf32-iq2000.c:669 elf32-m32r.c:3206 elf32-m68hc1x.c:1218 +#: elf32-msp430.c:514 elf32-openrisc.c:440 elf32-v850.c:1781 +#: elf32-xstormy16.c:980 elf64-mmix.c:1549 elf-m10200.c:446 elf-m10300.c:1681 +#: elfxx-mips.c:6470 msgid "internal error: unsupported relocation error" msgstr "" -#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:490 -#: elf32-h8300.c:517 elf32-m32r.c:1291 elf32-m68hc1x.c:1313 +#: elf32-arm.h:2244 elf32-d10v.c:587 elf32-h8300.c:517 elf32-m32r.c:3210 +#: elf32-m68hc1x.c:1222 elf-m10200.c:450 elf-m10300.c:1685 msgid "internal error: dangerous error" msgstr "" -#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824 -#: elf32-cris.c:1402 elf32-d10v.c:494 elf32-fr30.c:646 elf32-frv.c:827 -#: elf32-h8300.c:521 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711 -#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522 -#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988 -#: elf64-mmix.c:1344 +#: elf32-arm.h:2248 elf32-avr.c:824 elf32-cris.c:1364 elf32-d10v.c:591 +#: elf32-fr30.c:646 elf32-frv.c:2511 elf32-h8300.c:521 elf32-i860.c:1230 +#: elf32-ip2k.c:1580 elf32-iq2000.c:677 elf32-m32r.c:3214 elf32-m68hc1x.c:1226 +#: elf32-msp430.c:522 elf32-openrisc.c:448 elf32-v850.c:1801 +#: elf32-xstormy16.c:988 elf64-mmix.c:1557 elf-m10200.c:454 elf-m10300.c:1689 msgid "internal error: unknown error" msgstr "" -#: elf32-arm.h:2202 +#: elf32-arm.h:2350 #, c-format msgid "" "Warning: Clearing the interworking flag of %s because non-interworking code " "in %s has been linked with it" msgstr "" -#: elf32-arm.h:2302 +#: elf32-arm.h:2468 #, c-format msgid "" "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for " "version %d" msgstr "" -#: elf32-arm.h:2316 +#: elf32-arm.h:2482 #, c-format msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d" msgstr "" -#: elf32-arm.h:2344 +#: elf32-arm.h:2510 #, c-format msgid "ERROR: %s uses VFP instructions, whereas %s does not" msgstr "" -#: elf32-arm.h:2349 +#: elf32-arm.h:2515 #, c-format msgid "ERROR: %s uses FPA instructions, whereas %s does not" msgstr "" -#: elf32-arm.h:2360 elf32-arm.h:2365 +#: elf32-arm.h:2526 #, c-format msgid "ERROR: %s uses Maverick instructions, whereas %s does not" msgstr "" -#: elf32-arm.h:2385 +#: elf32-arm.h:2531 +#, c-format +msgid "ERROR: %s does not use Maverick instructions, whereas %s does" +msgstr "" + +#: elf32-arm.h:2551 #, c-format msgid "ERROR: %s uses software FP, whereas %s uses hardware FP" msgstr "" -#: elf32-arm.h:2390 +#: elf32-arm.h:2556 #, c-format msgid "ERROR: %s uses hardware FP, whereas %s uses software FP" msgstr "" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. -#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397 -#: elf32-vax.c:546 elfxx-mips.c:9240 +#. Ignore init flag - it may not be set, despite the flags field containing valid data. +#: elf32-arm.h:2609 elf32-cris.c:2938 elf32-m68hc1x.c:1362 elf32-m68k.c:397 +#: elf32-vax.c:546 elfxx-mips.c:9179 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.h:2452 +#: elf32-arm.h:2618 +#, c-format msgid " [interworking enabled]" msgstr "" -#: elf32-arm.h:2460 +#: elf32-arm.h:2626 +#, c-format msgid " [VFP float format]" msgstr "" -#: elf32-arm.h:2462 +#: elf32-arm.h:2628 +#, c-format msgid " [Maverick float format]" msgstr "" -#: elf32-arm.h:2464 +#: elf32-arm.h:2630 +#, c-format msgid " [FPA float format]" msgstr "" -#: elf32-arm.h:2473 +#: elf32-arm.h:2639 +#, c-format msgid " [new ABI]" msgstr "" -#: elf32-arm.h:2476 +#: elf32-arm.h:2642 +#, c-format msgid " [old ABI]" msgstr "" -#: elf32-arm.h:2479 +#: elf32-arm.h:2645 +#, c-format msgid " [software FP]" msgstr "" -#: elf32-arm.h:2488 +#: elf32-arm.h:2654 +#, c-format msgid " [Version1 EABI]" msgstr "" -#: elf32-arm.h:2491 elf32-arm.h:2502 +#: elf32-arm.h:2657 elf32-arm.h:2668 +#, c-format msgid " [sorted symbol table]" msgstr "" -#: elf32-arm.h:2493 elf32-arm.h:2504 +#: elf32-arm.h:2659 elf32-arm.h:2670 +#, c-format msgid " [unsorted symbol table]" msgstr "" -#: elf32-arm.h:2499 +#: elf32-arm.h:2665 +#, c-format msgid " [Version2 EABI]" msgstr "" -#: elf32-arm.h:2507 +#: elf32-arm.h:2673 +#, c-format msgid " [dynamic symbols use segment index]" msgstr "" -#: elf32-arm.h:2510 +#: elf32-arm.h:2676 +#, c-format msgid " [mapping symbols precede others]" msgstr "" -#: elf32-arm.h:2517 +#: elf32-arm.h:2683 +#, c-format msgid " <EABI version unrecognised>" msgstr "" -#: elf32-arm.h:2524 +#: elf32-arm.h:2690 +#, c-format msgid " [relocatable executable]" msgstr "" -#: elf32-arm.h:2527 +#: elf32-arm.h:2693 +#, c-format msgid " [has entry point]" msgstr "" -#: elf32-arm.h:2532 +#: elf32-arm.h:2698 +#, c-format msgid "<Unrecognised flag bits set>" msgstr "" -#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823 -#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518 +#: elf32-avr.c:820 elf32-cris.c:1360 elf32-fr30.c:642 elf32-frv.c:2507 +#: elf32-i860.c:1226 elf32-ip2k.c:1576 elf32-iq2000.c:673 elf32-msp430.c:518 #: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984 -#: elf64-mmix.c:1340 +#: elf64-mmix.c:1553 msgid "internal error: dangerous relocation" msgstr "" -#: elf32-cris.c:931 +#: elf32-cris.c:918 #, c-format msgid "%s: unresolvable relocation %s against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:993 +#: elf32-cris.c:964 #, c-format msgid "" "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:996 elf32-cris.c:1122 +#: elf32-cris.c:967 elf32-cris.c:1093 msgid "[whose name is lost]" msgstr "" -#: elf32-cris.c:1111 +#: elf32-cris.c:1082 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against local symbol from %s " "section" msgstr "" -#: elf32-cris.c:1118 +#: elf32-cris.c:1089 #, c-format msgid "" "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section" msgstr "" -#: elf32-cris.c:1143 +#: elf32-cris.c:1114 #, c-format msgid "" "%s: relocation %s is not allowed for global symbol: `%s' from %s section" msgstr "" -#: elf32-cris.c:1158 +#: elf32-cris.c:1129 #, c-format msgid "%s: relocation %s in section %s with no GOT created" msgstr "" -#: elf32-cris.c:1277 +#: elf32-cris.c:1248 #, c-format msgid "%s: Internal inconsistency; no relocation section %s" msgstr "" -#: elf32-cris.c:2500 +#: elf32-cris.c:2463 #, c-format msgid "" "%s, section %s:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" msgstr "" -#: elf32-cris.c:2978 +#: elf32-cris.c:2941 +#, c-format msgid " [symbols have a _ prefix]" msgstr "" -#: elf32-cris.c:3017 +#: elf32-cris.c:2980 #, c-format msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols" msgstr "" -#: elf32-cris.c:3018 +#: elf32-cris.c:2981 #, c-format msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols" msgstr "" -#: elf32-frv.c:1223 +#: elf32-frv.c:2013 +msgid "Dynamic relocation references symbol with nonzero addend" +msgstr "" + +#: elf32-frv.c:2026 +msgid "relocation references symbol not defined in the module" +msgstr "" + +#: elf32-frv.c:2120 +msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend" +msgstr "" + +#: elf32-frv.c:2158 elf32-frv.c:2257 +msgid "cannot emit fixups in read-only section" +msgstr "" + +#: elf32-frv.c:2181 elf32-frv.c:2294 +msgid "cannot emit dynamic relocations in read-only section" +msgstr "" + +#: elf32-frv.c:2216 +msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend" +msgstr "" + +#: elf32-frv.c:2386 +msgid "relocations between different segments are not supported" +msgstr "" + +#: elf32-frv.c:2387 +msgid "warning: relocation references a different segment" +msgstr "" + +#: elf32-frv.c:4390 #, c-format msgid "" "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "" -#: elf32-frv.c:1273 elf32-iq2000.c:895 +#: elf32-frv.c:4443 elf32-iq2000.c:861 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "" -#: elf32-frv.c:1285 +#: elf32-frv.c:4455 #, c-format msgid "" "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%" "lx)" msgstr "" -#: elf32-frv.c:1321 elf32-iq2000.c:933 +#: elf32-frv.c:4491 elf32-iq2000.c:899 #, c-format msgid "private flags = 0x%lx:" msgstr "" @@ -864,51 +939,57 @@ msgstr "" msgid "%s: Relocations in generic ELF (EM: %d)" msgstr "" -#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118 +#: elf32-hppa.c:542 elf32-m68hc1x.c:170 elf64-ppc.c:3186 #, c-format msgid "%s: cannot create stub entry %s" msgstr "" -#: elf32-hppa.c:957 elf32-hppa.c:3538 +#: elf32-hppa.c:795 elf32-hppa.c:3326 #, c-format msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "" -#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797 +#: elf32-hppa.c:1166 elf64-x86-64.c:665 elf64-x86-64.c:790 #, c-format msgid "" "%s: relocation %s can not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1360 +#: elf32-hppa.c:1186 #, c-format msgid "" "%s: relocation %s should not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1553 +#: elf32-hppa.c:1378 #, c-format msgid "Could not find relocation section for %s" msgstr "" -#: elf32-hppa.c:2828 +#: elf32-hppa.c:2584 #, c-format msgid "%s: duplicate export stub %s" msgstr "" -#: elf32-hppa.c:3416 +#: elf32-hppa.c:3174 +#, c-format +msgid "" +"%s(%s+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" +msgstr "" + +#: elf32-hppa.c:3204 #, c-format msgid "%s(%s+0x%lx): fixing %s" msgstr "" -#: elf32-hppa.c:4039 +#: elf32-hppa.c:3820 #, c-format msgid "%s(%s+0x%lx): cannot handle %s for %s" msgstr "" -#: elf32-hppa.c:4357 +#: elf32-hppa.c:4113 msgid ".got section not immediately after .plt section" msgstr "" @@ -917,33 +998,33 @@ msgstr "" msgid "%s: invalid relocation type %d" msgstr "" -#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637 -#: elf64-s390.c:943 elf64-x86-64.c:650 +#: elf32-i386.c:864 elf32-s390.c:983 elf32-sparc.c:916 elf32-xtensa.c:648 +#: elf64-s390.c:936 elf64-x86-64.c:643 #, c-format msgid "%s: bad symbol index: %d" msgstr "" -#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011 -#: elf64-s390.c:1129 +#: elf32-i386.c:972 elf32-s390.c:1161 elf32-sh.c:6603 elf32-sparc.c:1040 +#: elf64-s390.c:1122 #, c-format msgid "%s: `%s' accessed both as normal and thread local symbol" msgstr "" -#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243 -#: elf64-x86-64.c:886 +#: elf32-i386.c:1089 elf32-s390.c:1272 elf64-ppc.c:4018 elf64-s390.c:1236 +#: elf64-x86-64.c:879 #, c-format msgid "%s: bad relocation section name `%s'" msgstr "" -#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879 -#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664 -#: elf64-x86-64.c:2452 +#: elf32-i386.c:2897 elf32-m68k.c:1717 elf32-s390.c:3007 elf32-sparc.c:2868 +#: elf32-xtensa.c:2119 elf64-s390.c:3003 elf64-sparc.c:2631 +#: elf64-x86-64.c:2400 #, c-format msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'" msgstr "" -#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068 -#: elf64-x86-64.c:2490 +#: elf32-i386.c:2936 elf32-m68k.c:1756 elf32-s390.c:3057 elf64-s390.c:3053 +#: elf64-x86-64.c:2438 #, c-format msgid "%s(%s+0x%lx): reloc against `%s': error %d" msgstr "" @@ -968,130 +1049,155 @@ msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)." msgstr "" #. Only if it's not an unresolved symbol. -#: elf32-ip2k.c:1593 +#: elf32-ip2k.c:1572 msgid "unsupported relocation between data/insn address spaces" msgstr "" -#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072 -#: elfxx-mips.c:9197 +#: elf32-iq2000.c:873 elf32-m68hc1x.c:1336 elf32-ppc.c:2293 elf64-sparc.c:3039 +#: elfxx-mips.c:9140 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" -#: elf32-m32r.c:930 +#: elf32-m32r.c:1487 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "" -#: elf32-ia64.c:3817 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 -#: elf64-ia64.c:3817 +#: elf32-m32r.c:2575 elf64-alpha.c:4199 elf64-alpha.c:4325 elf32-ia64.c:3920 +#: elf64-ia64.c:3920 #, c-format msgid "%s: unknown relocation type %d" msgstr "" -#: elf32-m32r.c:1226 +#: elf32-m32r.c:2763 elf64-sh64.c:1689 elf-hppa.h:1387 elf-hppa.h:1421 +#: elf-hppa.h:1437 elf-m10300.c:1632 +#, c-format +msgid "" +"%s: warning: unresolvable relocation against symbol `%s' from %s section" +msgstr "" + +#: elf32-m32r.c:3139 #, c-format msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" msgstr "" -#: elf32-m32r.c:1952 +#: elf32-m32r.c:4222 #, c-format msgid "%s: Instruction set mismatch with previous modules" msgstr "" -#: elf32-m32r.c:1975 +#: elf32-m32r.c:4245 #, c-format msgid "private flags = %lx" msgstr "" -#: elf32-m32r.c:1980 +#: elf32-m32r.c:4250 +#, c-format msgid ": m32r instructions" msgstr "" -#: elf32-m32r.c:1981 +#: elf32-m32r.c:4251 +#, c-format msgid ": m32rx instructions" msgstr "" -#: elf32-m68hc1x.c:1217 +#: elf32-m32r.c:4252 +#, c-format +msgid ": m32r2 instructions" +msgstr "" + +#: elf32-m68hc1x.c:1126 #, c-format msgid "" "Reference to the far symbol `%s' using a wrong relocation may result in " "incorrect execution" msgstr "" -#: elf32-m68hc1x.c:1240 +#: elf32-m68hc1x.c:1149 #, c-format msgid "" "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked " "address [%lx:%04lx] (%lx)" msgstr "" -#: elf32-m68hc1x.c:1259 +#: elf32-m68hc1x.c:1168 #, c-format msgid "" "reference to a banked address [%lx:%04lx] in the normal address space at %" "04lx" msgstr "" -#: elf32-m68hc1x.c:1396 +#: elf32-m68hc1x.c:1301 #, c-format msgid "" "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-" "bit integers" msgstr "" -#: elf32-m68hc1x.c:1404 +#: elf32-m68hc1x.c:1309 #, c-format msgid "" "%s: linking files compiled for 32-bit double (-fshort-double) and others for " "64-bit double" msgstr "" -#: elf32-m68hc1x.c:1414 +#: elf32-m68hc1x.c:1319 #, c-format msgid "%s: linking files compiled for HCS12 with others compiled for HC12" msgstr "" -#: elf32-m68hc1x.c:1462 +#: elf32-m68hc1x.c:1365 +#, c-format msgid "[abi=32-bit int, " msgstr "" -#: elf32-m68hc1x.c:1464 +#: elf32-m68hc1x.c:1367 +#, c-format msgid "[abi=16-bit int, " msgstr "" -#: elf32-m68hc1x.c:1467 +#: elf32-m68hc1x.c:1370 +#, c-format msgid "64-bit double, " msgstr "" -#: elf32-m68hc1x.c:1469 +#: elf32-m68hc1x.c:1372 +#, c-format msgid "32-bit double, " msgstr "" -#: elf32-m68hc1x.c:1472 +#: elf32-m68hc1x.c:1375 +#, c-format msgid "cpu=HC11]" msgstr "" -#: elf32-m68hc1x.c:1474 +#: elf32-m68hc1x.c:1377 +#, c-format msgid "cpu=HCS12]" msgstr "" -#: elf32-m68hc1x.c:1476 +#: elf32-m68hc1x.c:1379 +#, c-format msgid "cpu=HC12]" msgstr "" -#: elf32-m68hc1x.c:1479 +#: elf32-m68hc1x.c:1382 +#, c-format msgid " [memory=bank-model]" msgstr "" -#: elf32-m68hc1x.c:1481 +#: elf32-m68hc1x.c:1384 +#, c-format msgid " [memory=flat]" msgstr "" #: elf32-m68k.c:400 +#, c-format msgid " [cpu32]" msgstr "" #: elf32-m68k.c:403 +#, c-format msgid " [m68000]" msgstr "" @@ -1105,230 +1211,239 @@ msgstr "" msgid "%s: Unknown relocation type %d\n" msgstr "" -#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664 -msgid "32bits gp relative relocation occurs for an external symbol" -msgstr "" - -#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783 +#: elf32-mips.c:968 elf64-mips.c:1693 elfn32-mips.c:1488 #, c-format msgid "Linking mips16 objects into %s format is not supported" msgstr "" -#: elf32-ppc.c:2056 +#: elf32-ppc.c:2174 #, c-format msgid "generic linker can't handle %s" msgstr "" -#: elf32-ppc.c:2138 +#: elf32-ppc.c:2256 #, c-format msgid "" "%s: compiled with -mrelocatable and linked with modules compiled normally" msgstr "" -#: elf32-ppc.c:2147 +#: elf32-ppc.c:2265 #, c-format msgid "" "%s: compiled normally and linked with modules compiled with -mrelocatable" msgstr "" -#: elf32-ppc.c:3413 +#: elf32-ppc.c:3545 #, c-format msgid "%s: relocation %s cannot be used when making a shared object" msgstr "" -#. It does not make sense to have a procedure linkage -#. table entry for a local symbol. -#: elf32-ppc.c:3619 +#: elf32-ppc.c:3751 #, c-format msgid "%s(%s+0x%lx): %s reloc against local symbol" msgstr "" -#: elf32-ppc.c:4862 elf64-ppc.c:7789 +#: elf32-ppc.c:4956 elf64-ppc.c:8015 #, c-format msgid "%s: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:5113 +#: elf32-ppc.c:5207 #, c-format msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "" -#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484 +#: elf32-ppc.c:5518 elf32-ppc.c:5544 elf32-ppc.c:5603 #, c-format msgid "" "%s: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:5539 +#: elf32-ppc.c:5658 #, c-format msgid "%s: relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-ppc.c:5594 elf64-ppc.c:8461 +#: elf32-ppc.c:5713 elf64-ppc.c:8687 #, c-format msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "" -#: elf32-ppc.c:5644 elf64-ppc.c:8507 +#: elf32-ppc.c:5763 elf64-ppc.c:8733 #, c-format msgid "%s(%s+0x%lx): %s reloc against `%s': error %d" msgstr "" -#: elf32-ppc.c:5888 +#: elf32-ppc.c:6007 #, c-format msgid "corrupt or empty %s section in %s" msgstr "" -#: elf32-ppc.c:5895 +#: elf32-ppc.c:6014 #, c-format msgid "unable to read in %s section from %s" msgstr "" -#: elf32-ppc.c:5901 +#: elf32-ppc.c:6020 #, c-format msgid "corrupt %s section in %s" msgstr "" -#: elf32-ppc.c:5944 +#: elf32-ppc.c:6063 #, c-format msgid "warning: unable to set size of %s section in %s" msgstr "" -#: elf32-ppc.c:5994 +#: elf32-ppc.c:6113 msgid "failed to allocate space for new APUinfo section." msgstr "" -#: elf32-ppc.c:6013 +#: elf32-ppc.c:6132 msgid "failed to compute new APUinfo section." msgstr "" -#: elf32-ppc.c:6016 +#: elf32-ppc.c:6135 msgid "failed to install new APUinfo section." msgstr "" -#: elf32-s390.c:2256 elf64-s390.c:2226 +#: elf32-s390.c:2245 elf64-s390.c:2215 #, c-format msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s" msgstr "" -#: elf32-sh64.c:221 elf64-sh64.c:2407 +#: elf32-sh64.c:215 elf64-sh64.c:2382 #, c-format msgid "%s: compiled as 32-bit object and %s is 64-bit" msgstr "" -#: elf32-sh64.c:224 elf64-sh64.c:2410 +#: elf32-sh64.c:218 elf64-sh64.c:2385 #, c-format msgid "%s: compiled as 64-bit object and %s is 32-bit" msgstr "" -#: elf32-sh64.c:226 elf64-sh64.c:2412 +#: elf32-sh64.c:220 elf64-sh64.c:2387 #, c-format msgid "%s: object size does not match that of target %s" msgstr "" -#: elf32-sh64.c:461 elf64-sh64.c:2990 +#: elf32-sh64.c:442 elf64-sh64.c:2954 #, c-format msgid "%s: encountered datalabel symbol in input" msgstr "" -#: elf32-sh64.c:544 +#: elf32-sh64.c:519 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" msgstr "" -#: elf32-sh64.c:547 +#: elf32-sh64.c:522 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" msgstr "" -#: elf32-sh64.c:565 +#: elf32-sh64.c:540 #, c-format msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" msgstr "" -#: elf32-sh64.c:614 elf64-sh64.c:1748 +#: elf32-sh64.c:589 elf64-sh64.c:1735 #, c-format msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" msgstr "" -#: elf32-sh64.c:698 +#: elf32-sh64.c:670 #, c-format msgid "%s: could not write out added .cranges entries" msgstr "" -#: elf32-sh64.c:760 +#: elf32-sh64.c:732 #, c-format msgid "%s: could not write out sorted .cranges entries" msgstr "" -#: elf32-sh.c:2103 +#: elf32-sh.c:2252 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES offset" msgstr "" -#: elf32-sh.c:2115 +#: elf32-sh.c:2264 #, c-format msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" msgstr "" -#: elf32-sh.c:2132 +#: elf32-sh.c:2281 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES load offset" msgstr "" -#: elf32-sh.c:2147 +#: elf32-sh.c:2296 #, c-format msgid "%s: 0x%lx: warning: could not find expected reloc" msgstr "" -#: elf32-sh.c:2175 +#: elf32-sh.c:2324 #, c-format msgid "%s: 0x%lx: warning: symbol in unexpected section" msgstr "" -#: elf32-sh.c:2300 +#: elf32-sh.c:2449 #, c-format msgid "%s: 0x%lx: warning: could not find expected COUNT reloc" msgstr "" -#: elf32-sh.c:2309 +#: elf32-sh.c:2458 #, c-format msgid "%s: 0x%lx: warning: bad count" msgstr "" -#: elf32-sh.c:2712 elf32-sh.c:3088 +#: elf32-sh.c:2858 elf32-sh.c:3227 #, c-format msgid "%s: 0x%lx: fatal: reloc overflow while relaxing" msgstr "" -#: elf32-sh.c:4654 elf64-sh64.c:1585 +#: elf32-sh.c:4767 elf64-sh64.c:1568 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "" -#: elf32-sh.c:4809 +#: elf32-sh.c:4924 #, c-format msgid "%s: unresolvable relocation against symbol `%s' from %s section" msgstr "" -#: elf32-sh.c:4881 +#: elf32-sh.c:4997 #, c-format msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "" -#: elf32-sh.c:6627 elf64-alpha.c:4848 +#: elf32-sh.c:5030 elf32-sh.c:5045 +#, c-format +msgid "%s: 0x%lx: fatal: unaligned %s relocation 0x%lx" +msgstr "" + +#: elf32-sh.c:5059 +#, c-format +msgid "%s: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32" +msgstr "" + +#: elf32-sh.c:5073 +#, c-format +msgid "%s: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32" +msgstr "" + +#: elf32-sh.c:6815 elf64-alpha.c:4744 #, c-format msgid "%s: TLS local exec code cannot be linked into shared objects" msgstr "" -#: elf32-sparc.c:2521 elf64-sparc.c:2314 +#: elf32-sparc.c:2510 elf64-sparc.c:2281 #, c-format msgid "%s: probably compiled without -fPIC?" msgstr "" -#: elf32-sparc.c:3348 +#: elf32-sparc.c:3336 #, c-format msgid "%s: compiled for a 64 bit system and target is 32 bit" msgstr "" -#: elf32-sparc.c:3362 +#: elf32-sparc.c:3350 #, c-format msgid "%s: linking little endian files with big endian files" msgstr "" @@ -1363,6 +1478,7 @@ msgid "" msgstr "" #: elf32-v850.c:1144 +#, c-format msgid "FAILED to find previous HI16 reloc\n" msgstr "" @@ -1378,33 +1494,43 @@ msgstr "" msgid "could not locate special linker symbol __ctbp" msgstr "" -#: elf32-v850.c:1963 +#: elf32-v850.c:1982 #, c-format msgid "%s: Architecture mismatch with previous modules" msgstr "" -#: elf32-v850.c:1983 +#: elf32-v850.c:2003 #, c-format msgid "private flags = %lx: " msgstr "" -#: elf32-v850.c:1988 +#: elf32-v850.c:2008 +#, c-format msgid "v850 architecture" msgstr "" -#: elf32-v850.c:1989 +#: elf32-v850.c:2009 +#, c-format msgid "v850e architecture" msgstr "" +#: elf32-v850.c:2010 +#, c-format +msgid "v850e1 architecture" +msgstr "" + #: elf32-vax.c:549 +#, c-format msgid " [nonpic]" msgstr "" #: elf32-vax.c:552 +#, c-format msgid " [d-float]" msgstr "" #: elf32-vax.c:555 +#, c-format msgid " [g-float]" msgstr "" @@ -1415,79 +1541,88 @@ msgid "" "%ld" msgstr "" -#: elf32-vax.c:1667 +#: elf32-vax.c:1645 #, c-format msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" msgstr "" -#: elf32-vax.c:1802 +#: elf32-vax.c:1771 #, c-format msgid "%s: warning: %s relocation against symbol `%s' from %s section" msgstr "" -#: elf32-vax.c:1808 +#: elf32-vax.c:1777 #, c-format msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "" -#: elf32-ia64.c:2326 elf32-xstormy16.c:462 elf64-ia64.c:2326 +#: elf32-xstormy16.c:462 elf32-ia64.c:2417 elf64-ia64.c:2417 msgid "non-zero addend in @fptr reloc" msgstr "" -#: elf64-alpha.c:1108 +#: elf64-alpha.c:1067 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "" -#: elf64-alpha.c:3731 +#: elf64-alpha.c:3565 +#, c-format +msgid "Symbol %s has no GOT subsection for offset 0x%x" +msgstr "" + +#: elf64-alpha.c:3651 #, c-format msgid "%s: .got subsegment exceeds 64K (size %d)" msgstr "" -#: elf64-alpha.c:4602 elf64-alpha.c:4614 +#: elf64-alpha.c:4498 elf64-alpha.c:4510 #, c-format msgid "%s: gp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4640 elf64-alpha.c:4773 +#: elf64-alpha.c:4536 elf64-alpha.c:4669 #, c-format msgid "%s: pc-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4668 +#: elf64-alpha.c:4564 #, c-format msgid "%s: change in gp: BRSGP %s" msgstr "" -#: elf64-alpha.c:4693 +#: elf64-alpha.c:4589 msgid "<unknown>" msgstr "" -#: elf64-alpha.c:4698 +#: elf64-alpha.c:4594 #, c-format msgid "%s: !samegp reloc against symbol without .prologue: %s" msgstr "" -#: elf64-alpha.c:4749 +#: elf64-alpha.c:4645 #, c-format msgid "%s: unhandled dynamic relocation against %s" msgstr "" -#: elf64-alpha.c:4832 +#: elf64-alpha.c:4728 #, c-format msgid "%s: dtp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4855 +#: elf64-alpha.c:4751 #, c-format msgid "%s: tp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-hppa.c:2086 +#: elf64-hppa.c:2082 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "" -#: elf64-mmix.c:1032 +#: elf64-mips.c:1599 elfn32-mips.c:1388 +msgid "32bits gp relative relocation occurs for an external symbol" +msgstr "" + +#: elf64-mmix.c:1171 #, c-format msgid "" "%s: Internal inconsistency error for value for\n" @@ -1495,106 +1630,113 @@ msgid "" "08lx\n" msgstr "" -#: elf64-mmix.c:1416 +#: elf64-mmix.c:1630 #, c-format msgid "" "%s: base-plus-offset relocation against register symbol: (unknown) in %s" msgstr "" -#: elf64-mmix.c:1421 +#: elf64-mmix.c:1635 #, c-format msgid "%s: base-plus-offset relocation against register symbol: %s in %s" msgstr "" -#: elf64-mmix.c:1465 +#: elf64-mmix.c:1679 #, c-format msgid "%s: register relocation against non-register symbol: (unknown) in %s" msgstr "" -#: elf64-mmix.c:1470 +#: elf64-mmix.c:1684 #, c-format msgid "%s: register relocation against non-register symbol: %s in %s" msgstr "" -#: elf64-mmix.c:1507 +#: elf64-mmix.c:1721 #, c-format msgid "%s: directive LOCAL valid only with a register or absolute value" msgstr "" -#: elf64-mmix.c:1535 +#: elf64-mmix.c:1749 #, c-format msgid "" "%s: LOCAL directive: Register $%ld is not a local register. First global " "register is $%ld." msgstr "" -#: elf64-mmix.c:1994 +#: elf64-mmix.c:2229 #, c-format msgid "" "%s: Error: multiple definition of `%s'; start of %s is set in a earlier " "linked file\n" msgstr "" -#: elf64-mmix.c:2053 +#: elf64-mmix.c:2288 msgid "Register section has contents\n" msgstr "" -#: elf64-mmix.c:2216 +#: elf64-mmix.c:2494 #, c-format msgid "" "Internal inconsistency: remaining %u != max %u.\n" " Please report this bug." msgstr "" -#: elf64-ppc.c:2388 libbfd.c:831 +#: elf64-ppc.c:2431 libbfd.c:821 #, c-format msgid "%s: compiled for a big endian system and target is little endian" msgstr "" -#: elf64-ppc.c:2391 libbfd.c:833 +#: elf64-ppc.c:2434 libbfd.c:823 #, c-format msgid "%s: compiled for a little endian system and target is big endian" msgstr "" -#: elf64-ppc.c:4857 +#: elf64-ppc.c:4638 #, c-format -msgid "%s: unexpected reloc type %u in .opd section" +msgid "" +"copy reloc against `%s' requires lazy plt linking; avoid setting " +"LD_BIND_NOW=1 or upgrade gcc" msgstr "" -#: elf64-ppc.c:4877 +#: elf64-ppc.c:5009 #, c-format msgid "%s: .opd is not a regular array of opd entries" msgstr "" -#: elf64-ppc.c:4897 +#: elf64-ppc.c:5019 +#, c-format +msgid "%s: unexpected reloc type %u in .opd section" +msgstr "" + +#: elf64-ppc.c:5039 #, c-format msgid "%s: undefined sym `%s' in .opd section" msgstr "" -#: elf64-ppc.c:6136 +#: elf64-ppc.c:6265 #, c-format msgid "can't find branch stub `%s'" msgstr "" -#: elf64-ppc.c:6175 elf64-ppc.c:6250 +#: elf64-ppc.c:6304 elf64-ppc.c:6379 #, c-format msgid "linkage table error against `%s'" msgstr "" -#: elf64-ppc.c:6340 +#: elf64-ppc.c:6496 #, c-format msgid "can't build branch stub `%s'" msgstr "" -#: elf64-ppc.c:7047 +#: elf64-ppc.c:7215 msgid ".glink and .plt too far apart" msgstr "" -#: elf64-ppc.c:7135 +#: elf64-ppc.c:7327 msgid "stubs don't match calculated size" msgstr "" -#: elf64-ppc.c:7147 +#: elf64-ppc.c:7339 #, c-format msgid "" "linker stubs in %u groups\n" @@ -1605,14 +1747,24 @@ msgid "" " plt call %lu" msgstr "" -#: elf64-ppc.c:7723 +#: elf64-ppc.c:7537 +#, c-format +msgid "%s(%s+0x%lx): %s used with TLS symbol %s" +msgstr "" + +#: elf64-ppc.c:7538 +#, c-format +msgid "%s(%s+0x%lx): %s used with non-TLS symbol %s" +msgstr "" + +#: elf64-ppc.c:7949 #, c-format msgid "" "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; " "recompile with -mminimal-toc or upgrade gcc" msgstr "" -#: elf64-ppc.c:7731 +#: elf64-ppc.c:7957 #, c-format msgid "" "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic " @@ -1620,107 +1772,105 @@ msgid "" "or make `%s' extern" msgstr "" -#: elf64-ppc.c:8329 +#: elf64-ppc.c:8555 #, c-format msgid "%s: relocation %s is not supported for symbol %s." msgstr "" -#: elf64-ppc.c:8408 +#: elf64-ppc.c:8634 #, c-format msgid "%s: error: relocation %s not a multiple of %d" msgstr "" -#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704 -#, c-format -msgid "" -"%s: warning: unresolvable relocation against symbol `%s' from %s section" -msgstr "" - -#: elf64-sparc.c:1370 +#: elf64-sparc.c:1371 #, c-format msgid "%s: check_relocs: unhandled reloc type %d" msgstr "" -#: elf64-sparc.c:1407 +#: elf64-sparc.c:1408 #, c-format msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER" msgstr "" -#: elf64-sparc.c:1427 +#: elf64-sparc.c:1428 #, c-format msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s" msgstr "" -#: elf64-sparc.c:1450 +#: elf64-sparc.c:1451 #, c-format msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s" msgstr "" -#: elf64-sparc.c:1496 +#: elf64-sparc.c:1497 #, c-format msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s" msgstr "" -#: elf64-sparc.c:3053 +#: elf64-sparc.c:3020 #, c-format msgid "%s: linking UltraSPARC specific with HAL specific code" msgstr "" -#: elf64-x86-64.c:739 +#: elf64-x86-64.c:732 #, c-format msgid "%s: %s' accessed both as normal and thread local symbol" msgstr "" -#: elf.c:372 +#: elf.c:295 #, c-format msgid "%s: invalid string offset %u >= %lu for section `%s'" msgstr "" -#: elf.c:624 +#: elf.c:538 #, c-format msgid "%s: invalid SHT_GROUP entry" msgstr "" -#: elf.c:695 +#: elf.c:609 #, c-format msgid "%s: no group info for section %s" msgstr "" -#: elf.c:1055 +#: elf.c:952 +#, c-format msgid "" "\n" "Program Header:\n" msgstr "" -#: elf.c:1106 +#: elf.c:1003 +#, c-format msgid "" "\n" "Dynamic Section:\n" msgstr "" -#: elf.c:1235 +#: elf.c:1131 +#, c-format msgid "" "\n" "Version definitions:\n" msgstr "" -#: elf.c:1258 +#: elf.c:1154 +#, c-format msgid "" "\n" "Version References:\n" msgstr "" -#: elf.c:1263 +#: elf.c:1159 #, c-format msgid " required from %s:\n" msgstr "" -#: elf.c:1944 +#: elf.c:1826 #, c-format msgid "%s: invalid link %lu for reloc section %s (index %u)" msgstr "" -#: elf.c:3686 +#: elf.c:3684 #, c-format msgid "%s: Not enough room for program headers (allocated %u, need %u)" msgstr "" @@ -1730,271 +1880,311 @@ msgstr "" msgid "%s: Not enough room for program headers, try linking with -N" msgstr "" -#: elf.c:3922 +#: elf.c:3924 #, c-format msgid "" "Error: First section in segment (%s) starts at 0x%x whereas the segment " "starts at 0x%x" msgstr "" -#: elf.c:4242 +#: elf.c:4243 #, c-format msgid "%s: warning: allocated section `%s' not in segment" msgstr "" -#: elf.c:4566 +#: elf.c:4557 #, c-format msgid "%s: symbol `%s' required but not present" msgstr "" -#: elf.c:4854 +#: elf.c:4845 #, c-format msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n" msgstr "" -#: elf.c:5485 +#: elf.c:5479 #, c-format msgid "" "Unable to find equivalent output section for symbol '%s' from section '%s'" msgstr "" -#: elf.c:6298 +#: elf.c:6264 #, c-format msgid "%s: unsupported relocation type %s" msgstr "" -#: elfcode.h:1113 +#: elfcode.h:1068 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "" -#: elfcode.h:1342 +#: elfcode.h:1294 #, c-format msgid "%s(%s): relocation %d has invalid symbol index %ld" msgstr "" -#: elflink.c:1456 +#: elflink.c:1349 #, c-format msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'" msgstr "" -#: elflink.c:1807 +#: elflink.c:1668 #, c-format msgid "%s: undefined versioned symbol name %s" msgstr "" -#: elflink.c:2142 +#: elflink.c:1817 +#, c-format +msgid "" +"%s: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%s'" +msgstr "" + +#: elflink.c:2006 #, c-format msgid "%s: relocation size mismatch in %s section %s" msgstr "" -#: elflink.c:2434 +#: elflink.c:2295 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "" -#: elflink.h:1022 +#: elflink.h:196 +msgid "warning: " +msgstr "" + +#: elflink.h:691 #, c-format msgid "%s: %s: invalid version %u (max %d)" msgstr "" -#: elflink.h:1063 +#: elflink.h:732 #, c-format msgid "%s: %s: invalid needed version %d" msgstr "" -#: elflink.h:1238 +#: elflink.h:907 #, c-format msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s" msgstr "" -#: elflink.h:1252 +#: elflink.h:921 #, c-format msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s" msgstr "" -#: elflink.h:2160 +#: elflink.h:1858 #, c-format msgid "%s: undefined version: %s" msgstr "" -#: elflink.h:2226 +#: elflink.h:1924 #, c-format msgid "%s: .preinit_array section is not allowed in DSO" msgstr "" -#: elflink.h:3078 +#: elflink.h:2750 msgid "Not enough memory to sort relocations" msgstr "" -#: elflink.h:3958 elflink.h:4001 +#: elflink.h:3609 elflink.h:3652 #, c-format msgid "%s: could not find output section %s" msgstr "" -#: elflink.h:3964 +#: elflink.h:3615 #, c-format msgid "warning: %s section has zero size" msgstr "" -#: elflink.h:4483 +#: elflink.h:4124 #, c-format msgid "%s: %s symbol `%s' in %s is referenced by DSO" msgstr "" -#: elflink.h:4564 +#: elflink.h:4205 #, c-format msgid "%s: could not find output section %s for input section %s" msgstr "" -#: elflink.h:4666 +#: elflink.h:4307 #, c-format msgid "%s: %s symbol `%s' isn't defined" msgstr "" -#: elflink.h:5053 elflink.h:5095 +#: elflink.h:4691 elflink.h:4733 msgid "%T: discarded in section `%s' from %s\n" msgstr "" -#: elfxx-mips.c:887 +#: elflink.h:5542 +msgid "Warning: gc-sections option ignored" +msgstr "" + +#: elfxx-mips.c:899 msgid "static procedure (no name)" msgstr "" -#: elfxx-mips.c:1897 +#: elfxx-mips.c:2037 msgid "not enough GOT space for local GOT entries" msgstr "" -#: elfxx-mips.c:3691 +#: elfxx-mips.c:3786 #, c-format msgid "%s: %s+0x%lx: jump to stub routine which is not jal" msgstr "" -#: elfxx-mips.c:5192 +#: elfxx-mips.c:5271 #, c-format msgid "%s: Malformed reloc detected for section %s" msgstr "" -#: elfxx-mips.c:5266 +#: elfxx-mips.c:5345 #, c-format msgid "%s: CALL16 reloc at 0x%lx not against global symbol" msgstr "" -#: elfxx-mips.c:8693 +#: elfxx-mips.c:8642 #, c-format msgid "%s: illegal section name `%s'" msgstr "" -#: elfxx-mips.c:9027 +#: elfxx-mips.c:8965 #, c-format msgid "%s: endianness incompatible with that of the selected emulation" msgstr "" -#: elfxx-mips.c:9039 +#: elfxx-mips.c:8977 #, c-format msgid "%s: ABI is incompatible with that of the selected emulation" msgstr "" -#: elfxx-mips.c:9106 +#: elfxx-mips.c:9049 #, c-format msgid "%s: warning: linking PIC files with non-PIC files" msgstr "" -#: elfxx-mips.c:9123 +#: elfxx-mips.c:9066 #, c-format msgid "%s: linking 32-bit code with 64-bit code" msgstr "" -#: elfxx-mips.c:9151 +#: elfxx-mips.c:9094 #, c-format msgid "%s: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:9174 +#: elfxx-mips.c:9117 #, c-format msgid "%s: ABI mismatch: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:9243 +#: elfxx-mips.c:9182 +#, c-format msgid " [abi=O32]" msgstr "" -#: elfxx-mips.c:9245 +#: elfxx-mips.c:9184 +#, c-format msgid " [abi=O64]" msgstr "" -#: elfxx-mips.c:9247 +#: elfxx-mips.c:9186 +#, c-format msgid " [abi=EABI32]" msgstr "" -#: elfxx-mips.c:9249 +#: elfxx-mips.c:9188 +#, c-format msgid " [abi=EABI64]" msgstr "" -#: elfxx-mips.c:9251 +#: elfxx-mips.c:9190 +#, c-format msgid " [abi unknown]" msgstr "" -#: elfxx-mips.c:9253 +#: elfxx-mips.c:9192 +#, c-format msgid " [abi=N32]" msgstr "" -#: elfxx-mips.c:9255 +#: elfxx-mips.c:9194 +#, c-format msgid " [abi=64]" msgstr "" -#: elfxx-mips.c:9257 +#: elfxx-mips.c:9196 +#, c-format msgid " [no abi set]" msgstr "" -#: elfxx-mips.c:9260 +#: elfxx-mips.c:9199 +#, c-format msgid " [mips1]" msgstr "" -#: elfxx-mips.c:9262 +#: elfxx-mips.c:9201 +#, c-format msgid " [mips2]" msgstr "" -#: elfxx-mips.c:9264 +#: elfxx-mips.c:9203 +#, c-format msgid " [mips3]" msgstr "" -#: elfxx-mips.c:9266 +#: elfxx-mips.c:9205 +#, c-format msgid " [mips4]" msgstr "" -#: elfxx-mips.c:9268 +#: elfxx-mips.c:9207 +#, c-format msgid " [mips5]" msgstr "" -#: elfxx-mips.c:9270 +#: elfxx-mips.c:9209 +#, c-format msgid " [mips32]" msgstr "" -#: elfxx-mips.c:9272 +#: elfxx-mips.c:9211 +#, c-format msgid " [mips64]" msgstr "" -#: elfxx-mips.c:9274 +#: elfxx-mips.c:9213 +#, c-format msgid " [mips32r2]" msgstr "" -#: elfxx-mips.c:9276 +#: elfxx-mips.c:9215 +#, c-format +msgid " [mips64r2]" +msgstr "" + +#: elfxx-mips.c:9217 +#, c-format msgid " [unknown ISA]" msgstr "" -#: elfxx-mips.c:9279 +#: elfxx-mips.c:9220 +#, c-format msgid " [mdmx]" msgstr "" -#: elfxx-mips.c:9282 +#: elfxx-mips.c:9223 +#, c-format msgid " [mips16]" msgstr "" -#: elfxx-mips.c:9285 +#: elfxx-mips.c:9226 +#, c-format msgid " [32bitmode]" msgstr "" -#: elfxx-mips.c:9287 +#: elfxx-mips.c:9228 +#, c-format msgid " [not 32bitmode]" msgstr "" @@ -2093,12 +2283,12 @@ msgstr "" msgid "%s: address 0x%s out of range for Intel Hex file" msgstr "" -#: libbfd.c:861 +#: libbfd.c:851 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "" -#: libbfd.c:864 +#: libbfd.c:854 #, c-format msgid "Deprecated %s called\n" msgstr "" @@ -2113,7 +2303,7 @@ msgstr "" msgid "Attempt to do relocatable link with %s input and %s output" msgstr "" -#: merge.c:896 +#: merge.c:797 #, c-format msgid "%s: access beyond end of merged section (%ld + %ld)" msgstr "" @@ -2286,24 +2476,24 @@ msgstr "" msgid "%s: Unrecognised import name type; %x" msgstr "" -#: peicode.h:1164 +#: peicode.h:1194 #, c-format msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "" -#: peicode.h:1176 +#: peicode.h:1206 #, c-format msgid "" "%s: Recognised but unhandled machine type (0x%x) in Import Library Format " "archive" msgstr "" -#: peicode.h:1193 +#: peicode.h:1223 #, c-format msgid "%s: size field is zero in Import Library Format header" msgstr "" -#: peicode.h:1224 +#: peicode.h:1254 #, c-format msgid "%s: string not null terminated in ILF object file." msgstr "" @@ -2334,6 +2524,7 @@ msgid "%s: bad pair/reflo after refhi\n" msgstr "" #: ppcboot.c:416 +#, c-format msgid "" "\n" "ppcboot header:\n" @@ -2390,7 +2581,7 @@ msgstr "" msgid "%s:%d: Unexpected character `%s' in S-record file\n" msgstr "" -#: stabs.c:319 +#: stabs.c:326 #, c-format msgid "%s(%s+0x%lx): Stabs entry has invalid string index." msgstr "" @@ -2642,224 +2833,230 @@ msgstr "" msgid "%s: loader reloc in read-only section %s" msgstr "" -#: elf32-ia64.c:2271 elf64-ia64.c:2271 +#: elf32-ia64.c:2362 elf64-ia64.c:2362 msgid "@pltoff reloc against local symbol" msgstr "" -#: elf32-ia64.c:3663 elf64-ia64.c:3663 +#: elf32-ia64.c:3767 elf64-ia64.c:3767 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "" -#: elf32-ia64.c:3674 elf64-ia64.c:3674 +#: elf32-ia64.c:3778 elf64-ia64.c:3778 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "" -#: elf32-ia64.c:3986 elf64-ia64.c:3986 +#: elf32-ia64.c:4026 elf64-ia64.c:4026 #, c-format -msgid "%s: linking non-pic code in a shared library" +msgid "%s: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "" -#: elf32-ia64.c:4017 elf64-ia64.c:4017 +#: elf32-ia64.c:4091 elf64-ia64.c:4091 #, c-format msgid "%s: @gprel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4077 elf64-ia64.c:4077 +#: elf32-ia64.c:4151 elf64-ia64.c:4151 #, c-format msgid "%s: linking non-pic code in a position independent executable" msgstr "" -#: elf32-ia64.c:4214 elf64-ia64.c:4214 +#: elf32-ia64.c:4288 elf64-ia64.c:4288 #, c-format msgid "%s: @internal branch to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4216 elf64-ia64.c:4216 +#: elf32-ia64.c:4290 elf64-ia64.c:4290 #, c-format msgid "%s: speculation fixup to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4218 elf64-ia64.c:4218 +#: elf32-ia64.c:4292 elf64-ia64.c:4292 #, c-format msgid "%s: @pcrel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4430 elf64-ia64.c:4430 +#: elf32-ia64.c:4504 elf64-ia64.c:4504 msgid "unsupported reloc" msgstr "" -#: elf32-ia64.c:4709 elf64-ia64.c:4709 +#: elf32-ia64.c:4783 elf64-ia64.c:4783 #, c-format msgid "%s: linking trap-on-NULL-dereference with non-trapping files" msgstr "" -#: elf32-ia64.c:4718 elf64-ia64.c:4718 +#: elf32-ia64.c:4792 elf64-ia64.c:4792 #, c-format msgid "%s: linking big-endian files with little-endian files" msgstr "" -#: elf32-ia64.c:4727 elf64-ia64.c:4727 +#: elf32-ia64.c:4801 elf64-ia64.c:4801 #, c-format msgid "%s: linking 64-bit files with 32-bit files" msgstr "" -#: elf32-ia64.c:4736 elf64-ia64.c:4736 +#: elf32-ia64.c:4810 elf64-ia64.c:4810 #, c-format msgid "%s: linking constant-gp files with non-constant-gp files" msgstr "" -#: elf32-ia64.c:4746 elf64-ia64.c:4746 +#: elf32-ia64.c:4820 elf64-ia64.c:4820 #, c-format msgid "%s: linking auto-pic files with non-auto-pic files" msgstr "" -#: peigen.c:985 pepigen.c:985 +#: peigen.c:1031 pepigen.c:1031 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: peigen.c:1002 pepigen.c:1002 +#: peigen.c:1052 pepigen.c:1052 #, c-format msgid "%s: reloc overflow 1: 0x%lx > 0xffff" msgstr "" -#: peigen.c:1016 pepigen.c:1016 +#: peigen.c:1066 pepigen.c:1066 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "" -#: peigen.c:1017 pepigen.c:1017 +#: peigen.c:1067 pepigen.c:1067 msgid "Import Directory [parts of .idata]" msgstr "" -#: peigen.c:1018 pepigen.c:1018 +#: peigen.c:1068 pepigen.c:1068 msgid "Resource Directory [.rsrc]" msgstr "" -#: peigen.c:1019 pepigen.c:1019 +#: peigen.c:1069 pepigen.c:1069 msgid "Exception Directory [.pdata]" msgstr "" -#: peigen.c:1020 pepigen.c:1020 +#: peigen.c:1070 pepigen.c:1070 msgid "Security Directory" msgstr "" -#: peigen.c:1021 pepigen.c:1021 +#: peigen.c:1071 pepigen.c:1071 msgid "Base Relocation Directory [.reloc]" msgstr "" -#: peigen.c:1022 pepigen.c:1022 +#: peigen.c:1072 pepigen.c:1072 msgid "Debug Directory" msgstr "" -#: peigen.c:1023 pepigen.c:1023 +#: peigen.c:1073 pepigen.c:1073 msgid "Description Directory" msgstr "" -#: peigen.c:1024 pepigen.c:1024 +#: peigen.c:1074 pepigen.c:1074 msgid "Special Directory" msgstr "" -#: peigen.c:1025 pepigen.c:1025 +#: peigen.c:1075 pepigen.c:1075 msgid "Thread Storage Directory [.tls]" msgstr "" -#: peigen.c:1026 pepigen.c:1026 +#: peigen.c:1076 pepigen.c:1076 msgid "Load Configuration Directory" msgstr "" -#: peigen.c:1027 pepigen.c:1027 +#: peigen.c:1077 pepigen.c:1077 msgid "Bound Import Directory" msgstr "" -#: peigen.c:1028 pepigen.c:1028 +#: peigen.c:1078 pepigen.c:1078 msgid "Import Address Table Directory" msgstr "" -#: peigen.c:1029 pepigen.c:1029 +#: peigen.c:1079 pepigen.c:1079 msgid "Delay Import Directory" msgstr "" -#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031 +#: peigen.c:1080 peigen.c:1081 pepigen.c:1080 pepigen.c:1081 msgid "Reserved" msgstr "" -#: peigen.c:1094 pepigen.c:1094 +#: peigen.c:1144 pepigen.c:1144 +#, c-format msgid "" "\n" "There is an import table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1099 pepigen.c:1099 +#: peigen.c:1149 pepigen.c:1149 #, c-format msgid "" "\n" "There is an import table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1136 pepigen.c:1136 +#: peigen.c:1186 pepigen.c:1186 #, c-format msgid "" "\n" "Function descriptor located at the start address: %04lx\n" msgstr "" -#: peigen.c:1139 pepigen.c:1139 +#: peigen.c:1189 pepigen.c:1189 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "" -#: peigen.c:1145 pepigen.c:1145 +#: peigen.c:1195 pepigen.c:1195 +#, c-format msgid "" "\n" "No reldata section! Function descriptor not decoded.\n" msgstr "" -#: peigen.c:1150 pepigen.c:1150 +#: peigen.c:1200 pepigen.c:1200 #, c-format msgid "" "\n" "The Import Tables (interpreted %s section contents)\n" msgstr "" -#: peigen.c:1153 pepigen.c:1153 +#: peigen.c:1203 pepigen.c:1203 +#, c-format msgid "" " vma: Hint Time Forward DLL First\n" " Table Stamp Chain Name Thunk\n" msgstr "" -#: peigen.c:1204 pepigen.c:1204 +#: peigen.c:1254 pepigen.c:1254 #, c-format msgid "" "\n" "\tDLL Name: %s\n" msgstr "" -#: peigen.c:1215 pepigen.c:1215 +#: peigen.c:1265 pepigen.c:1265 +#, c-format msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "" -#: peigen.c:1240 pepigen.c:1240 +#: peigen.c:1290 pepigen.c:1290 +#, c-format msgid "" "\n" "There is a first thunk, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1380 pepigen.c:1380 +#: peigen.c:1430 pepigen.c:1430 +#, c-format msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1385 pepigen.c:1385 +#: peigen.c:1435 pepigen.c:1435 #, c-format msgid "" "\n" "There is an export table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1416 pepigen.c:1416 +#: peigen.c:1466 pepigen.c:1466 #, c-format msgid "" "\n" @@ -2867,129 +3064,143 @@ msgid "" "\n" msgstr "" -#: peigen.c:1420 pepigen.c:1420 +#: peigen.c:1470 pepigen.c:1470 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "" -#: peigen.c:1423 pepigen.c:1423 +#: peigen.c:1473 pepigen.c:1473 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "" -#: peigen.c:1426 pepigen.c:1426 +#: peigen.c:1476 pepigen.c:1476 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "" -#: peigen.c:1429 pepigen.c:1429 +#: peigen.c:1479 pepigen.c:1479 +#, c-format msgid "Name \t\t\t\t" msgstr "" -#: peigen.c:1435 pepigen.c:1435 +#: peigen.c:1485 pepigen.c:1485 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "" -#: peigen.c:1438 pepigen.c:1438 +#: peigen.c:1488 pepigen.c:1488 +#, c-format msgid "Number in:\n" msgstr "" -#: peigen.c:1441 pepigen.c:1441 +#: peigen.c:1491 pepigen.c:1491 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "" -#: peigen.c:1445 pepigen.c:1445 +#: peigen.c:1495 pepigen.c:1495 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "" -#: peigen.c:1448 pepigen.c:1448 +#: peigen.c:1498 pepigen.c:1498 +#, c-format msgid "Table Addresses\n" msgstr "" -#: peigen.c:1451 pepigen.c:1451 +#: peigen.c:1501 pepigen.c:1501 +#, c-format msgid "\tExport Address Table \t\t" msgstr "" -#: peigen.c:1456 pepigen.c:1456 +#: peigen.c:1506 pepigen.c:1506 +#, c-format msgid "\tName Pointer Table \t\t" msgstr "" -#: peigen.c:1461 pepigen.c:1461 +#: peigen.c:1511 pepigen.c:1511 +#, c-format msgid "\tOrdinal Table \t\t\t" msgstr "" -#: peigen.c:1476 pepigen.c:1476 +#: peigen.c:1526 pepigen.c:1526 #, c-format msgid "" "\n" "Export Address Table -- Ordinal Base %ld\n" msgstr "" -#: peigen.c:1495 pepigen.c:1495 +#: peigen.c:1545 pepigen.c:1545 msgid "Forwarder RVA" msgstr "" -#: peigen.c:1506 pepigen.c:1506 +#: peigen.c:1556 pepigen.c:1556 msgid "Export RVA" msgstr "" -#: peigen.c:1513 pepigen.c:1513 +#: peigen.c:1563 pepigen.c:1563 +#, c-format msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" -#: peigen.c:1568 pepigen.c:1568 +#: peigen.c:1618 pepigen.c:1618 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "" -#: peigen.c:1572 pepigen.c:1572 +#: peigen.c:1622 pepigen.c:1622 +#, c-format msgid "" "\n" "The Function Table (interpreted .pdata section contents)\n" msgstr "" -#: peigen.c:1575 pepigen.c:1575 +#: peigen.c:1625 pepigen.c:1625 +#, c-format msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr "" -#: peigen.c:1577 pepigen.c:1577 +#: peigen.c:1627 pepigen.c:1627 +#, c-format msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" " \t\tAddress Address Handler Data Address Mask\n" msgstr "" -#: peigen.c:1647 pepigen.c:1647 +#: peigen.c:1697 pepigen.c:1697 +#, c-format msgid " Register save millicode" msgstr "" -#: peigen.c:1650 pepigen.c:1650 +#: peigen.c:1700 pepigen.c:1700 +#, c-format msgid " Register restore millicode" msgstr "" -#: peigen.c:1653 pepigen.c:1653 +#: peigen.c:1703 pepigen.c:1703 +#, c-format msgid " Glue code sequence" msgstr "" -#: peigen.c:1705 pepigen.c:1705 +#: peigen.c:1755 pepigen.c:1755 +#, c-format msgid "" "\n" "\n" "PE File Base Relocations (interpreted .reloc section contents)\n" msgstr "" -#: peigen.c:1735 pepigen.c:1735 +#: peigen.c:1785 pepigen.c:1785 #, c-format msgid "" "\n" "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" msgstr "" -#: peigen.c:1748 pepigen.c:1748 +#: peigen.c:1798 pepigen.c:1798 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "" @@ -2997,7 +3208,7 @@ msgstr "" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1788 pepigen.c:1788 +#: peigen.c:1838 pepigen.c:1838 #, c-format msgid "" "\n" diff --git a/bfd/ptrace-core.c b/bfd/ptrace-core.c index 4f441ce..15b6777 100644 --- a/bfd/ptrace-core.c +++ b/bfd/ptrace-core.c @@ -1,5 +1,5 @@ /* BFD backend for core files which use the ptrace_user structure - Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002 + Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. The structure of this file is based on trad-core.c written by John Gilmore of Cygnus Support. @@ -167,10 +167,13 @@ swap_abort () { abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target ptrace_core_vec = { @@ -185,41 +188,41 @@ const bfd_target ptrace_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - ptrace_unix_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + ptrace_unix_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, - BFD_JUMP_TABLE_GENERIC (_bfd_generic), - BFD_JUMP_TABLE_COPY (_bfd_generic), - BFD_JUMP_TABLE_CORE (ptrace_unix), - BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), - BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), - BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), - BFD_JUMP_TABLE_WRITE (_bfd_generic), - BFD_JUMP_TABLE_LINK (_bfd_nolink), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + BFD_JUMP_TABLE_GENERIC (_bfd_generic), + BFD_JUMP_TABLE_COPY (_bfd_generic), + BFD_JUMP_TABLE_CORE (ptrace_unix), + BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), + BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), + BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), + BFD_JUMP_TABLE_WRITE (_bfd_generic), + BFD_JUMP_TABLE_LINK (_bfd_nolink), + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, (PTR) 0 /* backend_data */ -}; + }; #endif /* PTRACE_CORE */ diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c index 311de70..5c34ff1 100644 --- a/bfd/sco5-core.c +++ b/bfd/sco5-core.c @@ -1,5 +1,6 @@ /* BFD back end for SCO5 core files (U-area and raw sections) - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. Written by Jouke Numan <jnuman@hiscom.nl> This file is part of BFD, the Binary File Descriptor library. @@ -360,10 +361,13 @@ swap_abort () { abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target sco5_core_vec = { @@ -378,26 +382,26 @@ const bfd_target sco5_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - sco5_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + sco5_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, BFD_JUMP_TABLE_GENERIC (_bfd_generic), @@ -413,4 +417,4 @@ const bfd_target sco5_core_vec = NULL, (PTR) 0 /* backend_data */ -}; + }; diff --git a/bfd/targets.c b/bfd/targets.c index de4284e..9d81c56 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1,6 +1,6 @@ /* Generic target-file-type support for the BFD library. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003 + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Cygnus Support. @@ -203,26 +203,26 @@ DESCRIPTION . {* Entries for byte swapping for data. These are different from the . other entry points, since they don't take a BFD asthe first argument. . Certain other handlers could do the same. *} -. bfd_vma (*bfd_getx64) (const bfd_byte *); -. bfd_signed_vma (*bfd_getx_signed_64) (const bfd_byte *); -. void (*bfd_putx64) (bfd_vma, bfd_byte *); -. bfd_vma (*bfd_getx32) (const bfd_byte *); -. bfd_signed_vma (*bfd_getx_signed_32) (const bfd_byte *); -. void (*bfd_putx32) (bfd_vma, bfd_byte *); -. bfd_vma (*bfd_getx16) (const bfd_byte *); -. bfd_signed_vma (*bfd_getx_signed_16) (const bfd_byte *); -. void (*bfd_putx16) (bfd_vma, bfd_byte *); +. bfd_uint64_t (*bfd_getx64) (const void *); +. bfd_int64_t (*bfd_getx_signed_64) (const void *); +. void (*bfd_putx64) (bfd_uint64_t, void *); +. bfd_vma (*bfd_getx32) (const void *); +. bfd_signed_vma (*bfd_getx_signed_32) (const void *); +. void (*bfd_putx32) (bfd_vma, void *); +. bfd_vma (*bfd_getx16) (const void *); +. bfd_signed_vma (*bfd_getx_signed_16) (const void *); +. void (*bfd_putx16) (bfd_vma, void *); . . {* Byte swapping for the headers. *} -. bfd_vma (*bfd_h_getx64) (const bfd_byte *); -. bfd_signed_vma (*bfd_h_getx_signed_64) (const bfd_byte *); -. void (*bfd_h_putx64) (bfd_vma, bfd_byte *); -. bfd_vma (*bfd_h_getx32) (const bfd_byte *); -. bfd_signed_vma (*bfd_h_getx_signed_32) (const bfd_byte *); -. void (*bfd_h_putx32) (bfd_vma, bfd_byte *); -. bfd_vma (*bfd_h_getx16) (const bfd_byte *); -. bfd_signed_vma (*bfd_h_getx_signed_16) (const bfd_byte *); -. void (*bfd_h_putx16) (bfd_vma, bfd_byte *); +. bfd_uint64_t (*bfd_h_getx64) (const void *); +. bfd_int64_t (*bfd_h_getx_signed_64) (const void *); +. void (*bfd_h_putx64) (bfd_uint64_t, void *); +. bfd_vma (*bfd_h_getx32) (const void *); +. bfd_signed_vma (*bfd_h_getx_signed_32) (const void *); +. void (*bfd_h_putx32) (bfd_vma, void *); +. bfd_vma (*bfd_h_getx16) (const void *); +. bfd_signed_vma (*bfd_h_getx_signed_16) (const void *); +. void (*bfd_h_putx16) (bfd_vma, void *); . . {* Format dependent routines: these are vectors of entry points . within the target vector structure, one for each format to check. *} diff --git a/bfd/trad-core.c b/bfd/trad-core.c index 0603150..f8c03d7 100644 --- a/bfd/trad-core.c +++ b/bfd/trad-core.c @@ -1,6 +1,6 @@ /* BFD back end for traditional Unix core files (U-area and raw sections) Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, - 2000, 2001, 2002 + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by John Gilmore of Cygnus Support. @@ -272,10 +272,13 @@ swap_abort () { abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } -#define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) -#define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) -#define NO_SIGNED_GET \ - ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort ) + +#define NO_GET ((bfd_vma (*) (const void *)) swap_abort) +#define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) +#define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) +#define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) +#define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) +#define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target trad_core_vec = { @@ -290,39 +293,39 @@ const bfd_target trad_core_vec = 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit data */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 64 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 32 bit hdrs */ - NO_GET, NO_SIGNED_GET, NO_PUT, /* 16 bit hdrs */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ + NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ + NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ - _bfd_dummy_target, /* unknown format */ - _bfd_dummy_target, /* object file */ - _bfd_dummy_target, /* archive */ - trad_unix_core_file_p /* a core file */ + _bfd_dummy_target, /* unknown format */ + _bfd_dummy_target, /* object file */ + _bfd_dummy_target, /* archive */ + trad_unix_core_file_p /* a core file */ }, { /* bfd_set_format */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, { /* bfd_write_contents */ - bfd_false, bfd_false, - bfd_false, bfd_false + bfd_false, bfd_false, + bfd_false, bfd_false }, - BFD_JUMP_TABLE_GENERIC (_bfd_generic), - BFD_JUMP_TABLE_COPY (_bfd_generic), - BFD_JUMP_TABLE_CORE (trad_unix), - BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), - BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), - BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), - BFD_JUMP_TABLE_WRITE (_bfd_generic), - BFD_JUMP_TABLE_LINK (_bfd_nolink), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + BFD_JUMP_TABLE_GENERIC (_bfd_generic), + BFD_JUMP_TABLE_COPY (_bfd_generic), + BFD_JUMP_TABLE_CORE (trad_unix), + BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), + BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols), + BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), + BFD_JUMP_TABLE_WRITE (_bfd_generic), + BFD_JUMP_TABLE_LINK (_bfd_nolink), + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, (PTR) 0 /* backend_data */ -}; + }; diff --git a/bfd/version.h b/bfd/version.h index 819f71e..9de237c 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,3 +1,3 @@ -#define BFD_VERSION_DATE 20040309 +#define BFD_VERSION_DATE 20040321 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_string@ diff --git a/config/ChangeLog b/config/ChangeLog index 85868b4..7a970b7 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,15 @@ +2004-03-08 Paolo Bonzini <bonzini@gnu.org> + + PR ada/14131 + Move language detection to the top level. + * acx.m4 (ACX_PROG_GNAT): New macro, moved here + from the gcc subdirectory. + +2004-03-09 Hans-Peter Nilsson <hp@axis.com> + + * accross.m4 (AC_C_BIGENDIAN_CROSS): Compile endian probe with + "-c". Properly quote parameter for AC_MSG_ERROR. + 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl> * acinclude.m4: Quote names of macros to be defined by AC_DEFUN diff --git a/config/accross.m4 b/config/accross.m4 index a4cebf6..535a6f5 100644 --- a/config/accross.m4 +++ b/config/accross.m4 @@ -64,7 +64,7 @@ void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } int main() { _ascii (); _ebcdic (); return 0; } EOF ] if test -f conftest.c ; then - if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then + if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then if test `grep -l BIGenDianSyS conftest.o` ; then echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG ac_cv_c_bigendian=yes @@ -93,6 +93,6 @@ else fi AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN]) if test $ac_cv_c_bigendian = unknown; then - AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian) + AC_MSG_ERROR([unknown endianess - sorry, please pre-set ac_cv_c_bigendian]) fi ]) diff --git a/config/acx.m4 b/config/acx.m4 index 96b7c8a..ab7f98a 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -155,3 +155,38 @@ AC_DEFUN([AC_PROG_CPP_WERROR], [AC_REQUIRE([AC_PROG_CPP])dnl m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD])) ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR + +# Test for GNAT. +# We require the gnatbind program, and a compiler driver that +# understands Ada. We use the user's CC setting, already found. +# +# Sets the shell variable have_gnat to yes or no as appropriate, and +# substitutes GNATBIND. +AC_DEFUN([ACX_PROG_GNAT], +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) +AC_REQUIRE([AC_PROG_CC]) +AC_CHECK_TOOL(GNATBIND, gnatbind, no) +AC_CACHE_CHECK([whether compiler driver understands Ada], + acx_cv_cc_gcc_supports_ada, +[cat >conftest.adb <<EOF +procedure conftest is begin null; end conftest; +EOF +acx_cv_cc_gcc_supports_ada=no +# There is a bug in old released versions of GCC which causes the +# driver to exit successfully when the appropriate language module +# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. +# Therefore we must check for the error message as well as an +# unsuccessful exit. +errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` +if test x"$errors" = x; then + acx_cv_cc_gcc_supports_ada=yes + break +fi +rm -f conftest.*]) + +if test x$GNATBIND != xno && test x$acx_cv_gcc_supports_ada != xno; then + have_gnat=yes +else + have_gnat=no +fi +]) @@ -21,6 +21,8 @@ ac_help="$ac_help ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" +ac_help="$ac_help + --enable-werror enable -Werror in bootstrap stage2 and later" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -579,7 +581,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:583: checking host system type" >&5 +echo "configure:585: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -600,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:604: checking target system type" >&5 +echo "configure:606: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -618,7 +620,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:622: checking build system type" >&5 +echo "configure:624: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -673,7 +675,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," # 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:677: checking for a BSD compatible install" >&5 +echo "configure:679: 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 @@ -769,6 +771,14 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # AC_PROG_CPP_WERROR +# Test for GNAT. +# We require the gnatbind program, and a compiler driver that +# understands Ada. We use the user's CC setting, already found. +# +# Sets the shell variable have_gnat to yes or no as appropriate, and +# substitutes GNATBIND. + + ### we might need to use some other shell than /bin/sh for running subshells ### If we are on Windows, search for the shell. This will permit people @@ -1514,273 +1524,6 @@ case "${noconfigdirs}" in *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;; esac -# Figure out what language subdirectories are present. -# Look if the user specified --enable-languages="..."; if not, use -# the environment variable $LANGUAGES if defined. $LANGUAGES might -# go away some day. -# NB: embedded tabs in this IF block -- do not untabify -if test x"${enable_languages+set}" != xset; then - if test x"${LANGUAGES+set}" = xset; then - enable_languages="${LANGUAGES}" - echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 - else - enable_languages=all - fi -else - if test x"${enable_languages}" = x || - test x"${enable_languages}" = xyes; - then - echo configure.in: --enable-languages needs at least one language argument 1>&2 - exit 1 - fi -fi -enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` - -# First scan to see if an enabled language requires some other language. -# We assume that a given config-lang.in will list all the language -# front ends it requires, even if some are required indirectly. -for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do - case ${lang_frag} in - ..) ;; - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/gcc/[*]/config-lang.in) ;; - *) - # From the config-lang.in, get $language, $lang_requires - language= - lang_requires= - . ${lang_frag} - for other in ${lang_requires} ; do - case ,${enable_languages}, in - *,$other,*) ;; - *,all,*) ;; - *,$language,*) - echo " \`$other' language required by \`$language'; enabling" 1>&2 - enable_languages="${enable_languages},${other}" - ;; - esac - done - ;; - esac -done - -for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do - case ${lang_frag} in - ..) ;; - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/gcc/[*]/config-lang.in) ;; - *) - # From the config-lang.in, get $language, $target_libs, - # $lang_dirs, and $build_by_default - language= - target_libs= - lang_dirs= - build_by_default= - . ${lang_frag} - if test "x$language" = x ; then - echo "${lang_frag} doesn't set \$language." 1>&2 - exit 1 - fi - case ,${enable_languages}, in - *,${language},*) - # Language was explicitly selected; include it. - add_this_lang=yes - ;; - *,all,*) - # 'all' was selected; include 'default' languages. - case ${build_by_default} in - no) add_this_lang=no ;; - *) add_this_lang=yes ;; - esac - ;; - *) add_this_lang=no ;; - esac - case ${add_this_lang} in - no) - # Remove language-dependent dirs. - eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" - ;; - esac - ;; - esac -done - -# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and -# $target_configdirs. -# If we have the source for $noconfigdirs entries, add them to $notsupp. - -notsupp="" -for dir in . $skipdirs $noconfigdirs ; do - dirname=`echo $dir | sed -e s/target-//g` - if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` - if test -r $srcdir/$dirname/configure ; then - if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then - true - else - notsupp="$notsupp $dir" - fi - fi - fi - if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` - if test -r $srcdir/$dirname/configure ; then - if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then - true - else - notsupp="$notsupp $dir" - fi - fi - fi -done - -# Sometimes the tools are distributed with libiberty but with no other -# libraries. In that case, we don't want to build target-libiberty. -if test -n "${target_configdirs}" ; then - others= - for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do - if test "$i" != "libiberty" ; then - if test -r $srcdir/$i/configure ; then - others=yes; - break; - fi - fi - done - if test -z "${others}" ; then - target_configdirs= - fi -fi - -# Quietly strip out all directories which aren't configurable in this tree. -# This relies on all configurable subdirectories being autoconfiscated, which -# is now the case. -configdirs_all="$configdirs" -configdirs= -for i in ${configdirs_all} ; do - if test -f ${srcdir}/$i/configure ; then - configdirs="${configdirs} $i" - fi -done -target_configdirs_all="$target_configdirs" -target_configdirs= -for i in ${target_configdirs_all} ; do - j=`echo $i | sed -e s/target-//g` - if test -f ${srcdir}/$j/configure ; then - target_configdirs="${target_configdirs} $i" - fi -done - -# Produce a warning message for the subdirs we can't configure. -# This isn't especially interesting in the Cygnus tree, but in the individual -# FSF releases, it's important to let people know when their machine isn't -# supported by the one or two programs in a package. - -if test -n "${notsupp}" && test -z "${norecursion}" ; then - # If $appdirs is non-empty, at least one of those directories must still - # be configured, or we error out. (E.g., if the gas release supports a - # specified target in some subdirs but not the gas subdir, we shouldn't - # pretend that all is well.) - if test -n "$appdirs" ; then - for dir in $appdirs ; do - if test -r $dir/Makefile.in ; then - if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - appdirs="" - break - fi - if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - appdirs="" - break - fi - fi - done - if test -n "$appdirs" ; then - echo "*** This configuration is not supported by this package." 1>&2 - exit 1 - fi - fi - # Okay, some application will build, or we don't care to check. Still - # notify of subdirs not getting built. - echo "*** This configuration is not supported in the following subdirectories:" 1>&2 - echo " ${notsupp}" 1>&2 - echo " (Any other directories should still work fine.)" 1>&2 -fi - -case "$host" in - *msdosdjgpp*) - enable_gdbtk=no ;; -esac - -copy_dirs= - -# Handle --with-headers=XXX. If the value is not "yes", the contents of -# the named directory are copied to $(tooldir)/sys-include. -if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then - if test x${is_cross_compiler} = xno ; then - echo 1>&2 '***' --with-headers is only supported when cross compiling - exit 1 - fi - if test x"${with_headers}" != xyes ; then - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" - fi -fi - -# Handle --with-libs=XXX. If the value is not "yes", the contents of -# the name directories are copied to $(tooldir)/lib. Multiple directories -# are permitted. -if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then - if test x${is_cross_compiler} = xno ; then - echo 1>&2 '***' --with-libs is only supported when cross compiling - exit 1 - fi - if test x"${with_libs}" != xyes ; then - # Copy the libraries in reverse order, so that files in the first named - # library override files in subsequent libraries. - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - for l in ${with_libs}; do - copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" - done - fi -fi - -# Handle ${copy_dirs} -set fnord ${copy_dirs} -shift -while test $# != 0 ; do - if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then - : - else - echo Copying $1 to $2 - - # Use the install script to create the directory and all required - # parent directories. - if test -d $2 ; then - : - else - echo >config.temp - ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED - fi - - # Copy the directory, assuming we have tar. - # FIXME: Should we use B in the second tar? Not all systems support it. - (cd $1; tar -cf - .) | (cd $2; tar -xpf -) - - # It is the responsibility of the user to correctly adjust all - # symlinks. If somebody can figure out how to handle them correctly - # here, feel free to add the code. - - echo $1 > $2/COPIED - fi - shift; shift -done - # Work in distributions that contain no compiler tools, like Autoconf. tentative_cc="" host_makefile_frag=/dev/null @@ -1932,120 +1675,6 @@ case "${host}" in esac fi -extra_arflags_for_target= -extra_nmflags_for_target= -extra_ranlibflags_for_target= -target_makefile_frag=/dev/null -case "${target}" in - i[3456789]86-*-netware*) - target_makefile_frag="config/mt-netware" - ;; - powerpc-*-netware*) - target_makefile_frag="config/mt-netware" - ;; - *-*-linux*) - target_makefile_frag="config/mt-linux" - ;; - *-*-aix4.[3456789]* | *-*-aix[56789].*) - # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm - # commands to handle both 32-bit and 64-bit objects. These flags are - # harmless if we're using GNU nm or ar. - extra_arflags_for_target=" -X32_64" - extra_nmflags_for_target=" -B -X32_64" - ;; - *-*-darwin*) - # ranlib from Darwin requires the -c flag to look at common symbols. - extra_ranlibflags_for_target=" -c" - ;; - mips*-*-pe | sh*-*-pe | *arm-wince-pe) - target_makefile_frag="config/mt-wince" - ;; -esac - -alphaieee_frag=/dev/null -case $target in - alpha*-*-*) - # This just makes sure to use the -mieee option to build target libs. - # This should probably be set individually by each library. - alphaieee_frag="config/mt-alphaieee" - ;; -esac - -# If --enable-target-optspace always use -Os instead of -O2 to build -# the target libraries, similarly if it is not specified, use -Os -# on selected platforms. -ospace_frag=/dev/null -case "${enable_target_optspace}:${target}" in - yes:*) - ospace_frag="config/mt-ospace" - ;; - :d30v-*) - ospace_frag="config/mt-d30v" - ;; - :m32r-* | :d10v-* | :fr30-*) - ospace_frag="config/mt-ospace" - ;; - no:* | :*) - ;; - *) - echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 - ;; -esac - -# Set with_gnu_as and with_gnu_ld as appropriate. -# -# This is done by determining whether or not the appropriate directory -# is available, and by checking whether or not specific configurations -# have requested that this magic not happen. -# -# The command line options always override the explicit settings in -# configure.in, and the settings in configure.in override this magic. -# -# If the default for a toolchain is to use GNU as and ld, and you don't -# want to do that, then you should use the --without-gnu-as and -# --without-gnu-ld options for the configure script. - -if test x${use_gnu_as} = x && - echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then - with_gnu_as=yes - extra_host_args="$extra_host_args --with-gnu-as" -fi - -if test x${use_gnu_ld} = x && - echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then - with_gnu_ld=yes - extra_host_args="$extra_host_args --with-gnu-ld" -fi - -# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure -# can detect this case. - -if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then - with_newlib=yes - extra_host_args="$extra_host_args --with-newlib" -fi - - -# Default to using --with-stabs for certain targets. -if test x${with_stabs} = x ; then - case "${target}" in - mips*-*-irix[56]*) - ;; - mips*-*-* | alpha*-*-osf*) - with_stabs=yes; - extra_host_args="${extra_host_args} --with-stabs" - ;; - esac -fi - -# hpux11 in 64bit mode has libraries in a weird place. Arrange to find -# them automatically. -case "${host}" in - hppa*64*-*-hpux11*) - extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" - ;; -esac - # If we aren't going to be using gcc, see if we can extract a definition # of CC from the fragment. # Actually, use the 'pre-extracted' version above. @@ -2065,68 +1694,6 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then fi fi -# Some systems (e.g., one of the i386-aix systems the gas testers are -# using) don't handle "\$" correctly, so don't use it here. -tooldir='${exec_prefix}'/${target_alias} -build_tooldir=${tooldir} - -# Generate a default definition for YACC. This is used if the makefile can't -# locate bison or byacc in objdir. - -for prog in 'bison -y' byacc yacc -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_YACC="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_YACC" && break -done - -# Generate a default definition for M4. This is used if the makefile can't -# locate m4 in objdir. - -for prog in gm4 gnum4 m4 -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_M4="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_M4" && break -done - -# Generate a default definition for LEX. This is used if the makefile can't -# locate flex in objdir. - -for prog in flex lex -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_LEX="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_LEX" && break -done - if test "${build}" != "${host}" ; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -2278,49 +1845,869 @@ EOF CXXFLAGS=${CXXFLAGS-"-g -O2"} fi -# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) -# Set up the list of links to be made. -# ${links} is the list of link names, and ${files} is the list of names to link to. +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi -# Make the links. -configlinks="${links}" -if test -r ./config.status ; then - mv -f ./config.status ./config.back +# 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:1858: 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 -while test -n "${files}" ; do - # set file to car of files, files to cdr of files - set ${files}; file=$1; shift; files=$* - set ${links}; link=$1; shift; links=$* - if test ! -r ${srcdir}/${file} ; then - if test ! -r ${file} ; then - echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 - echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 - exit 1 - else - srcfile=${file} +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: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 + 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:1939: 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:1971: 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 1982 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1987: \"$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:2013: 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:2018: 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:2027: \"$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:2046: 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 - srcfile=${srcdir}/${file} + CFLAGS= fi +fi + + + +# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. +set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2082: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GNATBIND"; then + ac_cv_prog_GNATBIND="$GNATBIND" # 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_GNATBIND="${ac_tool_prefix}gnatbind" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +GNATBIND="$ac_cv_prog_GNATBIND" +if test -n "$GNATBIND"; then + echo "$ac_t""$GNATBIND" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_GNATBIND"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "gnatbind", so it can be a program name with args. +set dummy gnatbind; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2114: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$GNATBIND"; then + ac_cv_prog_GNATBIND="$GNATBIND" # 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_GNATBIND="gnatbind" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" +fi +fi +GNATBIND="$ac_cv_prog_GNATBIND" +if test -n "$GNATBIND"; then + echo "$ac_t""$GNATBIND" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + GNATBIND="no" +fi +fi + +echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6 +echo "configure:2147: checking whether compiler driver understands Ada" >&5 +if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat >conftest.adb <<EOF +procedure conftest is begin null; end conftest; +EOF +acx_cv_cc_gcc_supports_ada=no +# There is a bug in old released versions of GCC which causes the +# driver to exit successfully when the appropriate language module +# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. +# Therefore we must check for the error message as well as an +# unsuccessful exit. +errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` +if test x"$errors" = x; then + acx_cv_cc_gcc_supports_ada=yes + break +fi +rm -f conftest.* +fi + +echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6 + +if test x$GNATBIND != xno && test x$acx_cv_gcc_supports_ada != xno; then + have_gnat=yes +else + have_gnat=no +fi + + +# By default, C is the only stage 1 language. +stage1_languages=c + - ${remove} -f ${link} - # Make a symlink if possible, otherwise try a hard link - if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then - true +# Figure out what language subdirectories are present. +# Look if the user specified --enable-languages="..."; if not, use +# the environment variable $LANGUAGES if defined. $LANGUAGES might +# go away some day. +# NB: embedded tabs in this IF block -- do not untabify +if test -d ${srcdir}/gcc; then + if test x"${enable_languages+set}" != xset; then + if test x"${LANGUAGES+set}" = xset; then + enable_languages="${LANGUAGES}" + echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 + else + enable_languages=all + fi else - # We need to re-remove the file because Lynx leaves a - # very strange directory there when it fails an NFS symlink. - ${remove} -r -f ${link} - ${hard_link} ${srcfile} ${link} + if test x"${enable_languages}" = x || + test x"${enable_languages}" = xyes; + then + echo configure.in: --enable-languages needs at least one language argument 1>&2 + exit 1 + fi + fi + enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` + + # First scan to see if an enabled language requires some other language. + # We assume that a given config-lang.in will list all the language + # front ends it requires, even if some are required indirectly. + for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do + case ${lang_frag} in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[*]/config-lang.in) ;; + *) + # From the config-lang.in, get $language, $lang_requires + language= + lang_requires= + . ${lang_frag} + for other in ${lang_requires} ; do + case ,${enable_languages}, in + *,$other,*) ;; + *,all,*) ;; + *,$language,*) + echo " \`$other' language required by \`$language'; enabling" 1>&2 + enable_languages="${enable_languages},${other}" + ;; + esac + done + ;; + esac + done + + new_enable_languages=c + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + + for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do + case ${lang_frag} in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[*]/config-lang.in) ;; + *) + # From the config-lang.in, get $language, $target_libs, + # $lang_dirs, $boot_language, and $build_by_default + language= + target_libs= + lang_dirs= + boot_language= + build_by_default= + . ${lang_frag} + # This is quite sensitive to the ordering of the case statement arms. + case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in + *::*:*) + echo "${lang_frag} doesn't set \$language." 1>&2 + exit 1 + ;; + *:ada:no:*) + # Ada was requested with no preexisting GNAT. Disable unconditionally. + add_this_lang=no + ;; + *,${language},*:*:*:*) + # Language was explicitly selected; include it. + add_this_lang=yes + ;; + *,all,*:*:*:no) + # 'all' was selected, but this is not a default language + # so do not include it. + add_this_lang=no + ;; + *,all,*:*:*:*) + # 'all' was selected and this is a default language; include it. + add_this_lang=yes + ;; + *) + add_this_lang=no + ;; + esac + case $add_this_lang in + no) + # Remove language-dependent dirs. + eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" + ;; + *) + new_enable_languages="$new_enable_languages,$language" + missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"` + case ${boot_language} in + yes) + # Add to (space-separated) list of stage 1 languages. + stage1_languages="${stage1_languages} ${language}" + ;; + esac + ;; + esac + ;; + esac + done + + missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"` + if test "x$missing_languages" != x; then + { echo "configure: error: +The following requested languages were not found: ${missing_languages}" 1>&2; exit 1; } + fi + + if test "x$new_enable_languages" != "x$enable_languages"; then + echo The following languages will be built: ${new_enable_languages} + fi + enable_languages="$new_enable_languages" + ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ ` +fi + +# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and +# $target_configdirs. +# If we have the source for $noconfigdirs entries, add them to $notsupp. + +notsupp="" +for dir in . $skipdirs $noconfigdirs ; do + dirname=`echo $dir | sed -e s/target-//g` + if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` + if test -r $srcdir/$dirname/configure ; then + if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then + true + else + notsupp="$notsupp $dir" + fi + fi + fi + if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` + if test -r $srcdir/$dirname/configure ; then + if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then + true + else + notsupp="$notsupp $dir" + fi + fi + fi +done + +# Sometimes the tools are distributed with libiberty but with no other +# libraries. In that case, we don't want to build target-libiberty. +if test -n "${target_configdirs}" ; then + others= + for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do + if test "$i" != "libiberty" ; then + if test -r $srcdir/$i/configure ; then + others=yes; + break; + fi + fi + done + if test -z "${others}" ; then + target_configdirs= + fi +fi + +# Quietly strip out all directories which aren't configurable in this tree. +# This relies on all configurable subdirectories being autoconfiscated, which +# is now the case. +configdirs_all="$configdirs" +configdirs= +for i in ${configdirs_all} ; do + if test -f ${srcdir}/$i/configure ; then + configdirs="${configdirs} $i" + fi +done +target_configdirs_all="$target_configdirs" +target_configdirs= +for i in ${target_configdirs_all} ; do + j=`echo $i | sed -e s/target-//g` + if test -f ${srcdir}/$j/configure ; then + target_configdirs="${target_configdirs} $i" + fi +done + +# Produce a warning message for the subdirs we can't configure. +# This isn't especially interesting in the Cygnus tree, but in the individual +# FSF releases, it's important to let people know when their machine isn't +# supported by the one or two programs in a package. + +if test -n "${notsupp}" && test -z "${norecursion}" ; then + # If $appdirs is non-empty, at least one of those directories must still + # be configured, or we error out. (E.g., if the gas release supports a + # specified target in some subdirs but not the gas subdir, we shouldn't + # pretend that all is well.) + if test -n "$appdirs" ; then + for dir in $appdirs ; do + if test -r $dir/Makefile.in ; then + if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + appdirs="" + break + fi + if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + appdirs="" + break + fi + fi + done + if test -n "$appdirs" ; then + echo "*** This configuration is not supported by this package." 1>&2 + exit 1 + fi fi - if test ! -r ${link} ; then - echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2 + # Okay, some application will build, or we don't care to check. Still + # notify of subdirs not getting built. + echo "*** This configuration is not supported in the following subdirectories:" 1>&2 + echo " ${notsupp}" 1>&2 + echo " (Any other directories should still work fine.)" 1>&2 +fi + +case "$host" in + *msdosdjgpp*) + enable_gdbtk=no ;; +esac + +copy_dirs= + +# Handle --with-headers=XXX. If the value is not "yes", the contents of +# the named directory are copied to $(tooldir)/sys-include. +if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-headers is only supported when cross compiling exit 1 fi + if test x"${with_headers}" != xyes ; then + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" + fi +fi + +# Handle --with-libs=XXX. If the value is not "yes", the contents of +# the name directories are copied to $(tooldir)/lib. Multiple directories +# are permitted. +if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-libs is only supported when cross compiling + exit 1 + fi + if test x"${with_libs}" != xyes ; then + # Copy the libraries in reverse order, so that files in the first named + # library override files in subsequent libraries. + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + for l in ${with_libs}; do + copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" + done + fi +fi + +# Handle ${copy_dirs} +set fnord ${copy_dirs} +shift +while test $# != 0 ; do + if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then + : + else + echo Copying $1 to $2 + + # Use the install script to create the directory and all required + # parent directories. + if test -d $2 ; then + : + else + echo >config.temp + ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED + fi + + # Copy the directory, assuming we have tar. + # FIXME: Should we use B in the second tar? Not all systems support it. + (cd $1; tar -cf - .) | (cd $2; tar -xpf -) + + # It is the responsibility of the user to correctly adjust all + # symlinks. If somebody can figure out how to handle them correctly + # here, feel free to add the code. + + echo $1 > $2/COPIED + fi + shift; shift +done + +extra_arflags_for_target= +extra_nmflags_for_target= +extra_ranlibflags_for_target= +target_makefile_frag=/dev/null +case "${target}" in + i[3456789]86-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + powerpc-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + *-*-linux*) + target_makefile_frag="config/mt-linux" + ;; + *-*-aix4.[3456789]* | *-*-aix[56789].*) + # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm + # commands to handle both 32-bit and 64-bit objects. These flags are + # harmless if we're using GNU nm or ar. + extra_arflags_for_target=" -X32_64" + extra_nmflags_for_target=" -B -X32_64" + ;; + *-*-darwin*) + # ranlib from Darwin requires the -c flag to look at common symbols. + extra_ranlibflags_for_target=" -c" + ;; + mips*-*-pe | sh*-*-pe | *arm-wince-pe) + target_makefile_frag="config/mt-wince" + ;; +esac + +alphaieee_frag=/dev/null +case $target in + alpha*-*-*) + # This just makes sure to use the -mieee option to build target libs. + # This should probably be set individually by each library. + alphaieee_frag="config/mt-alphaieee" + ;; +esac + +# If --enable-target-optspace always use -Os instead of -O2 to build +# the target libraries, similarly if it is not specified, use -Os +# on selected platforms. +ospace_frag=/dev/null +case "${enable_target_optspace}:${target}" in + yes:*) + ospace_frag="config/mt-ospace" + ;; + :d30v-*) + ospace_frag="config/mt-d30v" + ;; + :m32r-* | :d10v-* | :fr30-*) + ospace_frag="config/mt-ospace" + ;; + no:* | :*) + ;; + *) + echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 + ;; +esac + +# Set with_gnu_as and with_gnu_ld as appropriate. +# +# This is done by determining whether or not the appropriate directory +# is available, and by checking whether or not specific configurations +# have requested that this magic not happen. +# +# The command line options always override the explicit settings in +# configure.in, and the settings in configure.in override this magic. +# +# If the default for a toolchain is to use GNU as and ld, and you don't +# want to do that, then you should use the --without-gnu-as and +# --without-gnu-ld options for the configure script. + +if test x${use_gnu_as} = x && + echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then + with_gnu_as=yes + extra_host_args="$extra_host_args --with-gnu-as" +fi + +if test x${use_gnu_ld} = x && + echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then + with_gnu_ld=yes + extra_host_args="$extra_host_args --with-gnu-ld" +fi + +# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure +# can detect this case. + +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then + with_newlib=yes + extra_host_args="$extra_host_args --with-newlib" +fi + + +# Default to using --with-stabs for certain targets. +if test x${with_stabs} = x ; then + case "${target}" in + mips*-*-irix[56]*) + ;; + mips*-*-* | alpha*-*-osf*) + with_stabs=yes; + extra_host_args="${extra_host_args} --with-stabs" + ;; + esac +fi + +# hpux11 in 64bit mode has libraries in a weird place. Arrange to find +# them automatically. +case "${host}" in + hppa*64*-*-hpux11*) + extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" + ;; +esac + +# Some systems (e.g., one of the i386-aix systems the gas testers are +# using) don't handle "\$" correctly, so don't use it here. +tooldir='${exec_prefix}'/${target_alias} +build_tooldir=${tooldir} + +# Generate default definitions for YACC, M4, LEX. These are used if the +# Makefile can't locate these programs in objdir. +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing +for ac_prog in 'bison -y' byacc yacc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2612: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DEFAULT_YACC"; then + ac_cv_prog_DEFAULT_YACC="$DEFAULT_YACC" # 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_DEFAULT_YACC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +DEFAULT_YACC="$ac_cv_prog_DEFAULT_YACC" +if test -n "$DEFAULT_YACC"; then + echo "$ac_t""$DEFAULT_YACC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$DEFAULT_YACC" && break +done +test -n "$DEFAULT_YACC" || DEFAULT_YACC="$MISSING bison" + +for ac_prog in gm4 gnum4 m4 +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2647: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DEFAULT_M4"; then + ac_cv_prog_DEFAULT_M4="$DEFAULT_M4" # 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_DEFAULT_M4="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +DEFAULT_M4="$ac_cv_prog_DEFAULT_M4" +if test -n "$DEFAULT_M4"; then + echo "$ac_t""$DEFAULT_M4" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi - echo "Linked \"${link}\" to \"${srcfile}\"." +test -n "$DEFAULT_M4" && break done +test -n "$DEFAULT_M4" || DEFAULT_M4="$MISSING m4" + +for ac_prog in flex lex +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2682: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$DEFAULT_LEX"; then + ac_cv_prog_DEFAULT_LEX="$DEFAULT_LEX" # 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_DEFAULT_LEX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +DEFAULT_LEX="$ac_cv_prog_DEFAULT_LEX" +if test -n "$DEFAULT_LEX"; then + echo "$ac_t""$DEFAULT_LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$DEFAULT_LEX" && break +done +test -n "$DEFAULT_LEX" || DEFAULT_LEX="$MISSING flex" + # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. @@ -2823,7 +3210,6 @@ ospace_frag=${srcdir}/${ospace_frag} - # Build module lists & subconfigure args. @@ -2855,7 +3241,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2859: checking for $ac_word" >&5 +echo "configure:3245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2888,7 +3274,7 @@ if test -z "$ac_cv_prog_AR" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2892: checking for $ac_word" >&5 +echo "configure:3278: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2927,7 +3313,7 @@ fi # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2931: checking for $ac_word" >&5 +echo "configure:3317: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2960,7 +3346,7 @@ if test -z "$ac_cv_prog_AS" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2964: checking for $ac_word" >&5 +echo "configure:3350: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2999,7 +3385,7 @@ fi # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3003: checking for $ac_word" >&5 +echo "configure:3389: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3032,7 +3418,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3036: checking for $ac_word" >&5 +echo "configure:3422: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3071,7 +3457,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3075: checking for $ac_word" >&5 +echo "configure:3461: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3104,7 +3490,7 @@ if test -z "$ac_cv_prog_LD" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3108: checking for $ac_word" >&5 +echo "configure:3494: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3143,7 +3529,7 @@ fi # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3147: checking for $ac_word" >&5 +echo "configure:3533: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3176,7 +3562,7 @@ if test -z "$ac_cv_prog_NM" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3180: checking for $ac_word" >&5 +echo "configure:3566: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3215,7 +3601,7 @@ fi # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3219: checking for $ac_word" >&5 +echo "configure:3605: 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 @@ -3248,7 +3634,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3252: checking for $ac_word" >&5 +echo "configure:3638: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3287,7 +3673,7 @@ fi # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3291: checking for $ac_word" >&5 +echo "configure:3677: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3320,7 +3706,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3324: checking for $ac_word" >&5 +echo "configure:3710: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3359,7 +3745,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args. set dummy ${ncn_tool_prefix}objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3363: checking for $ac_word" >&5 +echo "configure:3749: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3392,7 +3778,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then # Extract the first word of "objcopy", so it can be a program name with args. set dummy objcopy; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3396: checking for $ac_word" >&5 +echo "configure:3782: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3431,7 +3817,7 @@ fi # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args. set dummy ${ncn_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3435: checking for $ac_word" >&5 +echo "configure:3821: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3464,7 +3850,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3468: checking for $ac_word" >&5 +echo "configure:3854: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3513,7 +3899,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3517: checking for $ac_word" >&5 +echo "configure:3903: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3546,7 +3932,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3550: checking for $ac_word" >&5 +echo "configure:3936: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3585,7 +3971,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3589: checking for $ac_word" >&5 +echo "configure:3975: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3618,7 +4004,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3622: checking for $ac_word" >&5 +echo "configure:4008: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3657,7 +4043,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3661: checking for $ac_word" >&5 +echo "configure:4047: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3690,7 +4076,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3694: checking for $ac_word" >&5 +echo "configure:4080: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3729,7 +4115,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3733: checking for $ac_word" >&5 +echo "configure:4119: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3762,7 +4148,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3766: checking for $ac_word" >&5 +echo "configure:4152: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3801,7 +4187,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3805: checking for $ac_word" >&5 +echo "configure:4191: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3834,7 +4220,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3838: checking for $ac_word" >&5 +echo "configure:4224: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3873,7 +4259,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3877: checking for $ac_word" >&5 +echo "configure:4263: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3906,7 +4292,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3910: checking for $ac_word" >&5 +echo "configure:4296: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3945,7 +4331,7 @@ fi # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args. set dummy ${ncn_target_tool_prefix}windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3949: checking for $ac_word" >&5 +echo "configure:4335: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3978,7 +4364,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3982: checking for $ac_word" >&5 +echo "configure:4368: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4045,7 +4431,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target} NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4049: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4435: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4066,6 +4452,44 @@ else fi MAINT=$MAINTAINER_MODE_TRUE +# --------------------- +# GCC bootstrap support +# --------------------- + +# Stage specific cflags for build. +stage1_cflags="-g" +case $build in + vax-*-*) + case ${GCC} in + yes) stage1_cflags="-g -Wa,-J" ;; + *) stage1_cflags="-g -J" ;; + esac ;; + powerpc-*-darwin*) + # The spiffy cpp-precomp chokes on some legitimate constructs in GCC + # sources; use -no-cpp-precomp to get to GNU cpp. + # Apple's GCC has bugs in designated initializer handling, so disable + # that too. + stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" + ;; +esac + + +# Enable -Werror in bootstrap stage2 and later. +# Change the default to "no" on release branches. +# Check whether --enable-werror or --disable-werror was given. +if test "${enable_werror+set}" = set; then + enableval="$enable_werror" + : +else + enable_werror=yes +fi + +case ${enable_error} in + yes) WERROR=-Werror ;; + *) WERROR= ;; +esac + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -4233,6 +4657,12 @@ s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g s%@build_subdir@%$build_subdir%g s%@host_subdir@%$host_subdir%g s%@target_subdir@%$target_subdir%g +s%@CC@%$CC%g +s%@GNATBIND@%$GNATBIND%g +s%@stage1_languages@%$stage1_languages%g +s%@DEFAULT_YACC@%$DEFAULT_YACC%g +s%@DEFAULT_M4@%$DEFAULT_M4%g +s%@DEFAULT_LEX@%$DEFAULT_LEX%g /@maybe_dependencies@/r $maybe_dependencies s%@maybe_dependencies@%%g /@serialization_dependencies@/r $serialization_dependencies @@ -4249,7 +4679,6 @@ s%@SET_LIB_PATH@%$SET_LIB_PATH%g s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g s%@BUILD_PREFIX@%$BUILD_PREFIX%g s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g -s%@configlinks@%$configlinks%g s%@gcc_version_trigger@%$gcc_version_trigger%g s%@gcc_version@%$gcc_version%g s%@tooldir@%$tooldir%g @@ -4288,12 +4717,8 @@ s%@OBJCOPY@%$OBJCOPY%g s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g s%@OBJDUMP@%$OBJDUMP%g s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g -s%@CC@%$CC%g s%@CXX@%$CXX%g s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g -s%@DEFAULT_YACC@%$DEFAULT_YACC%g -s%@DEFAULT_LEX@%$DEFAULT_LEX%g -s%@DEFAULT_M4@%$DEFAULT_M4%g s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g @@ -4319,6 +4744,8 @@ s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g +s%@stage1_cflags@%$stage1_cflags%g +s%@WERROR@%$WERROR%g CEOF EOF diff --git a/configure.in b/configure.in index 6b8154a..d94a11d 100644 --- a/configure.in +++ b/configure.in @@ -747,273 +747,6 @@ case "${noconfigdirs}" in *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;; esac -# Figure out what language subdirectories are present. -# Look if the user specified --enable-languages="..."; if not, use -# the environment variable $LANGUAGES if defined. $LANGUAGES might -# go away some day. -# NB: embedded tabs in this IF block -- do not untabify -if test x"${enable_languages+set}" != xset; then - if test x"${LANGUAGES+set}" = xset; then - enable_languages="${LANGUAGES}" - echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 - else - enable_languages=all - fi -else - if test x"${enable_languages}" = x || - test x"${enable_languages}" = xyes; - then - echo configure.in: --enable-languages needs at least one language argument 1>&2 - exit 1 - fi -fi -enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'` - -# First scan to see if an enabled language requires some other language. -# We assume that a given config-lang.in will list all the language -# front ends it requires, even if some are required indirectly. -for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do - case ${lang_frag} in - ..) ;; - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/gcc/[[*]]/config-lang.in) ;; - *) - # From the config-lang.in, get $language, $lang_requires - language= - lang_requires= - . ${lang_frag} - for other in ${lang_requires} ; do - case ,${enable_languages}, in - *,$other,*) ;; - *,all,*) ;; - *,$language,*) - echo " \`$other' language required by \`$language'; enabling" 1>&2 - enable_languages="${enable_languages},${other}" - ;; - esac - done - ;; - esac -done - -for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do - case ${lang_frag} in - ..) ;; - # The odd quoting in the next line works around - # an apparent bug in bash 1.12 on linux. - ${srcdir}/gcc/[[*]]/config-lang.in) ;; - *) - # From the config-lang.in, get $language, $target_libs, - # $lang_dirs, and $build_by_default - language= - target_libs= - lang_dirs= - build_by_default= - . ${lang_frag} - if test "x$language" = x ; then - echo "${lang_frag} doesn't set \$language." 1>&2 - exit 1 - fi - case ,${enable_languages}, in - *,${language},*) - # Language was explicitly selected; include it. - add_this_lang=yes - ;; - *,all,*) - # 'all' was selected; include 'default' languages. - case ${build_by_default} in - no) add_this_lang=no ;; - *) add_this_lang=yes ;; - esac - ;; - *) add_this_lang=no ;; - esac - case ${add_this_lang} in - no) - # Remove language-dependent dirs. - eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" - ;; - esac - ;; - esac -done - -# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and -# $target_configdirs. -# If we have the source for $noconfigdirs entries, add them to $notsupp. - -notsupp="" -for dir in . $skipdirs $noconfigdirs ; do - dirname=`echo $dir | sed -e s/target-//g` - if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` - if test -r $srcdir/$dirname/configure ; then - if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then - true - else - notsupp="$notsupp $dir" - fi - fi - fi - if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` - if test -r $srcdir/$dirname/configure ; then - if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then - true - else - notsupp="$notsupp $dir" - fi - fi - fi -done - -# Sometimes the tools are distributed with libiberty but with no other -# libraries. In that case, we don't want to build target-libiberty. -if test -n "${target_configdirs}" ; then - others= - for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do - if test "$i" != "libiberty" ; then - if test -r $srcdir/$i/configure ; then - others=yes; - break; - fi - fi - done - if test -z "${others}" ; then - target_configdirs= - fi -fi - -# Quietly strip out all directories which aren't configurable in this tree. -# This relies on all configurable subdirectories being autoconfiscated, which -# is now the case. -configdirs_all="$configdirs" -configdirs= -for i in ${configdirs_all} ; do - if test -f ${srcdir}/$i/configure ; then - configdirs="${configdirs} $i" - fi -done -target_configdirs_all="$target_configdirs" -target_configdirs= -for i in ${target_configdirs_all} ; do - j=`echo $i | sed -e s/target-//g` - if test -f ${srcdir}/$j/configure ; then - target_configdirs="${target_configdirs} $i" - fi -done - -# Produce a warning message for the subdirs we can't configure. -# This isn't especially interesting in the Cygnus tree, but in the individual -# FSF releases, it's important to let people know when their machine isn't -# supported by the one or two programs in a package. - -if test -n "${notsupp}" && test -z "${norecursion}" ; then - # If $appdirs is non-empty, at least one of those directories must still - # be configured, or we error out. (E.g., if the gas release supports a - # specified target in some subdirs but not the gas subdir, we shouldn't - # pretend that all is well.) - if test -n "$appdirs" ; then - for dir in $appdirs ; do - if test -r $dir/Makefile.in ; then - if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - appdirs="" - break - fi - if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then - appdirs="" - break - fi - fi - done - if test -n "$appdirs" ; then - echo "*** This configuration is not supported by this package." 1>&2 - exit 1 - fi - fi - # Okay, some application will build, or we don't care to check. Still - # notify of subdirs not getting built. - echo "*** This configuration is not supported in the following subdirectories:" 1>&2 - echo " ${notsupp}" 1>&2 - echo " (Any other directories should still work fine.)" 1>&2 -fi - -case "$host" in - *msdosdjgpp*) - enable_gdbtk=no ;; -esac - -copy_dirs= - -# Handle --with-headers=XXX. If the value is not "yes", the contents of -# the named directory are copied to $(tooldir)/sys-include. -if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then - if test x${is_cross_compiler} = xno ; then - echo 1>&2 '***' --with-headers is only supported when cross compiling - exit 1 - fi - if test x"${with_headers}" != xyes ; then - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" - fi -fi - -# Handle --with-libs=XXX. If the value is not "yes", the contents of -# the name directories are copied to $(tooldir)/lib. Multiple directories -# are permitted. -if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then - if test x${is_cross_compiler} = xno ; then - echo 1>&2 '***' --with-libs is only supported when cross compiling - exit 1 - fi - if test x"${with_libs}" != xyes ; then - # Copy the libraries in reverse order, so that files in the first named - # library override files in subsequent libraries. - case "${exec_prefixoption}" in - "") x=${prefix} ;; - *) x=${exec_prefix} ;; - esac - for l in ${with_libs}; do - copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" - done - fi -fi - -# Handle ${copy_dirs} -set fnord ${copy_dirs} -shift -while test $# != 0 ; do - if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then - : - else - echo Copying $1 to $2 - - # Use the install script to create the directory and all required - # parent directories. - if test -d $2 ; then - : - else - echo >config.temp - ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED - fi - - # Copy the directory, assuming we have tar. - # FIXME: Should we use B in the second tar? Not all systems support it. - (cd $1; tar -cf - .) | (cd $2; tar -xpf -) - - # It is the responsibility of the user to correctly adjust all - # symlinks. If somebody can figure out how to handle them correctly - # here, feel free to add the code. - - echo $1 > $2/COPIED - fi - shift; shift -done - # Work in distributions that contain no compiler tools, like Autoconf. tentative_cc="" host_makefile_frag=/dev/null @@ -1165,120 +898,6 @@ case "${host}" in esac fi -extra_arflags_for_target= -extra_nmflags_for_target= -extra_ranlibflags_for_target= -target_makefile_frag=/dev/null -case "${target}" in - i[[3456789]]86-*-netware*) - target_makefile_frag="config/mt-netware" - ;; - powerpc-*-netware*) - target_makefile_frag="config/mt-netware" - ;; - *-*-linux*) - target_makefile_frag="config/mt-linux" - ;; - *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*) - # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm - # commands to handle both 32-bit and 64-bit objects. These flags are - # harmless if we're using GNU nm or ar. - extra_arflags_for_target=" -X32_64" - extra_nmflags_for_target=" -B -X32_64" - ;; - *-*-darwin*) - # ranlib from Darwin requires the -c flag to look at common symbols. - extra_ranlibflags_for_target=" -c" - ;; - mips*-*-pe | sh*-*-pe | *arm-wince-pe) - target_makefile_frag="config/mt-wince" - ;; -esac - -alphaieee_frag=/dev/null -case $target in - alpha*-*-*) - # This just makes sure to use the -mieee option to build target libs. - # This should probably be set individually by each library. - alphaieee_frag="config/mt-alphaieee" - ;; -esac - -# If --enable-target-optspace always use -Os instead of -O2 to build -# the target libraries, similarly if it is not specified, use -Os -# on selected platforms. -ospace_frag=/dev/null -case "${enable_target_optspace}:${target}" in - yes:*) - ospace_frag="config/mt-ospace" - ;; - :d30v-*) - ospace_frag="config/mt-d30v" - ;; - :m32r-* | :d10v-* | :fr30-*) - ospace_frag="config/mt-ospace" - ;; - no:* | :*) - ;; - *) - echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 - ;; -esac - -# Set with_gnu_as and with_gnu_ld as appropriate. -# -# This is done by determining whether or not the appropriate directory -# is available, and by checking whether or not specific configurations -# have requested that this magic not happen. -# -# The command line options always override the explicit settings in -# configure.in, and the settings in configure.in override this magic. -# -# If the default for a toolchain is to use GNU as and ld, and you don't -# want to do that, then you should use the --without-gnu-as and -# --without-gnu-ld options for the configure script. - -if test x${use_gnu_as} = x && - echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then - with_gnu_as=yes - extra_host_args="$extra_host_args --with-gnu-as" -fi - -if test x${use_gnu_ld} = x && - echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then - with_gnu_ld=yes - extra_host_args="$extra_host_args --with-gnu-ld" -fi - -# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure -# can detect this case. - -if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then - with_newlib=yes - extra_host_args="$extra_host_args --with-newlib" -fi - - -# Default to using --with-stabs for certain targets. -if test x${with_stabs} = x ; then - case "${target}" in - mips*-*-irix[[56]]*) - ;; - mips*-*-* | alpha*-*-osf*) - with_stabs=yes; - extra_host_args="${extra_host_args} --with-stabs" - ;; - esac -fi - -# hpux11 in 64bit mode has libraries in a weird place. Arrange to find -# them automatically. -case "${host}" in - hppa*64*-*-hpux11*) - extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" - ;; -esac - # If we aren't going to be using gcc, see if we can extract a definition # of CC from the fragment. # Actually, use the 'pre-extracted' version above. @@ -1298,68 +917,6 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then fi fi -# Some systems (e.g., one of the i386-aix systems the gas testers are -# using) don't handle "\$" correctly, so don't use it here. -tooldir='${exec_prefix}'/${target_alias} -build_tooldir=${tooldir} - -# Generate a default definition for YACC. This is used if the makefile can't -# locate bison or byacc in objdir. - -for prog in 'bison -y' byacc yacc -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_YACC="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_YACC" && break -done - -# Generate a default definition for M4. This is used if the makefile can't -# locate m4 in objdir. - -for prog in gm4 gnum4 m4 -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_M4="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_M4" && break -done - -# Generate a default definition for LEX. This is used if the makefile can't -# locate flex in objdir. - -for prog in flex lex -do - set dummy $prog; tmp=$2 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/$tmp; then - DEFAULT_LEX="$prog" - break - fi - done - IFS="$save_ifs" - - test -n "$DEFAULT_LEX" && break -done - if test "${build}" != "${host}" ; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -1511,50 +1068,442 @@ EOF CXXFLAGS=${CXXFLAGS-"-g -O2"} fi -# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) -# Set up the list of links to be made. -# ${links} is the list of link names, and ${files} is the list of names to link to. +ACX_PROG_GNAT -# Make the links. -configlinks="${links}" -if test -r ./config.status ; then - mv -f ./config.status ./config.back -fi -while test -n "${files}" ; do - # set file to car of files, files to cdr of files - set ${files}; file=$1; shift; files=$* - set ${links}; link=$1; shift; links=$* - - if test ! -r ${srcdir}/${file} ; then - if test ! -r ${file} ; then - echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2 - echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2 - exit 1 +# By default, C is the only stage 1 language. +stage1_languages=c +AC_SUBST(stage1_languages) + +# Figure out what language subdirectories are present. +# Look if the user specified --enable-languages="..."; if not, use +# the environment variable $LANGUAGES if defined. $LANGUAGES might +# go away some day. +# NB: embedded tabs in this IF block -- do not untabify +if test -d ${srcdir}/gcc; then + if test x"${enable_languages+set}" != xset; then + if test x"${LANGUAGES+set}" = xset; then + enable_languages="${LANGUAGES}" + echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2 else - srcfile=${file} + enable_languages=all fi else - srcfile=${srcdir}/${file} + if test x"${enable_languages}" = x || + test x"${enable_languages}" = xyes; + then + echo configure.in: --enable-languages needs at least one language argument 1>&2 + exit 1 + fi fi + enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'` + + # First scan to see if an enabled language requires some other language. + # We assume that a given config-lang.in will list all the language + # front ends it requires, even if some are required indirectly. + for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do + case ${lang_frag} in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[[*]]/config-lang.in) ;; + *) + # From the config-lang.in, get $language, $lang_requires + language= + lang_requires= + . ${lang_frag} + for other in ${lang_requires} ; do + case ,${enable_languages}, in + *,$other,*) ;; + *,all,*) ;; + *,$language,*) + echo " \`$other' language required by \`$language'; enabling" 1>&2 + enable_languages="${enable_languages},${other}" + ;; + esac + done + ;; + esac + done - ${remove} -f ${link} - # Make a symlink if possible, otherwise try a hard link - if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then - true - else - # We need to re-remove the file because Lynx leaves a - # very strange directory there when it fails an NFS symlink. - ${remove} -r -f ${link} - ${hard_link} ${srcfile} ${link} + new_enable_languages=c + missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ ` + + for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do + case ${lang_frag} in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[[*]]/config-lang.in) ;; + *) + # From the config-lang.in, get $language, $target_libs, + # $lang_dirs, $boot_language, and $build_by_default + language= + target_libs= + lang_dirs= + boot_language= + build_by_default= + . ${lang_frag} + # This is quite sensitive to the ordering of the case statement arms. + case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in + *::*:*) + echo "${lang_frag} doesn't set \$language." 1>&2 + exit 1 + ;; + *:ada:no:*) + # Ada was requested with no preexisting GNAT. Disable unconditionally. + add_this_lang=no + ;; + *,${language},*:*:*:*) + # Language was explicitly selected; include it. + add_this_lang=yes + ;; + *,all,*:*:*:no) + # 'all' was selected, but this is not a default language + # so do not include it. + add_this_lang=no + ;; + *,all,*:*:*:*) + # 'all' was selected and this is a default language; include it. + add_this_lang=yes + ;; + *) + add_this_lang=no + ;; + esac + case $add_this_lang in + no) + # Remove language-dependent dirs. + eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" + ;; + *) + new_enable_languages="$new_enable_languages,$language" + missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"` + case ${boot_language} in + yes) + # Add to (space-separated) list of stage 1 languages. + stage1_languages="${stage1_languages} ${language}" + ;; + esac + ;; + esac + ;; + esac + done + + missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"` + if test "x$missing_languages" != x; then + AC_MSG_ERROR([ +The following requested languages were not found: ${missing_languages}]) + fi + + if test "x$new_enable_languages" != "x$enable_languages"; then + echo The following languages will be built: ${new_enable_languages} + fi + enable_languages="$new_enable_languages" + ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ ` +fi + +# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and +# $target_configdirs. +# If we have the source for $noconfigdirs entries, add them to $notsupp. + +notsupp="" +for dir in . $skipdirs $noconfigdirs ; do + dirname=`echo $dir | sed -e s/target-//g` + if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"` + if test -r $srcdir/$dirname/configure ; then + if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then + true + else + notsupp="$notsupp $dir" + fi + fi + fi + if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"` + if test -r $srcdir/$dirname/configure ; then + if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then + true + else + notsupp="$notsupp $dir" + fi + fi + fi +done + +# Sometimes the tools are distributed with libiberty but with no other +# libraries. In that case, we don't want to build target-libiberty. +if test -n "${target_configdirs}" ; then + others= + for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do + if test "$i" != "libiberty" ; then + if test -r $srcdir/$i/configure ; then + others=yes; + break; + fi + fi + done + if test -z "${others}" ; then + target_configdirs= fi - if test ! -r ${link} ; then - echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2 +fi + +# Quietly strip out all directories which aren't configurable in this tree. +# This relies on all configurable subdirectories being autoconfiscated, which +# is now the case. +configdirs_all="$configdirs" +configdirs= +for i in ${configdirs_all} ; do + if test -f ${srcdir}/$i/configure ; then + configdirs="${configdirs} $i" + fi +done +target_configdirs_all="$target_configdirs" +target_configdirs= +for i in ${target_configdirs_all} ; do + j=`echo $i | sed -e s/target-//g` + if test -f ${srcdir}/$j/configure ; then + target_configdirs="${target_configdirs} $i" + fi +done + +# Produce a warning message for the subdirs we can't configure. +# This isn't especially interesting in the Cygnus tree, but in the individual +# FSF releases, it's important to let people know when their machine isn't +# supported by the one or two programs in a package. + +if test -n "${notsupp}" && test -z "${norecursion}" ; then + # If $appdirs is non-empty, at least one of those directories must still + # be configured, or we error out. (E.g., if the gas release supports a + # specified target in some subdirs but not the gas subdir, we shouldn't + # pretend that all is well.) + if test -n "$appdirs" ; then + for dir in $appdirs ; do + if test -r $dir/Makefile.in ; then + if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + appdirs="" + break + fi + if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then + appdirs="" + break + fi + fi + done + if test -n "$appdirs" ; then + echo "*** This configuration is not supported by this package." 1>&2 + exit 1 + fi + fi + # Okay, some application will build, or we don't care to check. Still + # notify of subdirs not getting built. + echo "*** This configuration is not supported in the following subdirectories:" 1>&2 + echo " ${notsupp}" 1>&2 + echo " (Any other directories should still work fine.)" 1>&2 +fi + +case "$host" in + *msdosdjgpp*) + enable_gdbtk=no ;; +esac + +copy_dirs= + +# Handle --with-headers=XXX. If the value is not "yes", the contents of +# the named directory are copied to $(tooldir)/sys-include. +if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-headers is only supported when cross compiling exit 1 fi + if test x"${with_headers}" != xyes ; then + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include" + fi +fi - echo "Linked \"${link}\" to \"${srcfile}\"." +# Handle --with-libs=XXX. If the value is not "yes", the contents of +# the name directories are copied to $(tooldir)/lib. Multiple directories +# are permitted. +if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then + if test x${is_cross_compiler} = xno ; then + echo 1>&2 '***' --with-libs is only supported when cross compiling + exit 1 + fi + if test x"${with_libs}" != xyes ; then + # Copy the libraries in reverse order, so that files in the first named + # library override files in subsequent libraries. + case "${exec_prefixoption}" in + "") x=${prefix} ;; + *) x=${exec_prefix} ;; + esac + for l in ${with_libs}; do + copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}" + done + fi +fi + +# Handle ${copy_dirs} +set fnord ${copy_dirs} +shift +while test $# != 0 ; do + if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then + : + else + echo Copying $1 to $2 + + # Use the install script to create the directory and all required + # parent directories. + if test -d $2 ; then + : + else + echo >config.temp + ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED + fi + + # Copy the directory, assuming we have tar. + # FIXME: Should we use B in the second tar? Not all systems support it. + (cd $1; tar -cf - .) | (cd $2; tar -xpf -) + + # It is the responsibility of the user to correctly adjust all + # symlinks. If somebody can figure out how to handle them correctly + # here, feel free to add the code. + + echo $1 > $2/COPIED + fi + shift; shift done +extra_arflags_for_target= +extra_nmflags_for_target= +extra_ranlibflags_for_target= +target_makefile_frag=/dev/null +case "${target}" in + i[[3456789]]86-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + powerpc-*-netware*) + target_makefile_frag="config/mt-netware" + ;; + *-*-linux*) + target_makefile_frag="config/mt-linux" + ;; + *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*) + # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm + # commands to handle both 32-bit and 64-bit objects. These flags are + # harmless if we're using GNU nm or ar. + extra_arflags_for_target=" -X32_64" + extra_nmflags_for_target=" -B -X32_64" + ;; + *-*-darwin*) + # ranlib from Darwin requires the -c flag to look at common symbols. + extra_ranlibflags_for_target=" -c" + ;; + mips*-*-pe | sh*-*-pe | *arm-wince-pe) + target_makefile_frag="config/mt-wince" + ;; +esac + +alphaieee_frag=/dev/null +case $target in + alpha*-*-*) + # This just makes sure to use the -mieee option to build target libs. + # This should probably be set individually by each library. + alphaieee_frag="config/mt-alphaieee" + ;; +esac + +# If --enable-target-optspace always use -Os instead of -O2 to build +# the target libraries, similarly if it is not specified, use -Os +# on selected platforms. +ospace_frag=/dev/null +case "${enable_target_optspace}:${target}" in + yes:*) + ospace_frag="config/mt-ospace" + ;; + :d30v-*) + ospace_frag="config/mt-d30v" + ;; + :m32r-* | :d10v-* | :fr30-*) + ospace_frag="config/mt-ospace" + ;; + no:* | :*) + ;; + *) + echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2 + ;; +esac + +# Set with_gnu_as and with_gnu_ld as appropriate. +# +# This is done by determining whether or not the appropriate directory +# is available, and by checking whether or not specific configurations +# have requested that this magic not happen. +# +# The command line options always override the explicit settings in +# configure.in, and the settings in configure.in override this magic. +# +# If the default for a toolchain is to use GNU as and ld, and you don't +# want to do that, then you should use the --without-gnu-as and +# --without-gnu-ld options for the configure script. + +if test x${use_gnu_as} = x && + echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then + with_gnu_as=yes + extra_host_args="$extra_host_args --with-gnu-as" +fi + +if test x${use_gnu_ld} = x && + echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then + with_gnu_ld=yes + extra_host_args="$extra_host_args --with-gnu-ld" +fi + +# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure +# can detect this case. + +if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then + with_newlib=yes + extra_host_args="$extra_host_args --with-newlib" +fi + + +# Default to using --with-stabs for certain targets. +if test x${with_stabs} = x ; then + case "${target}" in + mips*-*-irix[[56]]*) + ;; + mips*-*-* | alpha*-*-osf*) + with_stabs=yes; + extra_host_args="${extra_host_args} --with-stabs" + ;; + esac +fi + +# hpux11 in 64bit mode has libraries in a weird place. Arrange to find +# them automatically. +case "${host}" in + hppa*64*-*-hpux11*) + extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" + ;; +esac + +# Some systems (e.g., one of the i386-aix systems the gas testers are +# using) don't handle "\$" correctly, so don't use it here. +tooldir='${exec_prefix}'/${target_alias} +build_tooldir=${tooldir} + +# Generate default definitions for YACC, M4, LEX. These are used if the +# Makefile can't locate these programs in objdir. +MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing +AC_CHECK_PROGS([DEFAULT_YACC], ['bison -y' byacc yacc], [$MISSING bison]) +AC_CHECK_PROGS([DEFAULT_M4], [gm4 gnum4 m4], [$MISSING m4]) +AC_CHECK_PROGS([DEFAULT_LEX], [flex lex], [$MISSING flex]) + # Create a .gdbinit file which runs the one in srcdir # and tells GDB to look there for source files. @@ -2047,7 +1996,6 @@ AC_SUBST(SET_LIB_PATH) AC_SUBST(RPATH_ENVVAR) AC_SUBST(BUILD_PREFIX) AC_SUBST(BUILD_PREFIX_1) -AC_SUBST(configlinks) AC_SUBST(gcc_version_trigger) AC_SUBST(gcc_version) AC_SUBST(tooldir) @@ -2154,4 +2102,37 @@ fi MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl +# --------------------- +# GCC bootstrap support +# --------------------- + +# Stage specific cflags for build. +stage1_cflags="-g" +case $build in + vax-*-*) + case ${GCC} in + yes) stage1_cflags="-g -Wa,-J" ;; + *) stage1_cflags="-g -J" ;; + esac ;; + powerpc-*-darwin*) + # The spiffy cpp-precomp chokes on some legitimate constructs in GCC + # sources; use -no-cpp-precomp to get to GNU cpp. + # Apple's GCC has bugs in designated initializer handling, so disable + # that too. + stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" + ;; +esac +AC_SUBST(stage1_cflags) + +# Enable -Werror in bootstrap stage2 and later. +# Change the default to "no" on release branches. +AC_ARG_ENABLE(werror, +[ --enable-werror enable -Werror in bootstrap stage2 and later], [], +[enable_werror=yes]) +case ${enable_error} in + yes) WERROR=-Werror ;; + *) WERROR= ;; +esac +AC_SUBST(WERROR) + AC_OUTPUT(Makefile) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 486d14e..16e852a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,506 @@ +2004-03-21 Andrew Cagney <cagney@redhat.com> + + * infrun.c (handle_inferior_event): For non legacy frames, use the + frame ID and frame type to identify a signal trampoline. Update + comments. + +2004-03-21 Nathan J. Williams <nathanw@wasabisystems.com> + + * mipsnbsd-tdep.c: Update copyright. Include "mips-tdep.h". + * Makefile.in (mipsnbsd-tdep.o): Update dependencies. + +2004-03-21 Andrew Cagney <cagney@redhat.com> + + * frame-unwind.h: Update copyright. + (struct frame_data): Add opaque declaration. + (frame_sniffer_ftype): Declare. + (struct frame_unwind): Add "unwind_data" and "sniffer". + (frame_unwind_register_unwinder): Declare. + (frame_unwind_find_by_frame): Add parameter "this_cache". + * frame.c (get_frame_id, create_new_frame, legacy_get_prev_frame) + (legacy_get_prev_frame, legacy_get_prev_frame) + (get_frame_type): Pass the prologue_cache to + frame_unwind_find_by_frame. + * frame-unwind.c (struct frame_unwind_table_entry): Add field + "unwinder". + (frame_unwind_register_unwinder): New function. + (frame_unwind_find_by_frame): Handle an unwind sniffer. + +2004-03-20 Paul Hilfinger <hilfingr@nile.gnat.com> + + * bcache.c (print_percentage): Use floating point to avoid + incorrect results when portion*100 overflows. + +2004-03-19 Kevin Buettner <kevinb@redhat.com> + + * ppc_tdep.h (ppc_linux_frame_saved_pc) + (ppc_linux_init_extra_frame_info) + (ppc_linux_frameless_function_invocation) + (ppc_linux_frame_init_saved_regs, ppc_linux_frame_chain) + (rs6000_frame_saved_pc, rs6000_init_extra_frame_info) + (rs6000_frameless_function_invocation, rs6000_frame_init_saved_regs) + (rs6000_frame_chain): Delete declarations. + * ppc-linux-tdep.c (ppc_linux_frame_saved_pc) + (ppc_linux_init_extra_frame_info) + (ppc_linux_frameless_function_invocation) + (ppc_linux_frame_init_saved_regs, ppc_linux_frame_chain): Delete. + (ppc_linux_init_abi): Remove registration of above deleted functions. + * rs6000-tdep.c (rs6000_init_extra_frame_info) + (rs6000_frame_init_saved_regs, rs6000_init_frame_pc_first) + (rs6000_frame_args_address, rs6000_saved_pc_after_call) + (rs6000_pop_frame, rs6000_frameless_function_invocation) + (rs6000_frame_saved_pc, rs6000_frame_chain): Delete. + (rs6000_gdbarch_init): Remove registration of above deleted functions. + Use rs6000_unwind_pc(), rs6000_frame_sniffer(), + rs6000_unwind_dummy_id(), and rs6000_frame_base_sniffer() for + frame management for all OSABIs. + +2004-03-19 Andrew Cagney <cagney@redhat.com> + + Committed by Kevin Buettner <kevinb@redhat.com>. + + * ppc-linux-tdep.c: Include "trad-frame.h", and "frame-unwind.h". + Update copyright. + (struct ppc_linux_sigtramp_cache, ppc_linux_sigtramp_cache) + (ppc_linux_sigtramp_this_id, ppc_linux_sigtramp_prev_register) + (ppc_linux_sigtramp_unwind, ppc_linux_sigtramp_sniffer) + (ppc_linux_init_abi): Add both 32- and 64-bit signal trampoline + unwinders. #ifdef legacy frame code. + * rs6000-tdep.c: Include "trad-frame.h", "frame-unwind.h", and + "frame-base.h". + (rs6000_unwind_pc, rs6000_unwind_dummy_id) + (struct rs6000_frame_cache, rs6000_frame_cache) + (rs6000_frame_this_id, rs6000_frame_prev_register) + (rs6000_frame_sniffer, rs6000_frame_unwind) + (rs6000_frame_base_address, rs6000_frame_base_sniffer) + (rs6000_frame_base): Implement a traditional frame unwinder. + (rs6000_gdbarch_init): When unknown, NetBSD, or GNU/Linux use the + frame unwinder. + +2004-03-19 Kevin Buettner <kevinb@redhat.com> + + * breakpoint.c (adjust_breakpoint_address): Don't adjust + breakpoint address for watchpoints or the catch eventpoints. + Add new paramter ``bptype''. Adjust all callers. + +2004-03-19 Andrew Cagney <cagney@redhat.com> + + * config/pa/tm-hppa.h (GDB_TARGET_IS_HPPA): Delete unused macro. + + * PROBLEMS: Delete note that ARM does not use frame code, problem + fixed. + +2004-03-18 Andrew Cagney <cagney@redhat.com> + + * stack.c (return_command): Delete code wrapped in #ifdef + DEPRECATED_CALL_DUMMY_HAS_COMPLETED, macro no longer defined. + + * rs6000-tdep.c (skip_prologue): Record only the first LR save. + +2004-03-18 Andrew Cagney <cagney@redhat.com> + + * config/mips/tm-nbsd.h: Replace IN_SIGTRAMP with + DEPRECATED_IN_SIGTRAMP. + * config/powerpc/tm-linux.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/mips/tm-linux.h (DEPRECATED_IN_SIGTRAMP) Ditto. + * config/mips/tm-irix6.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/mips/tm-irix5.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/ia64/tm-linux.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/ia64/tm-aix.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/arm/tm-linux.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * config/arm/tm-embed.h (DEPRECATED_IN_SIGTRAMP): Ditto. + * arch-utils.c (legacy_pc_in_sigtramp): Ditto. + * arch-utils.h: Remove reference to IN_SIGTRAMP in comment. + +2004-03-18 Andrew Cagney <cagney@redhat.com> + + * frame-base.c: Update copyright. Include "gdb_obstack.h". + (struct frame_base_table_entry): Define. + (struct frame_base_table): Re-implement as a linked list. + (frame_base_init): Re-implement. + (frame_base_table): Delete function. + (append_predicate): Delete function. + (frame_base_append_sniffer): Update. + (frame_base_set_default): Update. + (frame_base_find_by_frame): Update. + (_initialize_frame_base): Use gdbarch_data_register_pre_init. + * Makefile.in (frame-base.o): Update dependencies. + +2004-03-17 Andrew Cagney <cagney@redhat.com> + + * frame.c (legacy_get_prev_frame): Pass correct frame to + frame_unwind_find_by_frame. + +2004-03-17 David Carlton <carlton@kealia.com> + + * NEWS: Mention C++ nested types and namespaces + +2004-03-16 Michael Chastain <mec.gnu@mindspring.com> + + * PROBLEMS: Add section headers, "Regressions since gdb 6.0" + and "Regressions since gdb 5.3.". Add known regressions since + gdb 6.0. + +2004-03-16 David Carlton <carlton@kealia.com> + + * dwarf2read.c (process_structure_scope): Process children even + when we're a declaration. + +2004-03-16 Andrew Cagney <cagney@redhat.com> + + * symtab.h (find_pc_sect_partial_function): Delete declaration. + * blockframe.c (find_pc_partial_function) + (find_pc_sect_partial_function): Merge into a single + find_pc_partial_function. + +2004-03-16 Mark Kettenis <kettenis@gnu.org> + + * i386bsd-nat.c: s/regno/regnum/g. + (fetch_inferior_registers): Use I386_ST0_REGNUM instead of + FP0_REGNUM. + (store_inferior_registers): Likewise. + +2004-03-16 Mark Kettenis <kettenis@gnu.org> + + * i386bsd-nat.c (fill_fpregset): Call i387_collect_fsave instead + of i387_fill_fsave. + (store_inferior_registers): Call i387_collect_fsave and + i387_collect_fxsave instead of i387_fill_fsave and + i387_fill_fxsave. + +2004-03-15 Andrew Cagney <cagney@redhat.com> + + * Makefile.in (frame-unwind.o): Update dependencies. + * frame-unwind.c: Include "gdb_obstack.h". + (frame_unwind_init): Replace "gdbarch" parameter with an "obstack" + parameter. + (append_predicate): Delete function. + (struct frame_unwind_table_entry): New structure. + (struct frame_unwind_table): Replace "sniffer" with "head" and + "tail". + (frame_unwind_append_sniffer): Update. + (frame_unwind_find_by_frame): Update. + (_initialize_frame_unwind): Registe frame_unwind_init using + gdbarch_data_register_pre_init. + +2004-03-15 Mark Kettenis <kettenis@gnu.org> + + * i386bsd-nat.c: Update copyright year. + (CANNOT_FETCH_REGISTER, CANNOT_STORE_REGISTER): Undefine and then + define unconditionally. + +2004-03-15 Mark Kettenis <kettenis@gnu.org> + + * i387-tdep.h (i387_collect_fsave): New prototype. + * i387-tdep.c (i387_collect_fsave): New function containing most + of the code from i387_fill_fsave. + (i387_fill_fsave): Call i387_collect_fsave. + +2004-03-15 Mark Kettenis <kettenis@gnu.org> + + * i386-linux-tdep.c: Update copyright year. + (i386_linux_svr4_fetch_link_map_offsets): Remove function. + (i386_linux_init_abi): Set solib_svr4_fetch_link_maop_offsets to + svr4_ilp32_link_map_offsets instead of + i386_linux_svr4_fetch_link_map_offsets. + +2004-03-15 David Carlton <carlton@kealia.com> + + Fix for PR c++/1553: + * dwarf2read.c (read_structure_type): Determine type name by + calling determine_class_name. + (determine_class_name): New. + (determine_prefix): Look at TYPE_TAG_NAME and call + determine_class_name when appropriate. + (determine_prefix_aux, class_name): Delete. + +2004-03-15 Kevin Buettner <kevinb@redhat.com> + + * breakpoint.c (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete + unused macro definition. The definition in target.h (or perhaps + elsewhere) takes precedence. + +2004-03-15 Andrew Cagney <cagney@redhat.com> + + * ppc-tdep.h: Update copyright. + (ppc_linux_supply_gregset, ppc_linux_supply_fpregset): Change + function signatures to match "regsets.h". + * ppc-linux-tdep.c: Include "regset.h". + (ELF_GREGSET_SIZE): Delete. + (right_supply_register): New function. + (ppc_linux_supply_fpregset, ppc_linux_supply_gregset): Rewrite + using right_supply_register. + (ppc32_linux_supply_gregset, ppc64_linux_supply_gregset): New + functions. + (ppc64_linux_gregset, ppc32_linux_gregset): Define. + (ppc_linux_init_abi): Register ppc_linux_regset_from_core_section. + (_initialize_ppc_linux_tdep): Do not register + ppc_linux_regset_core_fns. + (ppc_linux_regset_from_core_section): Replace + fetch_core_registers. + (ppc_linux_regset_core_fns): Delete. + * ppc-linux-nat.c: (right_fill_reg): New function. + (supply_gregset): Update call to ppc_linux_supply_gregset. + (fill_gregset): Clear the register set, use right_fill_reg. + (supply_fpregset): Update call to ppc_linux_supply_fpregset. + (fill_fpregset): Use right_fill_reg, correctly compute FP offsets. + + * rs6000-tdep.c (rs6000_register_virtual_type): Make registers + unsigned. + +2004-03-15 Andrew Cagney <cagney@redhat.com> + + * gdbarch.sh (gdbarch_data_pre_init_fytpe) + (gdbarch_data_register_pre_init, gdbarch_data_post_init_fytpe) + (gdbarch_data_register_post_init): Replace gdbarch_data_init_ftype + and register_gdbarch_data. + (deprecated_set_gdbarch_data): Rename set_gdbarch_data. + (struct gdbarch_data): Replace "init" by "pre_init" and + "post_init". + * gdbarch.h, gdbarch.c: Re-generate. + * dwarf2-frame.c (dwarf2_frame_init): Replace "gdbarch" paramter + with"obstack", use OBSTACK_ZALLOC. + (dwarf2_frame_ops): Delete. + (dwarf2_frame_set_init_reg): Use gdbarch_data. + (dwarf2_frame_init_reg): Use gdbarch_data. + (_initialize_dwarf2_frame): Use gdbarch_data_register_pre_init. + * solib-svr4.c (set_solib_svr4_fetch_link_map_offsets) + (_initialize_svr4_solib): Update. + * user-regs.c (_initialize_user_regs): Update. + * reggroups.c (_initialize_reggroup): Update. + * regcache.c (_initialize_regcache): Update. + * mips-linux-tdep.c (_initialize_mips_linux_tdep): Update. + * libunwind-frame.c (_initialize_libunwind_frame): Update. + * gnu-v3-abi.c (init_gnuv3_ops): Update. + * frame-unwind.c (_initialize_frame_unwind): Update. + * frame-base.c (_initialize_frame_base): Update. + * user-regs.c (user_reg_add): Update. + * reggroups.c (reggroup_add): Update. + * mips-linux-tdep.c (set_mips_linux_register_addr): Update. + * libunwind-frame.c (libunwind_frame_set_descr): Update. + * frame-unwind.c (frame_unwind_append_sniffer): Update. + * frame-base.c (frame_base_table): Update. + * remote.c (_initialize_remote): Update. + * gdb_obstack.h (OBSTACK_ZALLOC, OBSTACK_CALLOC): Define. + +2004-03-15 Andrew Cagney <cagney@redhat.com> + + * cris-tdep.c (bfd_lookup_symbol): Delete unused function. + +2004-03-15 Kevin Buettner <kevinb@redhat.com> + + * Makefile.in (frv-linux-tdep.o): Add dependencies. + * frv-linux-tdep.c: New file. + * frv-tdep.c (struct gdbarch_tdep): Add new field + ``sigcontext_reg_addr''. + (frv_set_sigcontext_reg_addr, frv_sigtramp,frame_cache) + (frv_sigtramp_frame_this_id, frv_sigtramp_frame_prev_register) + (frv_sigramp_frame_sniffer): New functions. + (frv_sigtramp_frame_unwind): New static global. + (frv_gdbarch_init): Hook in ABI-specific overrides. Hook up frame + sniffers. + * frv-tdep.h (frv_set_sigcontext_reg_addr): New function. + * config/frv/frv.mt (TDEPFILES): Add frv-linux-tdep.o. + +2004-03-15 Kevin Buettner <kevinb@redhat.com> + + * frv-tdep.c (frv_analyze_prologue): Terminate prologue scan, + but not via a call to error(), when unable to read memory. + +2004-03-15 Kevin Buettner <kevinb@redhat.com> + + * frv-tdep.c (frv_call_dummy_words): Delete. + (frv_frame_unwind_cache): Delete unused variable, ``prev_sp''. + +2004-03-15 Andrew Cagney <cagney@redhat.com> + + * infrun.c (handle_step_into_function, step_over_function): Only + update and use STEP_FRAME_ID when the system is using legacy + frames. Update comments. + +2004-03-14 Mark Kettenis <kettenis@gnu.org> + + * amd64-linux-tdep.h: Remove file. + * amd64-linux-tdep.c: Don't include "inferior.h" and + "amd64-linux-tdep.h". Include "frame.h" and "solib-svr4.h". + (USER_R15, USER_R14, USER_R13, USER_R12, USER_RBP, USER_RBX) + (USER_R11, USER_R10, USER_R9, USER_R8, USER_RAX, USER_RCX) + (USER_RDX, USER_RSI, USER_RDI, USER_RIP, USER_CS, USER_EFLAGS) + (USER_RSP, USER_SS, USER_DS, USER_ES, USER_FS, USER_GS): Remove + macros. + (user_to_gdb_regmap): Remove variable. + (amd64_linux_gregset_reg_offset): New variable. + (amd64_core_fns): Remove variable. + (fetch_core_registers): Remove function. + (amd64_linux_supply_gregset, amd64_linux_fill_gregset): Remove + functions. + (_initialize_amd64_linux_tdep): Don't set add_core_fns. + * amd64-linux-nat.c: Don't include "amd64-linux-tdep.h". + * Makefile.in (amd64_linux_tdep_h): Remove. + (amd64-linux-nat.o): Update dependencies. + (amd64-linux-tdep.o): Update dependencies. + + * amd64-linux-nat.c (GETFPREGS_SUPPLIES): Remove macro. + (fetch_regs, fetch_fpregs, store_regs, store_fpregs): Remove + functions. + (fetch_inferior_registers, store_inferior_registers): Rewrite. + + * amd64-tdep.h (amd64_fill_fxsave): Remove prototype. + * amd64-tdep.c (amd64_fill_fxsave): Remove function. + +2004-03-14 Daniel Jacobowitz <drow@mvista.com> + + * dwarf2read.c (read_structure_type): Rename from + read_structure_scope. Don't create a symbol or call process_die. + Return immediately if die->type is set. Call read_type_die before + dwarf2_add_member_fn. + (process_structure_scope): New function. + (read_enumeration_type, process_enumeration_scope): New functions, + broken out from read_enumeration. Don't create the enumeration + type if it has already been created. + (read_enumeration): Removed. + (process_die): Call read_structure_type, process_structure_scope, + read_enumeration_type, and process_enumeration_scope. Just call + new_symbol for base and subrange types. Add a comment about other + type dies. + (read_type_die): Call read_enumeration_type. + (add_partial_structure, new_symbol): Update comments. + +2004-03-13 Stephane Carrez <stcarrez@nerim.fr> + + * m68hc11-tdep.c (m68hc11_register_name): Get soft reg information. + +2004-03-13 Stephane Carrez <stcarrez@nerim.fr> + + * tui/tui-win.h (tui_get_cmd_list): Declare. + * tui/tui-win.c (tui_command): New function. + (tui_get_cmd_list): New function. + (_initialize_tui_win): Moved initialization of tui command in + tui_get_cmd_list. + + * tui/tui-data.c (init_content_element): Setup new data members. + (init_win_info): Likewise. + (free_content_elements): Free it. + * tui/tui-data.h (struct tui_data_element): Store the register + content to print. + (struct tui_data_info): Keep the current register group. + + * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. + + * tui/tui-regs.h (tui_show_registers): Update prototype. + (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. + (tui_resize_all): No need to calculate anything for register window. + * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. + (tui_set_register_element, tui_set_general_regs_content): Remove. + (tui_set_special_regs_content): Remove. + (tui_set_general_and_special_regs_content): Remove. + (tui_set_float_regs_content): Remove. + (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. + (tui_set_regs_content): Remove. + (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. + (tui_v_show_registers_command_support): Remove. + (tui_show_registers): Use a reggroup to specify the registers to show. + (tui_show_register_group): New function. + (tui_display_registers_from): Compute the layout of register window + and refresh with new API; be sure to delete old register windows. + (tui_check_register_values): Update to use tui_get_register and + tui_display_data. + (tui_display_register): Just refresh the register window part. + (tui_register_format): Format registers and save in tui_data_element. + (tui_get_register): New to combine tui_reg_value_has_changed and + tui_get_register_raw_value; fix to use the new gdb API. + (tui_show_float_command): Renamed tui_reg_float_command. + (tui_show_general_command): Renamed tui_reg_general_command. + (tui_show_special_command): Renamed tui_reg_system_command. + (_initialize_tui_regs): Remove unused commands. + +2004-03-13 Mark Kettenis <kettenis@gnu.org> + + * NEWS (New native configurations): Mention OpenBSD/amd64. + + * config/i386/nm-fbsd.h: Include "config/nm-bsd.h". + (PTRACE_ARG3_TYPE, FETCH_INFERIOR_REGISTERS, ATTACH_DETACH): + Remove defines. + * config/i386/nm-fbsd64.h: Likewise. + * config/i386/nm-obsd.h: Likewise. + * config/sparc/nm-fbsd.h: Likewise. Update copyright year. + * config/alpha/nm-fbsd.h: Likewise. Update copyright year. + +2004-03-12 Kevin Buettner <kevinb@redhat.com> + + * frv-tdep.c (set_variant_scratch_registers): New function. + * frv-tdep.h (scr0_regnum, scr1_regnum, scr2_regnum, scr3_regnum): + New constants. + + From Richard Sandiford <rsandifo@redhat.com>: + * frv-tdep.c (frv_gdbarch_init): Add FR450 support. + +2004-03-12 Kevin Buettner <kevinb@redhat.com> + + * frv-tdep.c, frv-tdep.h (first_gpr_regnum, sp_regnum, fp_regnum) + (struct_return_regnum, last_gpr_regnum, first_fpr_regnum) + (last_fpr_regnum, pc_regnum, first_spr_regnum, psr_regnum, ccr_regnum) + (cccr_regnum, fdpic_loadmap_exec_regnum, fdpic_loadmap_interp_regnum) + (tbr_regnum, brr_regnum, dbar0_regnum, dbar1_regnum, dbar2_regnum) + (dbar3_regnum, lr_regnum, lcr_regnum, iacc0h_regnum, iacc0l_regnum) + (last_spr_regnum, frv_num_regs, first_pseudo_regnum, iacc0_regnum) + (last_pseudo_regnum, frv_num_pseudo_regs): Move constant (enum) + definitions from frv-tdep.c to frv-tdep.h. + +2004-03-12 Kevin Buettner <kevinb@redhat.com> + + Add shared library support for FR-V FDPIC ABI: + * Makefile.in (solib-frv.o): Add dependencies. + * frv-tdep.c (find_func_descr, frv_convert_from_func_ptr_addr): + New functions. + (frv_push_dummy_call): Add support for FDPIC ABI. + (frv_gdbarch_init): Call set_gdbarch_convert_from_func_ptr_addr() + for FDPIC ABI. + * frv-tdep.h (frv_fdpic_find_global_pointer): Declare. + (frv_fdpic_find_canonical_descriptor): Declare. + * solib-frv.c: New file. + * config/frv/frv.mt (TDEPFILES): Add solib.o and solib-frv.o. + * config/frv/tm-frv.h (solib.h): Include. + +2004-03-12 Kevin Buettner <kevinb@redhat.com> + + * Makefile.in (elf_frv_h, frv_tdep_h): Define. + (frv-tdep.o): Update dependencies. + * frv-tdep.h: New file. + * frv-tdep.c (elf-bfd.h, elf/frv.h, osabi.h, frv-tdep.h): Include. + (fdpic_loadmap_exec_regnum, fdpic_loadmap_interp_regnum): New + constants. + (struct gdbarch_tdep): Add new member ``frv_abi''. + (frv_abi, frv_fdpic_loadmap_addresses, set_variant_abi_fdpic): New + functions. + (new_variant): Set ``frv_abi'' field. + (gdb_arch_init): Detect FDPIC executables. + +2004-03-12 Mark Kettenis <kettenis@gnu.org> + + * solib-svr4.h: Change SOLIB_SVR4 wrapper into SOLIB_SVR4_H + wrapper. + +2004-03-11 Andrew Cagney <cagney@redhat.com> + + * solib-svr4.h: Add #ifndef SOLIB_SVR4 wrapper. + +2004-03-11 Kevin Buettner <kevinb@redhat.com> + + * solist.h (master_so_list): New function. + * solib.c (master_so_list): Likewise. + * solib-svr4.c (enable_break): Iterate over so_list entries + obtained from master list instead of entries obtained directly + via svr4_current_sos(). + +2004-03-10 Ben Elliston <bje@gnu.org> + + * MAINTAINERS: Update my mail address. + +2004-03-10 Kei Sakamoto <sakamoto.kei@renesas.com> + + * remote-m32r-sdi.c: Support hardware watchpoint. + 2004-03-09 Daniel Jacobowitz <drow@mvista.com> * user-regs.c: Update copyright years. diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index 929d660..2d53fff 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -332,7 +332,7 @@ Dhananjay Deshpande dhananjayd@kpitcummins.com Klee Dienes kdienes@apple.com Richard Earnshaw rearnsha@arm.com Frank Ch. Eigler fche@redhat.com -Ben Elliston bje@wasabisystems.com +Ben Elliston bje@gnu.org Raoul Gough RaoulGough@yahoo.co.uk Anthony Green green@redhat.com Matthew Green mrg@eterna.com.au diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 71656c0..948bb9b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -570,6 +570,7 @@ elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h elf_sh_h = $(INCLUDE_DIR)/elf/sh.h elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) elf_bfd_h = $(BFD_SRC)/elf-bfd.h +elf_frv_h = $(INCLUDE_DIR)/elf/frv.h $(elf_reloc_macros_h) libaout_h = $(BFD_SRC)/libaout.h libbfd_h = $(BFD_SRC)/libbfd.h remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h @@ -614,7 +615,6 @@ nm_h = @nm_h@ ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) alphabsd_tdep_h = alphabsd-tdep.h alpha_tdep_h = alpha-tdep.h -amd64_linux_tdep_h = amd64-linux-tdep.h amd64_nat_h = amd64-nat.h amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) @@ -659,6 +659,7 @@ f_lang_h = f-lang.h frame_base_h = frame-base.h frame_h = frame.h frame_unwind_h = frame-unwind.h $(frame_h) +frv_tdep_h = frv-tdep.h gdbarch_h = gdbarch.h gdb_assert_h = gdb_assert.h gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) @@ -1529,10 +1530,10 @@ amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ - $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) -amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ - $(amd64_linux_tdep_h) + $(solib_svr4_h) amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ @@ -1759,18 +1760,22 @@ f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ $(terminal_h) $(gdbthread_h) $(command_h) -frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) \ + $(gdb_obstack_h) frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ $(command_h) $(gdbcmd_h) frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ - $(gdb_assert_h) $(dummy_frame_h) + $(gdb_assert_h) $(dummy_frame_h) $(gdb_obstack_h) +frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(target_h) $(osabi_h) \ + $(elf_bfd_h) $(elf_frv_h) $(frv_tdep_h) frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ - $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) \ + $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(frv_tdep_h) f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ $(f_lang_h) $(gdb_string_h) @@ -2052,7 +2057,7 @@ mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ $(mipsnbsd_tdep_h) mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ - $(solib_svr4_h) + $(mips_tdep_h) $(solib_svr4_h) mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ @@ -2297,6 +2302,9 @@ solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) $(language_h) \ + $(command_h) $(gdbcmd_h) $(elf_frv_h) solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) @@ -38,9 +38,22 @@ GDB support for location expressions has been extended to support function arguments and frame bases. Older versions of GDB could crash when they encountered these. +* C++ nested types and namespaces + +GDB's support for nested types and namespaces in C++ has been +improved, especially if you use the DWARF 2 debugging format. (This +is the default for recent versions of GCC on most platforms.) +Specifically, if you have a class "Inner" defined within a class or +namespace "Outer", then GDB realizes that the class's name is +"Outer::Inner", not simply "Inner". This should greatly reduce the +frequency of complaints about not finding RTTI symbols. In addition, +if you are stopped at inside of a function defined within a namespace, +GDB modifies its name lookup accordingly. + * New native configurations NetBSD/amd64 x86_64-*-netbsd* +OpenBSD/amd64 x86_64-*-openbsd* OpenBSD/alpha alpha*-*-openbsd* OpenBSD/sparc sparc-*-openbsd* OpenBSD/sparc64 sparc64-*-openbsd* diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS index d3b4f84..5455f22 100644 --- a/gdb/PROBLEMS +++ b/gdb/PROBLEMS @@ -14,14 +14,29 @@ People encountering problems with these targets should consult GDB's web pages and mailing lists (http://www.gnu.org/software/gdb/) to see if there is an update. -arm-*-* +*** Regressions since gdb 6.0 -GDB's ARM target, in 6.0, has not been updated to use the new frame -mechanism. +gdb/826: variables in C++ namespaces have to be enclosed in quotes -Fortunately the ARM target, in the GDB's mainline sources, has been -updated so people encountering problems should consider downloading a -more current GDB (http://www.gnu.org/software/gdb/current). +When referring to a variable in C++ code that is inside a +namespace, you have to put it inside single quotes. + +gdb/931: GDB could be more generous when reading types C++ templates on input + +When the user types a template, GDB frequently requires the type to be +typed in a certain way (e.g. "const char*" as opposed to "const char *" +or "char const *" or "char const*"). + +gdb/1505: [regression] gdb prints a bad backtrace for a thread + +When backtracing a thread, gdb doesn't stop until it hits garbage. +This is sensitive to the operating system and thread library. + +gdb/1512: no canonical way to output names of C++ types + +We currently don't have any canonical way to output names of C++ types. +E.g. "const char *" versus "char const *"; more subtleties arise when +dealing with templates. gdb/1516: [regression] local classes, gcc 2.95.3, dwarf-2 @@ -35,6 +50,15 @@ This applies only to classes where the class type is defined inside a function, not to variables defined with types that are defined somewhere outside any function (which most types are). +gdb/1560: Control-C does not always interrupt GDB. + +When GDB is busy processing a command which takes a long time to +complete, hitting Control-C does not have the expected effect. +The command execution is not aborted, and the "QUIT" message confirming +the abortion is displayed only after the command has been completed. + +*** Regressions since gdb 5.3 + gdb/1091: Constructor breakpoints ignored gdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints @@ -52,8 +76,3 @@ implement virtual base classes. gcc 2.x generated just one object code function with a hidden parameter, but gcc 3.x conforms to a multi-vendor ABI for C++ which requires multiple object code functions. -gdb/1560: Control-C does not always interrupt GDB. -When GDB is busy processing a command which takes a long time to -complete, hitting Control-C does not have the expected effect. -The command execution is not aborted, and the "QUIT" message confirming -the abortion is displayed only after the command has been completed. diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 63417c4..72aa73c 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -48,7 +48,6 @@ #include "gregset.h" #include "amd64-tdep.h" -#include "amd64-linux-tdep.h" #include "i386-linux-tdep.h" #include "amd64-nat.h" @@ -96,12 +95,6 @@ static int amd64_linux_gregset32_reg_offset[] = -1, -1, -1, -1, -1, -1, -1, -1, -1, ORIG_RAX * 8 /* "orig_eax" */ }; - -/* Which ptrace request retrieves which registers? - These apply to the corresponding SET requests as well. */ - -#define GETFPREGS_SUPPLIES(regno) \ - (FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM) /* Transfering the general-purpose registers between GDB, inferiors @@ -126,38 +119,6 @@ fill_gregset (elf_gregset_t *gregsetp, int regnum) amd64_collect_native_gregset (current_regcache, gregsetp, regnum); } -/* Fetch all general-purpose registers from process/thread TID and - store their values in GDB's register cache. */ - -static void -fetch_regs (int tid) -{ - elf_gregset_t regs; - - if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0) - perror_with_name ("Couldn't get registers"); - - supply_gregset (®s); -} - -/* Store all valid general-purpose registers in GDB's register cache - into the process/thread specified by TID. */ - -static void -store_regs (int tid, int regnum) -{ - elf_gregset_t regs; - - if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0) - perror_with_name ("Couldn't get registers"); - - fill_gregset (®s, regnum); - - if (ptrace (PTRACE_SETREGS, tid, 0, (long) ®s) < 0) - perror_with_name ("Couldn't write registers"); -} - - /* Transfering floating-point registers between GDB, inferiors and cores. */ /* Fill GDB's register cache with the floating-point and SSE register @@ -178,37 +139,6 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regnum) { amd64_collect_fxsave (current_regcache, regnum, fpregsetp); } - -/* Fetch all floating-point registers from process/thread TID and store - thier values in GDB's register cache. */ - -static void -fetch_fpregs (int tid) -{ - elf_fpregset_t fpregs; - - if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0) - perror_with_name ("Couldn't get floating point status"); - - supply_fpregset (&fpregs); -} - -/* Store all valid floating-point registers in GDB's register cache - into the process/thread specified by TID. */ - -static void -store_fpregs (int tid, int regnum) -{ - elf_fpregset_t fpregs; - - if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0) - perror_with_name ("Couldn't get floating point status"); - - fill_fpregset (&fpregs, regnum); - - if (ptrace (PTRACE_SETFPREGS, tid, 0, (long) &fpregs) < 0) - perror_with_name ("Couldn't write floating point status"); -} /* Transferring arbitrary registers between GDB and inferior. */ @@ -229,19 +159,25 @@ fetch_inferior_registers (int regnum) if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) { - fetch_regs (tid); + elf_gregset_t regs; + + if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0) + perror_with_name ("Couldn't get registers"); + + amd64_supply_native_gregset (current_regcache, ®s, -1); if (regnum != -1) return; } - if (regnum == -1 || GETFPREGS_SUPPLIES (regnum)) + if (regnum == -1 || regnum >= AMD64_ST0_REGNUM) { - fetch_fpregs (tid); - return; - } + elf_fpregset_t fpregs; + + if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0) + perror_with_name ("Couldn't get floating point status"); - internal_error (__FILE__, __LINE__, - "Got request for bad register number %d.", regnum); + amd64_supply_fxsave (current_regcache, -1, &fpregs); + } } /* Store register REGNUM back into the child process. If REGNUM is @@ -260,19 +196,34 @@ store_inferior_registers (int regnum) if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) { - store_regs (tid, regnum); + elf_gregset_t regs; + + if (ptrace (PTRACE_GETREGS, tid, 0, (long) ®s) < 0) + perror_with_name ("Couldn't get registers"); + + amd64_collect_native_gregset (current_regcache, ®s, regnum); + + if (ptrace (PTRACE_SETREGS, tid, 0, (long) ®s) < 0) + perror_with_name ("Couldn't write registers"); + if (regnum != -1) return; } - if (regnum == -1 || GETFPREGS_SUPPLIES (regnum)) + if (regnum == -1 || regnum >= AMD64_ST0_REGNUM) { - store_fpregs (tid, regnum); + elf_fpregset_t fpregs; + + if (ptrace (PTRACE_GETFPREGS, tid, 0, (long) &fpregs) < 0) + perror_with_name ("Couldn't get floating point status"); + + amd64_collect_fxsave (current_regcache, regnum, &fpregs); + + if (ptrace (PTRACE_SETFPREGS, tid, 0, (long) &fpregs) < 0) + perror_with_name ("Couldn't write floating point status"); + return; } - - internal_error (__FILE__, __LINE__, - "Got request to store bad register number %d.", regnum); } diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 9a1636a..edf3794 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */ #include "defs.h" -#include "inferior.h" +#include "frame.h" #include "gdbcore.h" #include "regcache.h" #include "osabi.h" @@ -29,117 +29,42 @@ #include "gdb_string.h" #include "amd64-tdep.h" -#include "amd64-linux-tdep.h" - -/* Register indexes to 'struct user' come from <sys/reg.h>. */ - -#define USER_R15 0 -#define USER_R14 1 -#define USER_R13 2 -#define USER_R12 3 -#define USER_RBP 4 -#define USER_RBX 5 -#define USER_R11 6 -#define USER_R10 7 -#define USER_R9 8 -#define USER_R8 9 -#define USER_RAX 10 -#define USER_RCX 11 -#define USER_RDX 12 -#define USER_RSI 13 -#define USER_RDI 14 -#define USER_RIP 16 -#define USER_CS 17 -#define USER_EFLAGS 18 -#define USER_RSP 19 -#define USER_SS 20 -#define USER_DS 23 -#define USER_ES 24 -#define USER_FS 25 -#define USER_GS 26 +#include "solib-svr4.h" /* Mapping between the general-purpose registers in `struct user' - format and GDB's register array layout. */ + format and GDB's register cache layout. */ -static int user_to_gdb_regmap[] = +/* From <sys/reg.h>. */ +static int amd64_linux_gregset_reg_offset[] = { - USER_RAX, USER_RBX, USER_RCX, USER_RDX, - USER_RSI, USER_RDI, USER_RBP, USER_RSP, - USER_R8, USER_R9, USER_R10, USER_R11, - USER_R12, USER_R13, USER_R14, USER_R15, - USER_RIP, USER_EFLAGS, - USER_CS, USER_SS, - USER_DS, USER_ES, USER_FS, USER_GS + 10 * 8, /* %rax */ + 5 * 8, /* %rbx */ + 11 * 8, /* %rcx */ + 12 * 8, /* %rdx */ + 13 * 8, /* %rsi */ + 14 * 8, /* %rdi */ + 4 * 8, /* %rbp */ + 19 * 8, /* %rsp */ + 9 * 8, /* %r8 ... */ + 8 * 8, + 7 * 8, + 6 * 8, + 3 * 8, + 2 * 8, + 1 * 8, + 0 * 8, /* ... %r15 */ + 16 * 8, /* %rip */ + 18 * 8, /* %eflags */ + 17 * 8, /* %cs */ + 20 * 8, /* %ss */ + 23 * 8, /* %ds */ + 24 * 8, /* %es */ + 25 * 8, /* %fs */ + 26 * 8 /* %gs */ }; + -/* Fill GDB's register array with the general-purpose register values - in *GREGSETP. */ - -void -amd64_linux_supply_gregset (char *regp) -{ - int i; - - for (i = 0; i < AMD64_NUM_GREGS; i++) - supply_register (i, regp + (user_to_gdb_regmap[i] * 8)); -} - -/* 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 -amd64_linux_fill_gregset (char *regp, int regno) -{ - int i; - - for (i = 0; i < AMD64_NUM_GREGS; i++) - if (regno == -1 || regno == i) - regcache_collect (i, regp + (user_to_gdb_regmap[i] * 8)); -} - -/* The register sets used in GNU/Linux ELF core-dumps are identical to - the register sets used by `ptrace'. The corresponding types are - `elf_gregset_t' for the general-purpose registers (with - `elf_greg_t' the type of a single GP register) and `elf_fpregset_t' - for the floating-point registers. */ - -static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, - int which, CORE_ADDR ignore) -{ - switch (which) - { - case 0: /* Integer registers. */ - if (core_reg_size != 216) - warning ("Wrong size register set in core file."); - else - amd64_linux_supply_gregset (core_reg_sect); - break; - - case 2: /* Floating point registers. */ - case 3: /* "Extended" floating point registers. This is gdb-speak - for SSE/SSE2. */ - if (core_reg_size != 512) - warning ("Wrong size XMM register set in core file."); - else - amd64_supply_fxsave (current_regcache, -1, core_reg_sect); - break; - - default: - /* Don't know what kind of register request this is; just ignore it. */ - break; - } -} - -static struct core_fns amd64_core_fns = -{ - bfd_target_elf_flavour, /* core_flavour */ - default_check_format, /* check_format */ - default_core_sniffer, /* core_sniffer */ - fetch_core_registers, /* core_read_registers */ - NULL /* next */ -}; +/* Support for signal handlers. */ #define LINUX_SIGTRAMP_INSN0 0x48 /* mov $NNNNNNNN, %rax */ #define LINUX_SIGTRAMP_OFFSET0 0 @@ -271,13 +196,21 @@ static void amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + tdep->gregset_reg_offset = amd64_linux_gregset_reg_offset; + tdep->gregset_num_regs = ARRAY_SIZE (amd64_linux_gregset_reg_offset); + tdep->sizeof_gregset = 27 * 8; + amd64_init_abi (info, gdbarch); set_gdbarch_pc_in_sigtramp (gdbarch, amd64_linux_pc_in_sigtramp); - tdep->sigcontext_addr = amd64_linux_sigcontext_addr; tdep->sc_reg_offset = amd64_linux_sc_reg_offset; tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset); + + /* GNU/Linux uses SVR4-style shared libraries. */ + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_lp64_fetch_link_map_offsets); } @@ -287,8 +220,6 @@ extern void _initialize_amd64_linux_tdep (void); void _initialize_amd64_linux_tdep (void) { - add_core_fns (&amd64_core_fns); - gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_LINUX, amd64_linux_init_abi); } diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h deleted file mode 100644 index 5b96020..0000000 --- a/gdb/amd64-linux-tdep.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Target-dependent definitions for GNU/Linux x86-64. - - Copyright 2003, 2004 Free Software Foundation, Inc. - - Contributed by Michal Ludvig, SuSE AG. - - 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 AMD64_LINUX_TDEP_H -#define AMD64_LINUX_TDEP_H - -/* Fill GDB's register array with the general-purpose register values - in *GREGSETP. */ - -void amd64_linux_supply_gregset (char *regp); - -/* 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 amd64_linux_fill_gregset (char *regp, int regno); - -#endif /* amd64-linux-tdep.h */ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index e0b2ca0..fb544c4 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -1186,14 +1186,3 @@ amd64_collect_fxsave (const struct regcache *regcache, int regnum, if (regnum == -1 || regnum == I387_FOSEG_REGNUM) regcache_raw_collect (regcache, I387_FOSEG_REGNUM, regs + 20); } - -/* Fill register REGNUM (if it is a floating-point or SSE register) in - *FXSAVE with the value in GDB's register cache. If REGNUM is -1, do - this for all registers. This function doesn't touch any of the - reserved bits in *FXSAVE. */ - -void -amd64_fill_fxsave (char *fxsave, int regnum) -{ - amd64_collect_fxsave (current_regcache, regnum, fxsave); -} diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h index 042618b..bfc549b 100644 --- a/gdb/amd64-tdep.h +++ b/gdb/amd64-tdep.h @@ -70,13 +70,6 @@ extern void amd64_supply_fxsave (struct regcache *regcache, int regnum, extern void amd64_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave); - -/* Fill register REGNUM (if it is a floating-point or SSE register) in - *FXSAVE with the value in GDB's register cache. If REGNUM is -1, do - this for all registers. This function doesn't touch any of the - reserved bits in *FXSAVE. */ - -extern void amd64_fill_fxsave (char *fxsave, int regnum); /* Variables exported from amd64nbsd-tdep.c. */ diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 94ba59b..1e4ce1d 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -298,13 +298,13 @@ generic_register_byte (int regnum) int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name) { -#if !defined (IN_SIGTRAMP) +#if !defined (DEPRECATED_IN_SIGTRAMP) if (SIGTRAMP_START_P ()) return (pc) >= SIGTRAMP_START (pc) && (pc) < SIGTRAMP_END (pc); else return name && strcmp ("_sigtramp", name) == 0; #else - return IN_SIGTRAMP (pc, name); + return DEPRECATED_IN_SIGTRAMP (pc, name); #endif } diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 0f7a23d..8f2e601 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -114,7 +114,7 @@ extern int generic_register_size (int regnum); /* Assume that the world is sane, the registers are all adjacent. */ extern int generic_register_byte (int regnum); -/* Prop up old targets that use various IN_SIGTRAMP() macros. */ +/* Prop up old targets that use various sigtramp macros. */ extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name); /* The orginal register_convert*() functions were overloaded. They diff --git a/gdb/bcache.c b/gdb/bcache.c index cadadb5..0bc533e 100644 --- a/gdb/bcache.c +++ b/gdb/bcache.c @@ -303,7 +303,7 @@ print_percentage (int portion, int total) if (total == 0) printf_filtered ("(not applicable)\n"); else - printf_filtered ("%3d%%\n", portion * 100 / total); + printf_filtered ("%3d%%\n", (int) (portion * 100.0 / total)); } diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 265bd2e..1e96555 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -343,10 +343,13 @@ clear_pc_function_cache (void) If it fails, it sets *NAME, *ADDRESS, and *ENDADDR to zero and returns 0. */ +/* Backward compatibility, no section argument. */ + int -find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, - CORE_ADDR *address, CORE_ADDR *endaddr) +find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address, + CORE_ADDR *endaddr) { + struct bfd_section *section; struct partial_symtab *pst; struct symbol *f; struct minimal_symbol *msymbol; @@ -355,6 +358,21 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, int i; CORE_ADDR mapped_pc; + /* To ensure that the symbol returned belongs to the correct setion + (and that the last [random] symbol from the previous section + isn't returned) try to find the section containing PC. First try + the overlay code (which by default returns NULL); and second try + the normal section code (which almost always succeeds). */ + section = find_pc_overlay (pc); + if (section == NULL) + { + struct obj_section *obj_section = find_pc_section (pc); + if (obj_section == NULL) + section = NULL; + else + section = obj_section->the_bfd_section; + } + mapped_pc = overlay_mapped_address (pc, section); if (mapped_pc >= cache_pc_function_low @@ -507,32 +525,6 @@ find_pc_sect_partial_function (CORE_ADDR pc, asection *section, char **name, return 1; } -/* Backward compatibility, no section argument. */ - -int -find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address, - CORE_ADDR *endaddr) -{ - struct bfd_section *bfd_section; - - /* To ensure that the symbol returned belongs to the correct setion - (and that the last [random] symbol from the previous section - isn't returned) try to find the section containing PC. First try - the overlay code (which by default returns NULL); and second try - the normal section code (which almost always succeeds). */ - bfd_section = find_pc_overlay (pc); - if (bfd_section == NULL) - { - struct obj_section *obj_section = find_pc_section (pc); - if (obj_section == NULL) - bfd_section = NULL; - else - bfd_section = obj_section->the_bfd_section; - } - return find_pc_sect_partial_function (pc, bfd_section, name, address, - endaddr); -} - /* Return the innermost stack frame executing inside of BLOCK, or NULL if there is no such frame. If BLOCK is NULL, just return NULL. */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 01a46b3..9a21f09 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -99,7 +99,8 @@ static void check_duplicates (struct breakpoint *); static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int); -static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr); +static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr, + enum bptype bptype); static void describe_other_breakpoints (CORE_ADDR, asection *); @@ -3947,13 +3948,25 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr, this function is simply the identity function. */ static CORE_ADDR -adjust_breakpoint_address (CORE_ADDR bpaddr) +adjust_breakpoint_address (CORE_ADDR bpaddr, enum bptype bptype) { if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch)) { /* Very few targets need any kind of breakpoint adjustment. */ return bpaddr; } + else if (bptype == bp_watchpoint + || bptype == bp_hardware_watchpoint + || bptype == bp_read_watchpoint + || bptype == bp_access_watchpoint + || bptype == bp_catch_fork + || bptype == bp_catch_vfork + || bptype == bp_catch_exec) + { + /* Watchpoints and the various bp_catch_* eventpoints should not + have their addresses modified. */ + return bpaddr; + } else { CORE_ADDR adjusted_bpaddr; @@ -4062,7 +4075,8 @@ set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype) memset (b, 0, sizeof (*b)); b->loc = allocate_bp_location (b, bptype); b->loc->requested_address = sal.pc; - b->loc->address = adjust_breakpoint_address (b->loc->requested_address); + b->loc->address = adjust_breakpoint_address (b->loc->requested_address, + bptype); if (sal.symtab == NULL) b->source_file = NULL; else @@ -4622,7 +4636,8 @@ set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id) if (b->type == bp_longjmp_resume) { b->loc->requested_address = pc; - b->loc->address = adjust_breakpoint_address (b->loc->requested_address); + b->loc->address = adjust_breakpoint_address (b->loc->requested_address, + b->type); b->enable_state = bp_enabled; b->frame_id = frame_id; check_duplicates (b); @@ -5879,7 +5894,8 @@ watch_command_1 (char *arg, int accessflag, int from_tty) scope_breakpoint->loc->requested_address = get_frame_pc (prev_frame); scope_breakpoint->loc->address - = adjust_breakpoint_address (scope_breakpoint->loc->requested_address); + = adjust_breakpoint_address (scope_breakpoint->loc->requested_address, + scope_breakpoint->type); /* The scope breakpoint is related to the watchpoint. We will need to act on them together. */ @@ -5894,11 +5910,6 @@ watch_command_1 (char *arg, int accessflag, int from_tty) in hardware. If the watchpoint can not be handled in hardware return zero. */ -#if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT) -#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(BYTE_SIZE) \ - ((BYTE_SIZE) <= (DEPRECATED_REGISTER_SIZE)) -#endif - #if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT) #define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \ (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN)) @@ -7190,7 +7201,8 @@ breakpoint_re_set_one (void *bint) b->line_number = sals.sals[i].line; b->loc->requested_address = sals.sals[i].pc; b->loc->address - = adjust_breakpoint_address (b->loc->requested_address); + = adjust_breakpoint_address (b->loc->requested_address, + b->type); /* Used to check for duplicates here, but that can cause trouble, as it doesn't check for disabled diff --git a/gdb/config/alpha/nm-fbsd.h b/gdb/config/alpha/nm-fbsd.h index 2b3975a..5eec185 100644 --- a/gdb/config/alpha/nm-fbsd.h +++ b/gdb/config/alpha/nm-fbsd.h @@ -1,5 +1,6 @@ /* Native-dependent definitions for FreeBSD/Alpha. - Copyright 1986, 1987, 1989, 1992, 1996, 2000 + + Copyright 1986, 1987, 1989, 1992, 1996, 2000, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -22,14 +23,8 @@ #ifndef NM_FBSD_H #define NM_FBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* The Alpha does not step over a breakpoint. */ #define CANNOT_STEP_BREAKPOINT 1 diff --git a/gdb/config/arm/tm-embed.h b/gdb/config/arm/tm-embed.h index 5990311..7ad6b68 100644 --- a/gdb/config/arm/tm-embed.h +++ b/gdb/config/arm/tm-embed.h @@ -46,7 +46,7 @@ extern int arm_in_call_stub (CORE_ADDR pc, char *name); extern CORE_ADDR arm_skip_stub (CORE_ADDR pc); -#undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) 0 +#undef DEPRECATED_IN_SIGTRAMP +#define DEPRECATED_IN_SIGTRAMP(pc, name) 0 #endif /* TM_ARMEMBED_H */ diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h index 306f837..9ae6e9f 100644 --- a/gdb/config/arm/tm-linux.h +++ b/gdb/config/arm/tm-linux.h @@ -57,7 +57,7 @@ extern CORE_ADDR in_svr4_dynsym_resolve_code (CORE_ADDR pc, char *name); through calls to signal handlers. */ int arm_linux_in_sigtramp (CORE_ADDR pc, char *name); -#define IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name) +#define DEPRECATED_IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name) /* Each OS has different mechanisms for accessing the various registers stored in the sigcontext structure. These definitions diff --git a/gdb/config/frv/frv.mt b/gdb/config/frv/frv.mt index ae5521e..5849f04 100644 --- a/gdb/config/frv/frv.mt +++ b/gdb/config/frv/frv.mt @@ -1,5 +1,5 @@ # Target: Fujitsu FRV processor -TDEPFILES= frv-tdep.o +TDEPFILES= frv-tdep.o frv-linux-tdep.o solib.o solib-frv.o TM_FILE= tm-frv.h SIM_OBS = remote-sim.o SIM = ../sim/frv/libsim.a diff --git a/gdb/config/frv/tm-frv.h b/gdb/config/frv/tm-frv.h index a08f2d3..1215c58 100644 --- a/gdb/config/frv/tm-frv.h +++ b/gdb/config/frv/tm-frv.h @@ -43,3 +43,5 @@ extern CORE_ADDR frv_stopped_data_address(void); /* Use these macros for watchpoint insertion/deletion. */ #define target_stopped_data_address() frv_stopped_data_address() + +#include "solib.h" /* Include support for shared libraries. */ diff --git a/gdb/config/i386/nm-fbsd.h b/gdb/config/i386/nm-fbsd.h index 314e3a0..4c5683b 100644 --- a/gdb/config/i386/nm-fbsd.h +++ b/gdb/config/i386/nm-fbsd.h @@ -52,20 +52,14 @@ extern void i386bsd_dr_reset_addr (int regnum); extern unsigned long i386bsd_dr_get_status (void); -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Override child_resume in `infptrace.c' to work around a kernel bug. */ #define CHILD_RESUME /* Override child_pid_to_exec_file in 'inftarg.c'. */ #define CHILD_PID_TO_EXEC_FILE - -/* We can attach and detach. */ -#define ATTACH_DETACH /* Support for the user struct. */ diff --git a/gdb/config/i386/nm-fbsd64.h b/gdb/config/i386/nm-fbsd64.h index 4c27aff..061e77e 100644 --- a/gdb/config/i386/nm-fbsd64.h +++ b/gdb/config/i386/nm-fbsd64.h @@ -22,16 +22,10 @@ #ifndef NM_FBSD64_H #define NM_FBSD64_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Override child_pid_to_exec_file in 'inftarg.c'. */ #define CHILD_PID_TO_EXEC_FILE -/* We can attach and detach. */ -#define ATTACH_DETACH - #endif /* nm-fbsd64.h */ diff --git a/gdb/config/i386/nm-obsd.h b/gdb/config/i386/nm-obsd.h index 4d10b53..7fd32ca 100644 --- a/gdb/config/i386/nm-obsd.h +++ b/gdb/config/i386/nm-obsd.h @@ -22,15 +22,8 @@ #ifndef NM_OBSD_H #define NM_OBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH - +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Support for the user struct. */ diff --git a/gdb/config/ia64/tm-aix.h b/gdb/config/ia64/tm-aix.h index b59d6dd..186cd93 100644 --- a/gdb/config/ia64/tm-aix.h +++ b/gdb/config/ia64/tm-aix.h @@ -27,6 +27,6 @@ #define TARGET_ELF64 extern int ia64_aix_in_sigtramp (CORE_ADDR pc, char *func_name); -#define IN_SIGTRAMP(pc,func_name) ia64_aix_in_sigtramp (pc, func_name) +#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_aix_in_sigtramp (pc, func_name) #endif /* #ifndef TM_AIX_H */ diff --git a/gdb/config/ia64/tm-linux.h b/gdb/config/ia64/tm-linux.h index 6051752..4aa6d85 100644 --- a/gdb/config/ia64/tm-linux.h +++ b/gdb/config/ia64/tm-linux.h @@ -29,6 +29,6 @@ #define TARGET_ELF64 extern int ia64_linux_in_sigtramp (CORE_ADDR pc, char *func_name); -#define IN_SIGTRAMP(pc,func_name) ia64_linux_in_sigtramp (pc, func_name) +#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ia64_linux_in_sigtramp (pc, func_name) #endif /* #ifndef TM_LINUX_H */ diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h index fdc1756..ff40d66 100644 --- a/gdb/config/mips/tm-irix5.h +++ b/gdb/config/mips/tm-irix5.h @@ -30,8 +30,8 @@ #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4) /* The signal handler trampoline is called _sigtramp. */ -#undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) +#undef DEPRECATED_IN_SIGTRAMP +#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) /* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to get to the saved PC (the register mask and status register are both diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h index 272cafe..88abf80 100644 --- a/gdb/config/mips/tm-irix6.h +++ b/gdb/config/mips/tm-irix6.h @@ -23,8 +23,8 @@ #include "solib.h" /* The signal handler trampoline is called _sigtramp. */ -#undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) +#undef DEPRECATED_IN_SIGTRAMP +#define DEPRECATED_IN_SIGTRAMP(pc, name) ((name) && DEPRECATED_STREQ ("_sigtramp", name)) /* Offsets for register values in _sigtramp frame. sigcontext is immediately above the _sigtramp frame on Irix. */ diff --git a/gdb/config/mips/tm-linux.h b/gdb/config/mips/tm-linux.h index fc32707..4227cd3 100644 --- a/gdb/config/mips/tm-linux.h +++ b/gdb/config/mips/tm-linux.h @@ -46,8 +46,8 @@ /* FIXME: This still needs to be implemented. */ -#undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc, name) (0) +#undef DEPRECATED_IN_SIGTRAMP +#define DEPRECATED_IN_SIGTRAMP(pc, name) (0) #undef IN_SOLIB_DYNSYM_RESOLVE_CODE #define IN_SOLIB_DYNSYM_RESOLVE_CODE(PC) mips_linux_in_dynsym_resolve_code (PC) diff --git a/gdb/config/mips/tm-nbsd.h b/gdb/config/mips/tm-nbsd.h index fb30761..eb8e292 100644 --- a/gdb/config/mips/tm-nbsd.h +++ b/gdb/config/mips/tm-nbsd.h @@ -32,6 +32,6 @@ #undef IGNORE_HELPER_CALL /* XXX undef a bunch of stuff we want to use multi-arch */ -#undef IN_SIGTRAMP +#undef DEPRECATED_IN_SIGTRAMP #endif /* TM_NBSD_H */ diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 13dbd28..1a78c6c 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -103,8 +103,6 @@ extern int hppa_instruction_nullified (void); #define REG_PARM_STACK_SPACE 16 -#define GDB_TARGET_IS_HPPA - /* * Unwind table and descriptor. */ diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h index 364e1f9..e343631 100644 --- a/gdb/config/powerpc/tm-linux.h +++ b/gdb/config/powerpc/tm-linux.h @@ -35,8 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ without symbols */ extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name); -#undef IN_SIGTRAMP -#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name) +#undef DEPRECATED_IN_SIGTRAMP +#define DEPRECATED_IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name) #if 0 #define CANNOT_FETCH_REGISTER(regno) ((regno) >= MQ_REGNUM) diff --git a/gdb/config/sparc/nm-fbsd.h b/gdb/config/sparc/nm-fbsd.h index 917cc49..459764f 100644 --- a/gdb/config/sparc/nm-fbsd.h +++ b/gdb/config/sparc/nm-fbsd.h @@ -1,6 +1,6 @@ /* Native-dependent definitions for FreeBSD/sparc64. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by David E. O'Brien <obrien@FreeBSD.org>. This file is part of GDB. @@ -22,15 +22,8 @@ #ifndef NM_FBSD_H #define NM_FBSD_H -/* Type of the third argument to the `ptrace' system call. */ -#define PTRACE_ARG3_TYPE caddr_t - -/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ -#define FETCH_INFERIOR_REGISTERS - -/* We can attach and detach. */ -#define ATTACH_DETACH - +/* Get generic BSD native definitions. */ +#include "config/nm-bsd.h" /* Shared library support. */ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 5ac40b0..0ebfeda 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -351,8 +351,6 @@ static void cris_version_update (char *ignore_args, int from_tty, static void cris_mode_update (char *ignore_args, int from_tty, struct cmd_list_element *c); -static CORE_ADDR bfd_lookup_symbol (bfd *, const char *); - static CORE_ADDR cris_scan_prologue (CORE_ADDR pc, struct frame_info *next_frame, struct cris_unwind_cache *info); @@ -3720,42 +3718,6 @@ cris_mode_update (char *ignore_args, int from_tty, } } -/* Copied from pa64solib.c, with a couple of minor changes. */ - -static CORE_ADDR -bfd_lookup_symbol (bfd *abfd, const char *symname) -{ - unsigned int storage_needed; - asymbol *sym; - asymbol **symbol_table; - unsigned int number_of_symbols; - unsigned int i; - struct cleanup *back_to; - CORE_ADDR symaddr = 0; - - storage_needed = bfd_get_symtab_upper_bound (abfd); - - if (storage_needed > 0) - { - symbol_table = (asymbol **) xmalloc (storage_needed); - back_to = make_cleanup (free, symbol_table); - number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table); - - for (i = 0; i < number_of_symbols; i++) - { - sym = *symbol_table++; - if (!strcmp (sym->name, symname)) - { - /* Bfd symbols are section relative. */ - symaddr = sym->value + sym->section->vma; - break; - } - } - do_cleanups (back_to); - } - return (symaddr); -} - static struct gdbarch * cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index a92080e..6d70a7e 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,13 @@ +2004-03-19 Andrew Cagney <cagney@redhat.com> + + * gdbint.texinfo (Target Architecture Definition): Delete + reference to GDB_TARGET_IS_HPPA. + +2004-03-18 Andrew Cagney <cagney@redhat.com> + + * gdbint.texinfo (Coding): Update section on gdbarch_data, + describe pre_init and post_init. + 2004-03-09 Daniel Jacobowitz <drow@mvista.com> * gdb.texinfo (Debugging Output): Document values for "set debug diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 1071099..b66fbd9 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3725,7 +3725,6 @@ reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}. This method replaces @code{DEPRECATED_CALL_DUMMY_WORDS}, @code{DEPRECATED_SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY}, @code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE}, -@code{GDB_TARGET_IS_HPPA}, @code{DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET}, and @code{DEPRECATED_FIX_CALL_DUMMY}. @@ -4872,134 +4871,104 @@ functions, since they might never return to your code (they @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. +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}: +A module registers one or more per-architecture data-pointers using: -@deftypefun struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *@var{init}) +@deftypefun struct gdbarch_data *gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *@var{pre_init}) +@var{pre_init} is used to, on-demand, allocate an initial value for a +per-architecture data-pointer using the architecture's obstack (passed +in as a parameter). Since @var{pre_init} can be called during +architecture creation, it is not parameterized with the architecture. +and must not call modules that use per-architecture data. +@end deftypefun -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}. +@deftypefun struct gdbarch_data *gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *@var{post_init}) +@var{post_init} is used to obtain an initial value for a +per-architecture data-pointer @emph{after}. Since @var{post_init} is +always called after architecture creation, it both receives the fully +initialized architecture and is free to call modules that use +per-architecture data (care needs to be taken to ensure that those +other modules do not try to call back to this module as that will +create in cycles in the initialization call graph). +@end deftypefun -Any memory required by the @var{init} function should be allocated -using @code{GDBARCH_OBSTACK_ZALLOC}. That memory is automatically -released when the corresponding architecture is deleted. +These functions return a @code{struct gdbarch_data} that is used to +identify the per-architecture data-pointer added for that module. -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. +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{gdbarch_data_register_pre_init} +or @code{gdbarch_data_register_post_init}), this function returns the +current value of the per-architecture data-pointer. If the data +pointer is @code{NULL}, it is first initialized by calling the +corresponding @var{pre_init} or @var{post_init} method. @end deftypefun -A typical module has an @code{init} function of the form: +The examples below assume the following definitions: @smallexample struct nozel @{ int total; @}; static struct gdbarch_data *nozel_handle; -static void * -nozel_init (struct gdbarch *gdbarch) -@{ - struct nozel *data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct nozel); - @dots{} - return 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. +A module can extend the architecture vector, adding additional +per-architecture data, using the @var{pre_init} method. The module's +per-architecture data is then initialized during architecture +creation. -The data-pointer is registered with the call: +In the below, the module's per-architecture @emph{nozel} is added. An +architecture can specify its nozel by calling @code{set_gdbarch_nozel} +from @code{gdbarch_init}. @smallexample -void -_initialize_nozel (void) +static void * +nozel_pre_init (struct obstack *obstack) @{ - nozel_handle = register_gdbarch_data (nozel_init); -@dots{} + struct nozel *data = OBSTACK_ZALLOC (obstack, struct nozel); + return data; +@} @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) +extern void +set_gdbarch_nozel (struct gdbarch *gdbarch, int total) @{ - int total; struct nozel *data = gdbarch_data (gdbarch, nozel_handle); - @dots{} - return total; + data->total = nozel; @} @end smallexample -It is also possible to directly initialize the data-pointer using: +A module can on-demand create architecture dependant data structures +using @code{post_init}. -@deftypefun void set_gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{handle}, void *@var{pointer}) -Set the still @code{NULL} data-pointer corresponding to @var{handle} -to the non-@code{NULL} @var{pointer} value. -@end deftypefun - -This function is used by modules that require a mechanism for explicitly -setting the per-architecture data-pointer during architecture creation: +In the below, the nozel's total is computed on-demand by +@code{nozel_post_init} using information obtained from the +architecture. @smallexample -/* Always return a non-NULL nozel. */ -static struct nozel * -gdbarch_nozel (struct gdbarch *gdbarch) +static void * +nozel_post_init (struct gdbarch *gdbarch) @{ - struct nozel *nozel = gdbarch_data (gdbarch, nozel_handle); - if (nozel == NULL) - @{ - nozel = nozel_init (gdbarch); - set_gdbarch_data (gdbarch, nozel_handle, nozel); - @} - return nozel; + struct nozel *data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct nozel); + nozel->total = gdbarch@dots{} (gdbarch); + return data; @} @end smallexample @smallexample -/* Called during architecture creation. */ -extern void -set_gdbarch_nozel (struct gdbarch *gdbarch, int total) +extern int +nozel_total (struct gdbarch *gdbarch) @{ - struct nozel *data = gdbarch_nozel (gdbarch); - @dots{} - data->total = total; + struct nozel *data = gdbarch_data (gdbarch, nozel_handle); + return data->total; @} @end smallexample -@smallexample -void -_initialize_nozel (void) -@{ - nozel_handle = register_gdbarch_data (nozel_init); - @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 diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index f2e869a..3b10c51 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -32,8 +32,7 @@ #include "command.h" #include "gdbcmd.h" -static void dummy_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, +static void dummy_frame_this_id (struct frame_info *next_frame, void **this_prologue_cache, struct frame_id *this_id); @@ -302,8 +301,7 @@ generic_pop_dummy_frame (void) register value is taken from the local copy of the register buffer. */ static void -dummy_frame_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, +dummy_frame_prev_register (struct frame_info *next_frame, void **this_prologue_cache, int regnum, int *optimized, enum lval_type *lvalp, CORE_ADDR *addrp, @@ -314,7 +312,7 @@ dummy_frame_prev_register (const struct frame_unwind *self, /* Call the ID method which, if at all possible, will set the prologue cache. */ - dummy_frame_this_id (self, next_frame, this_prologue_cache, &id); + dummy_frame_this_id (next_frame, this_prologue_cache, &id); dummy = (*this_prologue_cache); gdb_assert (dummy != NULL); @@ -343,8 +341,7 @@ dummy_frame_prev_register (const struct frame_unwind *self, dummy cache is located and and saved in THIS_PROLOGUE_CACHE. */ static void -dummy_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, +dummy_frame_this_id (struct frame_info *next_frame, void **this_prologue_cache, struct frame_id *this_id) { diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 2b5ed32..13c836e 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -714,8 +714,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) } static void -dwarf2_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, void **this_cache, +dwarf2_frame_this_id (struct frame_info *next_frame, void **this_cache, struct frame_id *this_id) { struct dwarf2_frame_cache *cache = @@ -725,8 +724,7 @@ dwarf2_frame_this_id (const struct frame_unwind *self, } static void -dwarf2_frame_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, void **this_cache, +dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realnump, void *valuep) @@ -847,8 +845,7 @@ dwarf2_frame_sniffer (struct frame_info *next_frame) response to the "info frame" command. */ static CORE_ADDR -dwarf2_frame_base_address (const struct frame_base *self, - struct frame_info *next_frame, void **this_cache) +dwarf2_frame_base_address (struct frame_info *next_frame, void **this_cache) { struct dwarf2_frame_cache *cache = dwarf2_frame_cache (next_frame, this_cache); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index ffc76c8..285eb6b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -782,12 +782,8 @@ static void read_type_die (struct die_info *, struct dwarf2_cu *); static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); -static char *determine_prefix_aux (struct die_info *die, struct dwarf2_cu *); - static char *typename_concat (const char *prefix, const char *suffix); -static char *class_name (struct die_info *die, struct dwarf2_cu *); - static void read_typedef (struct die_info *, struct dwarf2_cu *); static void read_base_type (struct die_info *, struct dwarf2_cu *); @@ -820,7 +816,11 @@ static void dwarf2_add_member_fn (struct field_info *, static void dwarf2_attach_fn_fields_to_type (struct field_info *, struct type *, struct dwarf2_cu *); -static void read_structure_scope (struct die_info *, struct dwarf2_cu *); +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); static void read_common_block (struct die_info *, struct dwarf2_cu *); @@ -829,7 +829,9 @@ static void read_namespace (struct die_info *die, struct dwarf2_cu *); static const char *namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *); -static void read_enumeration (struct die_info *, struct dwarf2_cu *); +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); @@ -1695,7 +1697,7 @@ add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, what template types look like, because the demangler frequently doesn't give the same name as the debug info. We could fix this by only using the demangled name to get the - prefix (but see comment in read_structure_scope). */ + prefix (but see comment in read_structure_type). */ /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have the appropriate debug information, so it would be nice to be @@ -2105,11 +2107,17 @@ process_die (struct die_info *die, struct dwarf2_cu *cu) case DW_TAG_class_type: case DW_TAG_structure_type: case DW_TAG_union_type: - read_structure_scope (die, cu); + read_structure_type (die, cu); + process_structure_scope (die, cu); break; case DW_TAG_enumeration_type: - read_enumeration (die, cu); + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ case DW_TAG_subroutine_type: read_subroutine_type (die, cu); break; @@ -2128,21 +2136,19 @@ process_die (struct die_info *die, struct dwarf2_cu *cu) case DW_TAG_string_type: read_tag_string_type (die, cu); break; + /* END FIXME */ + case DW_TAG_base_type: read_base_type (die, cu); - if (dwarf2_attr (die, DW_AT_name, cu)) - { - /* Add a typedef symbol for the base type definition. */ - new_symbol (die, die->type, cu); - } + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); break; case DW_TAG_subrange_type: read_subrange_type (die, cu); - if (dwarf2_attr (die, DW_AT_name, cu)) - { - /* Add a typedef symbol for the base type definition. */ - new_symbol (die, die->type, cu); - } + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); break; case DW_TAG_common_block: read_common_block (die, cu); @@ -3154,18 +3160,16 @@ dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, suppresses creating a symbol table entry itself). */ static void -read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) { struct objfile *objfile = cu->objfile; struct type *type; struct attribute *attr; - char *name = NULL; const char *previous_prefix = processing_current_prefix; struct cleanup *back_to = NULL; - /* This says whether or not we want to try to update the structure's - name to include enclosing namespace/class information, if - any. */ - int need_to_update_name = 0; + + if (die->type) + return; type = alloc_type (objfile); @@ -3173,41 +3177,20 @@ read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_name, cu); if (attr && DW_STRING (attr)) { - name = DW_STRING (attr); - if (cu->language == language_cplus) { - struct die_info *spec_die = die_specification (die, cu); - - if (spec_die != NULL) - { - char *specification_prefix = determine_prefix (spec_die, cu); - processing_current_prefix = specification_prefix; - back_to = make_cleanup (xfree, specification_prefix); - } - } - - if (processing_has_namespace_info) - { - /* FIXME: carlton/2003-11-10: This variable exists only for - const-correctness reasons. When I tried to change - TYPE_TAG_NAME to be a const char *, I ran into a cascade - of changes which would have forced decode_line_1 to take - a const char **. */ - char *new_prefix = obconcat (&objfile->objfile_obstack, - processing_current_prefix, - processing_current_prefix[0] == '\0' - ? "" : "::", - name); - TYPE_TAG_NAME (type) = new_prefix; + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); processing_current_prefix = new_prefix; } else { /* The name is already allocated along with this objfile, so we don't need to duplicate it for the type. */ - TYPE_TAG_NAME (type) = name; - need_to_update_name = (cu->language == language_cplus); + TYPE_TAG_NAME (type) = DW_STRING (attr); } } @@ -3266,53 +3249,14 @@ read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) else if (child_die->tag == DW_TAG_subprogram) { /* C++ member function. */ - process_die (child_die, cu); + read_type_die (child_die, cu); dwarf2_add_member_fn (&fi, child_die, type, cu); - if (need_to_update_name) - { - /* The demangled names of member functions contain - information about enclosing namespaces/classes, - if any. */ - - /* FIXME: carlton/2003-11-10: The excessive - demangling here is a bit wasteful, as is the - memory usage for names. */ - - /* NOTE: carlton/2003-11-10: As commented in - add_partial_structure, the demangler sometimes - prints the type info in a different form from the - debug info. We could solve this by using the - demangled name to get the prefix; if doing so, - however, we'd need to be careful when reading a - class that's nested inside a template class. - That would also cause problems when trying to - determine RTTI information, since we use the - demangler to determine the appropriate class - name. */ - char *actual_class_name - = class_name_from_physname (dwarf2_linkage_name - (child_die, cu)); - if (actual_class_name != NULL - && strcmp (actual_class_name, name) != 0) - { - TYPE_TAG_NAME (type) - = obsavestring (actual_class_name, - strlen (actual_class_name), - &objfile->objfile_obstack); - } - xfree (actual_class_name); - need_to_update_name = 0; - } } else if (child_die->tag == DW_TAG_inheritance) { /* C++ base class field. */ dwarf2_add_field (&fi, child_die, cu); } - else - { - process_die (child_die, cu); - } child_die = sibling_die (child_die); } @@ -3369,8 +3313,6 @@ read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) } } - new_symbol (die, type, cu); - do_cleanups (back_to); } else @@ -3384,26 +3326,55 @@ read_structure_scope (struct die_info *die, struct dwarf2_cu *cu) do_cleanups (back_to); } -/* Given a pointer to a die which begins an enumeration, process all - the dies that define the members of the enumeration. +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; - This will be much nicer in draft 6 of the DWARF spec when our - members will be dies instead squished into the DW_AT_element_list - attribute. + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); - NOTE: We reverse the order of the element list. */ + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ static void -read_enumeration (struct die_info *die, struct dwarf2_cu *cu) +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) { struct objfile *objfile = cu->objfile; - struct die_info *child_die; struct type *type; - struct field *fields; struct attribute *attr; - struct symbol *sym; - int num_fields; - int unsigned_enum = 1; + + if (die->type) + return; type = alloc_type (objfile); @@ -3439,6 +3410,82 @@ read_enumeration (struct die_info *die, struct dwarf2_cu *cu) TYPE_LENGTH (type) = 0; } + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<<anonymous>>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + num_fields = 0; fields = NULL; if (die->child != NULL) @@ -3455,7 +3502,7 @@ read_enumeration (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (child_die, DW_AT_name, cu); if (attr) { - sym = new_symbol (child_die, type, cu); + sym = new_symbol (child_die, die->type, cu); if (SYMBOL_VALUE (sym) < 0) unsigned_enum = 0; @@ -3482,18 +3529,18 @@ read_enumeration (struct die_info *die, struct dwarf2_cu *cu) if (num_fields) { - TYPE_NFIELDS (type) = num_fields; - TYPE_FIELDS (type) = (struct field *) - TYPE_ALLOC (type, sizeof (struct field) * num_fields); - memcpy (TYPE_FIELDS (type), fields, + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, sizeof (struct field) * num_fields); xfree (fields); } if (unsigned_enum) - TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED; + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; } - die->type = type; - new_symbol (die, type, cu); + + new_symbol (die, die->type, cu); } /* Extract all information from a DW_TAG_array_type DIE and put it in @@ -3672,6 +3719,7 @@ read_namespace (struct die_info *die, struct dwarf2_cu *cu) TYPE_TAG_NAME (type) = TYPE_NAME (type); new_symbol (die, type, cu); + die->type = type; if (is_anonymous) cp_add_using_directive (processing_current_prefix, @@ -5844,7 +5892,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Make sure that the symbol includes appropriate enclosing classes/namespaces in its name. These are calculated in - read_structure_scope, and the correct name is saved in + read_structure_type, and the correct name is saved in the type. */ if (cu->language == language_cplus) @@ -6187,10 +6235,10 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu) case DW_TAG_class_type: case DW_TAG_structure_type: case DW_TAG_union_type: - read_structure_scope (die, cu); + read_structure_type (die, cu); break; case DW_TAG_enumeration_type: - read_enumeration (die, cu); + read_enumeration_type (die, cu); break; case DW_TAG_subprogram: case DW_TAG_subroutine_type: @@ -6246,18 +6294,6 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu) static char * determine_prefix (struct die_info *die, struct dwarf2_cu *cu) { - char *prefix = determine_prefix_aux (die, cu); - - return prefix ? prefix : xstrdup (""); -} - -/* Return the name of the namespace/class that DIE is defined - within, or NULL if we can't tell. The caller should xfree the - result. */ - -static char * -determine_prefix_aux (struct die_info *die, struct dwarf2_cu *cu) -{ struct die_info *parent; if (cu->language != language_cplus) @@ -6267,49 +6303,55 @@ determine_prefix_aux (struct die_info *die, struct dwarf2_cu *cu) if (parent == NULL) { - return (processing_has_namespace_info ? xstrdup ("") : NULL); + return xstrdup (""); } else { - char *parent_prefix = determine_prefix_aux (parent, cu); - char *retval; - switch (parent->tag) { case DW_TAG_namespace: { - int dummy; - - retval = typename_concat (parent_prefix, - namespace_name (parent, &dummy, cu)); + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } } break; case DW_TAG_class_type: case DW_TAG_structure_type: { - if (parent_prefix != NULL) + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) { - const char *parent_name = dwarf2_name (parent, cu); - - if (parent_name != NULL) - retval = typename_concat (parent_prefix, dwarf2_name (parent, cu)); - else - /* FIXME: carlton/2003-11-10: I'm not sure what the - best thing to do here is. */ - retval = typename_concat (parent_prefix, - "<<anonymous class>>"); + return xstrdup (TYPE_TAG_NAME (parent->type)); } else - retval = class_name (parent, cu); + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } } - break; default: - retval = parent_prefix; - break; + return determine_prefix (parent, cu); } - - if (retval != parent_prefix) - xfree (parent_prefix); - return retval; } } @@ -6334,28 +6376,6 @@ typename_concat (const char *prefix, const char *suffix) } } -/* Return a newly-allocated string giving the name of the class given - by DIE. */ - -static char * -class_name (struct die_info *die, struct dwarf2_cu *cu) -{ - struct die_info *child; - const char *name; - - for (child = die->child; child != NULL; child = sibling_die (child)) - { - if (child->tag == DW_TAG_subprogram) - return class_name_from_physname (dwarf2_linkage_name (child, cu)); - } - - name = dwarf2_name (die, cu); - if (name != NULL) - return xstrdup (name); - else - return xstrdup (""); -} - static struct type * dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) { diff --git a/gdb/frame-base.c b/gdb/frame-base.c index 80adb43..6d0f8ae 100644 --- a/gdb/frame-base.c +++ b/gdb/frame-base.c @@ -1,6 +1,6 @@ /* Definitions for frame address handler, for GDB, the GNU debugger. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -30,16 +30,14 @@ really need to override this. */ static CORE_ADDR -default_frame_base_address (const struct frame_base *self, - struct frame_info *next_frame, void **this_cache) +default_frame_base_address (struct frame_info *next_frame, void **this_cache) { struct frame_info *this_frame = get_prev_frame (next_frame); return get_frame_base (this_frame); /* sigh! */ } static CORE_ADDR -default_frame_locals_address (const struct frame_base *self, - struct frame_info *next_frame, void **this_cache) +default_frame_locals_address (struct frame_info *next_frame, void **this_cache) { if (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()) { @@ -48,22 +46,21 @@ default_frame_locals_address (const struct frame_base *self, struct frame_info *this_frame = get_prev_frame (next_frame); return DEPRECATED_FRAME_LOCALS_ADDRESS (this_frame); } - return default_frame_base_address (self, next_frame, this_cache); + return default_frame_base_address (next_frame, this_cache); } static CORE_ADDR -default_frame_args_address (const struct frame_base *self, - struct frame_info *next_frame, void **this_cache) +default_frame_args_address (struct frame_info *next_frame, void **this_cache) { if (DEPRECATED_FRAME_ARGS_ADDRESS_P ()) { struct frame_info *this_frame = get_prev_frame (next_frame); return DEPRECATED_FRAME_ARGS_ADDRESS (this_frame); } - return default_frame_base_address (self, next_frame, this_cache); + return default_frame_base_address (next_frame, this_cache); } -static const struct frame_base default_frame_base = { +const struct frame_base default_frame_base = { NULL, /* No parent. */ default_frame_base_address, default_frame_locals_address, @@ -74,51 +71,35 @@ static struct gdbarch_data *frame_base_data; struct frame_base_table_entry { - const struct frame_base_sniffer *sniffer; + frame_base_sniffer_ftype *sniffer; struct frame_base_table_entry *next; }; struct frame_base_table { - struct frame_base_table_entry *first; + struct frame_base_table_entry *head; + struct frame_base_table_entry **tail; const struct frame_base *default_base; }; static void * frame_base_init (struct obstack *obstack) { - return OBSTACK_ZALLOC (obstack, struct frame_base_table); -} - -/* Append a predicate to the end of the table. */ -static void -append_predicate (struct gdbarch *gdbarch, - const struct frame_base_sniffer *sniffer) -{ - struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data); - struct frame_base_table_entry **entry; - - for (entry = &table->first; (*entry) != NULL; entry = &(*entry)->next); - (*entry) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry); - (*entry)->sniffer = sniffer; + struct frame_base_table *table + = OBSTACK_ZALLOC (obstack, struct frame_base_table); + table->tail = &table->head; + table->default_base = &default_frame_base; + return table; } void frame_base_append_sniffer (struct gdbarch *gdbarch, frame_base_sniffer_ftype *sniffer) { - struct frame_base_sniffer *base_sniffer; - - base_sniffer = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_sniffer); - base_sniffer->sniffer = sniffer; - append_predicate (gdbarch, base_sniffer); -} - -void -frame_base_sniffer_append (struct gdbarch *gdbarch, - const struct frame_base_sniffer *sniffer) -{ - append_predicate (gdbarch, sniffer); + struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data); + (*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry); + (*table->tail)->sniffer = sniffer; + table->tail = &(*table->tail)->next; } void @@ -130,17 +111,19 @@ frame_base_set_default (struct gdbarch *gdbarch, } const struct frame_base * -frame_base_find_by_frame (struct frame_info *next_frame) +frame_base_find_by_frame (struct frame_info *next_frame, + void **this_base_cache, + const struct frame_unwind *unwinder, + void **this_prologue_cache) { struct gdbarch *gdbarch = get_frame_arch (next_frame); struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data); struct frame_base_table_entry *entry; - for (entry = table->first; entry != NULL; entry = entry->next) + for (entry = table->head; entry != NULL; entry = entry->next) { - const struct frame_base *desc; - - desc = entry->sniffer->sniffer (entry->sniffer, next_frame); + const struct frame_base *desc = NULL; + desc = entry->sniffer (next_frame); if (desc != NULL) return desc; } diff --git a/gdb/frame-base.h b/gdb/frame-base.h index 622ec45..ccc3283 100644 --- a/gdb/frame-base.h +++ b/gdb/frame-base.h @@ -22,8 +22,6 @@ #if !defined (FRAME_BASE_H) #define FRAME_BASE_H 1 -struct frame_base; -struct frame_base_sniffer; struct frame_info; struct frame_id; struct frame_unwind; @@ -31,6 +29,18 @@ struct frame_base; struct gdbarch; struct regcache; +/* Given the NEXT frame, take a wiff of THIS frame's registers (namely + the PC and attributes) and if SELF is the applicable frame-base + handler return non-zero. Optionally also initialize + THIS_BASE_CACHE. + + If THIS frame's unwinder is the same as frame-base.unwind, THIS + frame's prologue-cache will be passed as THIS_BASE_CACHE. */ + +typedef int (frame_base_sniffer) (const struct frame_base *self, + struct frame_info *next_frame, + void **this_base_cache); + /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); and that this is a `normal frame'; use the NEXT frame, and its register unwind method, to determine the address of THIS frame's @@ -42,24 +52,24 @@ struct regcache; A typical implmentation will return the same value for base, locals-base and args-base. That value, however, will likely be - different to the frame ID's stack address. */ + different to the frame ID's stack address. + + If THIS frame's unwinder is the same as frame-base.unwind, THIS + frame's prologue-cache will be passed as THIS_BASE_CACHE. */ /* A generic base address. */ -typedef CORE_ADDR (frame_this_base_ftype) (const struct frame_base *self, - struct frame_info *next_frame, +typedef CORE_ADDR (frame_this_base_ftype) (struct frame_info *next_frame, void **this_base_cache); /* The base address of the frame's local variables. */ -typedef CORE_ADDR (frame_this_locals_ftype) (const struct frame_base *self, - struct frame_info *next_frame, +typedef CORE_ADDR (frame_this_locals_ftype) (struct frame_info *next_frame, void **this_base_cache); /* The base address of the frame's arguments / parameters. */ -typedef CORE_ADDR (frame_this_args_ftype) (const struct frame_base *self, - struct frame_info *next_frame, +typedef CORE_ADDR (frame_this_args_ftype) (struct frame_info *next_frame, void **this_base_cache); struct frame_base @@ -70,28 +80,26 @@ struct frame_base frame_this_base_ftype *this_base; frame_this_locals_ftype *this_locals; frame_this_args_ftype *this_args; - struct frame_data *base_data; + const struct frame_data *base_data; + frame_base_sniffer *sniffer; }; /* Given the NEXT frame, return the frame base methods for THIS frame, or NULL if it can't handle THIS frame. */ -typedef const struct frame_base *(frame_base_sniffer_ftype) - (const struct frame_base_sniffer *self, - struct frame_info *next_frame); -struct frame_base_sniffer -{ - frame_base_sniffer_ftype *sniffer; - const struct frame_data *sniffer_data; -}; +typedef const struct frame_base *(frame_base_sniffer_ftype) (struct frame_info *next_frame); /* Append a frame base sniffer to the list. The sniffers are polled in the order that they are appended. */ extern void frame_base_append_sniffer (struct gdbarch *gdbarch, frame_base_sniffer_ftype *sniffer); -extern void frame_base_sniffer_append (struct gdbarch *gdbarch, - const struct frame_base_sniffer *sniffer); + +/* Register a frame base, appending it to the list that need to be + searched. */ +extern void frame_base_register_base (struct gdbarch *gdbarch, + const struct frame_base *base); + /* Set the default frame base. If all else fails, this one is returned. If this isn't set, the default is to use legacy code @@ -103,6 +111,9 @@ extern void frame_base_set_default (struct gdbarch *gdbarch, /* Iterate through the list of frame base handlers until one returns an implementation. */ -extern const struct frame_base *frame_base_find_by_frame (struct frame_info *next_frame); +extern const struct frame_base *frame_base_find_by_frame (struct frame_info *next_frame, + void **this_base_cache, + const struct frame_unwind *unwinder, + void **this_prologue_cache); #endif diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index f5f5dc1..cacb2ed 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -63,11 +63,12 @@ frame_unwind_append_sniffer (struct gdbarch *gdbarch, } void -frame_unwind_append (struct gdbarch *gdbarch, - const struct frame_unwind *unwinder) +frame_unwind_register_unwinder (struct gdbarch *gdbarch, + const struct frame_unwind *unwinder) { struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data); - (*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind_table_entry); + (*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, + struct frame_unwind_table_entry); (*table->tail)->unwinder = unwinder; table->tail = &((*table->tail)->next); } @@ -92,20 +93,13 @@ frame_unwind_find_by_frame (struct frame_info *next_frame, void **this_cache) const struct frame_unwind *desc = NULL; desc = entry->sniffer (next_frame); if (desc != NULL) - { - (*this_cache) = NULL; - return desc; - } + return desc; } if (entry->unwinder != NULL) { - void *cache = NULL; - cache = entry->unwinder->sniffer (entry->unwinder, next_frame); - if (cache != NULL) - { - (*this_cache) = cache; - return entry->unwinder; - } + if (entry->unwinder->sniffer (entry->unwinder, next_frame, + this_cache)) + return entry->unwinder; } } return legacy_saved_regs_unwind; diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index d29ea2b..49f2889 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -31,13 +31,6 @@ struct regcache; #include "frame.h" /* For enum frame_type. */ -/* Given the NEXT frame, take a wiff of THIS frame's registers (namely - the PC and attributes) and if it is the applicable unwinder, return - an unwind cache (allocated using frame_obstack_zalloc). */ - -typedef void *(frame_sniffer_ftype) (const struct frame_unwind *self, - struct frame_info *next_frame); - /* The following unwind functions assume a chain of frames forming the sequence: (outer) prev <-> this <-> next (inner). All the functions are called with called with the next frame's `struct @@ -50,6 +43,14 @@ typedef void *(frame_sniffer_ftype) (const struct frame_unwind *self, as where this frame's prologue stores the previous frame's registers. */ +/* Given the NEXT frame, take a wiff of THIS frame's registers (namely + the PC and attributes) and if SELF is the applicable unwinder, + return non-zero. Possibly also initialize THIS_PROLOGUE_CACHE. */ + +typedef int (frame_sniffer_ftype) (const struct frame_unwind *self, + struct frame_info *next_frame, + void **this_prologue_cache); + /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); use the NEXT frame, and its register unwind method, to determine the frame ID of THIS frame. @@ -73,8 +74,7 @@ typedef void *(frame_sniffer_ftype) (const struct frame_unwind *self, with the other unwind methods. Memory for that cache should be allocated using frame_obstack_zalloc(). */ -typedef void (frame_this_id_ftype) (const struct frame_unwind *self, - struct frame_info *next_frame, +typedef void (frame_this_id_ftype) (struct frame_info *next_frame, void **this_prologue_cache, struct frame_id *this_id); @@ -110,8 +110,7 @@ typedef void (frame_this_id_ftype) (const struct frame_unwind *self, with the other unwind methods. Memory for that cache should be allocated using frame_obstack_zalloc(). */ -typedef void (frame_prev_register_ftype) (const struct frame_unwind *self, - struct frame_info *next_frame, +typedef void (frame_prev_register_ftype) (struct frame_info *next_frame, void **this_prologue_cache, int prev_regnum, int *optimized, @@ -132,10 +131,10 @@ struct frame_unwind frame_sniffer_ftype *sniffer; }; -/* Register a frame unwinder, appending it to the end of the search +/* Register a frame unwinder, _appending_ it to the end of the search list. */ -extern void frame_unwind_append (struct gdbarch *gdbarch, - const struct frame_unwind *unwinder); +extern void frame_unwind_register_unwinder (struct gdbarch *gdbarch, + const struct frame_unwind *unwinder); /* Given the NEXT frame, take a wiff of THIS frame's registers (namely diff --git a/gdb/frame.c b/gdb/frame.c index b709cdb..004c87c 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -238,8 +238,7 @@ get_frame_id (struct frame_info *fi) fi->type = fi->unwind->type; } /* Find THIS frame's ID. */ - fi->unwind->this_id (fi->unwind, fi->next, &fi->prologue_cache, - &fi->this_id.value); + fi->unwind->this_id (fi->next, &fi->prologue_cache, &fi->this_id.value); fi->this_id.p = 1; if (frame_debug) { @@ -547,8 +546,7 @@ frame_register_unwind (struct frame_info *frame, int regnum, /* Ask this frame to unwind its register. See comment in "frame-unwind.h" for why NEXT frame and this unwind cace are passed in. */ - frame->unwind->prev_register (frame->unwind, frame->next, - &frame->prologue_cache, regnum, + frame->unwind->prev_register (frame->next, &frame->prologue_cache, regnum, optimizedp, lvalp, addrp, realnump, bufferp); if (frame_debug) @@ -942,8 +940,7 @@ select_frame (struct frame_info *fi) most frame. */ static void -legacy_saved_regs_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, +legacy_saved_regs_prev_register (struct frame_info *next_frame, void **this_prologue_cache, int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, @@ -1029,8 +1026,7 @@ legacy_saved_regs_prev_register (const struct frame_unwind *self, } static void -legacy_saved_regs_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, +legacy_saved_regs_this_id (struct frame_info *next_frame, void **this_prologue_cache, struct frame_id *id) { @@ -1500,7 +1496,7 @@ legacy_get_prev_frame (struct frame_info *this_frame) to the new frame code. Implement FRAME_CHAIN the way the new frame will. */ /* Find PREV frame's unwinder. */ - prev->unwind = frame_unwind_find_by_frame (this_frame->next, + prev->unwind = frame_unwind_find_by_frame (this_frame, &prev->prologue_cache); /* FIXME: cagney/2003-04-02: Rather than storing the frame's type in the frame, the unwinder's type should be returned @@ -1509,7 +1505,7 @@ legacy_get_prev_frame (struct frame_info *this_frame) using the method deprecated_set_frame_type(). */ prev->type = prev->unwind->type; /* Find PREV frame's ID. */ - prev->unwind->this_id (prev->unwind, this_frame, + prev->unwind->this_id (this_frame, &prev->prologue_cache, &prev->this_id.value); prev->this_id.p = 1; @@ -2060,12 +2056,13 @@ get_frame_base_address (struct frame_info *fi) if (get_frame_type (fi) != NORMAL_FRAME) return 0; if (fi->base == NULL) - fi->base = frame_base_find_by_frame (fi->next); + fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, + fi->unwind, &fi->prologue_cache); /* Sneaky: If the low-level unwind and high-level base code share a common unwinder, let them share the prologue cache. */ if (fi->base->unwind == fi->unwind) - return fi->base->this_base (fi->base, fi->next, &fi->prologue_cache); - return fi->base->this_base (fi->base, fi->next, &fi->base_cache); + return fi->base->this_base (fi->next, &fi->prologue_cache); + return fi->base->this_base (fi->next, &fi->base_cache); } CORE_ADDR @@ -2076,14 +2073,15 @@ get_frame_locals_address (struct frame_info *fi) return 0; /* If there isn't a frame address method, find it. */ if (fi->base == NULL) - fi->base = frame_base_find_by_frame (fi->next); + fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, + fi->unwind, &fi->prologue_cache); /* Sneaky: If the low-level unwind and high-level base code share a common unwinder, let them share the prologue cache. */ if (fi->base->unwind == fi->unwind) cache = &fi->prologue_cache; else cache = &fi->base_cache; - return fi->base->this_locals (fi->base, fi->next, cache); + return fi->base->this_locals (fi->next, cache); } CORE_ADDR @@ -2094,14 +2092,15 @@ get_frame_args_address (struct frame_info *fi) return 0; /* If there isn't a frame address method, find it. */ if (fi->base == NULL) - fi->base = frame_base_find_by_frame (fi->next); + fi->base = frame_base_find_by_frame (fi->next, &fi->base_cache, + fi->unwind, &fi->prologue_cache); /* Sneaky: If the low-level unwind and high-level base code share a common unwinder, let them share the prologue cache. */ if (fi->base->unwind == fi->unwind) cache = &fi->prologue_cache; else cache = &fi->base_cache; - return fi->base->this_args (fi->base, fi->next, cache); + return fi->base->this_args (fi->next, cache); } /* Level of the selected frame: 0 for innermost, 1 for its caller, ... @@ -2133,7 +2132,7 @@ get_frame_type (struct frame_info *frame) { /* Initialize the frame's unwinder because it is that which provides the frame's type. */ - frame->unwind = frame_unwind_find_by_frame (frame->next, + frame->unwind = frame_unwind_find_by_frame (frame->next, &frame->prologue_cache); /* FIXME: cagney/2003-04-02: Rather than storing the frame's type in the frame, the unwinder's type should be returned diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index b7936e7..48d241c 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -34,6 +34,10 @@ #include "gdb/sim-frv.h" #include "opcodes/frv-desc.h" /* for the H_SPR_... enums */ #include "symtab.h" +#include "elf-bfd.h" +#include "elf/frv.h" +#include "osabi.h" +#include "frv-tdep.h" extern void _initialize_frv_tdep (void); @@ -44,59 +48,6 @@ static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc; static gdbarch_adjust_breakpoint_address_ftype frv_gdbarch_adjust_breakpoint_address; static gdbarch_skip_prologue_ftype frv_skip_prologue; -/* Register numbers. The order in which these appear define the - remote protocol, so take care in changing them. */ -enum { - /* Register numbers 0 -- 63 are always reserved for general-purpose - registers. The chip at hand may have less. */ - first_gpr_regnum = 0, - sp_regnum = 1, - fp_regnum = 2, - struct_return_regnum = 3, - last_gpr_regnum = 63, - - /* Register numbers 64 -- 127 are always reserved for floating-point - registers. The chip at hand may have less. */ - first_fpr_regnum = 64, - last_fpr_regnum = 127, - - /* The PC register. */ - pc_regnum = 128, - - /* Register numbers 129 on up are always reserved for special-purpose - registers. */ - first_spr_regnum = 129, - psr_regnum = 129, - ccr_regnum = 130, - cccr_regnum = 131, - tbr_regnum = 135, - brr_regnum = 136, - dbar0_regnum = 137, - dbar1_regnum = 138, - dbar2_regnum = 139, - dbar3_regnum = 140, - lr_regnum = 145, - lcr_regnum = 146, - iacc0h_regnum = 147, - iacc0l_regnum = 148, - last_spr_regnum = 148, - - /* The total number of registers we know exist. */ - frv_num_regs = last_spr_regnum + 1, - - /* Pseudo registers */ - first_pseudo_regnum = frv_num_regs, - - /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */ - iacc0_regnum = first_pseudo_regnum + 0, - - last_pseudo_regnum = iacc0_regnum, - frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1, -}; - -static LONGEST frv_call_dummy_words[] = -{0}; - struct frv_unwind_cache /* was struct frame_extra_info */ { @@ -111,7 +62,6 @@ struct frv_unwind_cache /* was struct frame_extra_info */ struct trad_frame_saved_reg *saved_regs; }; - /* A structure describing a particular variant of the FRV. We allocate and initialize one of these structures when we create the gdbarch object for a variant. @@ -129,6 +79,9 @@ struct frv_unwind_cache /* was struct frame_extra_info */ Fortran. */ struct gdbarch_tdep { + /* Which ABI is in use? */ + enum frv_abi frv_abi; + /* How many general-purpose registers does this variant have? */ int num_gprs; @@ -143,10 +96,59 @@ struct gdbarch_tdep /* Register names. */ char **register_names; + + /* Given NEXT_FRAME, determine the address of register REGNO saved in + the calling sigtramp frame. */ + CORE_ADDR (*sigcontext_reg_addr) (struct frame_info *next_frame, int regno, + CORE_ADDR *); }; #define CURRENT_VARIANT (gdbarch_tdep (current_gdbarch)) +/* Return the FR-V ABI associated with GDBARCH. */ +enum frv_abi +frv_abi (struct gdbarch *gdbarch) +{ + return gdbarch_tdep (gdbarch)->frv_abi; +} + +/* Set sigcontext_reg_addr. */ +void +frv_set_sigcontext_reg_addr (struct gdbarch *gdbarch, + CORE_ADDR (*sigcontext_reg_addr) + (struct frame_info *, int, CORE_ADDR *)) +{ + gdbarch_tdep (gdbarch)->sigcontext_reg_addr = sigcontext_reg_addr; +} + +/* Fetch the interpreter and executable loadmap addresses (for shared + library support) for the FDPIC ABI. Return 0 if successful, -1 if + not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */ +int +frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch, CORE_ADDR *interp_addr, + CORE_ADDR *exec_addr) +{ + if (frv_abi (gdbarch) != FRV_ABI_FDPIC) + return -1; + else + { + if (interp_addr != NULL) + { + ULONGEST val; + regcache_cooked_read_unsigned (current_regcache, + fdpic_loadmap_interp_regnum, &val); + *interp_addr = val; + } + if (exec_addr != NULL) + { + ULONGEST val; + regcache_cooked_read_unsigned (current_regcache, + fdpic_loadmap_exec_regnum, &val); + *exec_addr = val; + } + return 0; + } +} /* Allocate a new variant structure, and set up default values for all the fields. */ @@ -160,6 +162,7 @@ new_variant (void) var = xmalloc (sizeof (*var)); memset (var, 0, sizeof (*var)); + var->frv_abi = FRV_ABI_EABI; var->num_gprs = 64; var->num_fprs = 64; var->num_hw_watchpoints = 0; @@ -238,6 +241,22 @@ set_variant_num_fprs (struct gdbarch_tdep *var, int num_fprs) } } +static void +set_variant_abi_fdpic (struct gdbarch_tdep *var) +{ + var->frv_abi = FRV_ABI_FDPIC; + var->register_names[fdpic_loadmap_exec_regnum] = xstrdup ("loadmap_exec"); + var->register_names[fdpic_loadmap_interp_regnum] = xstrdup ("loadmap_interp"); +} + +static void +set_variant_scratch_registers (struct gdbarch_tdep *var) +{ + var->register_names[scr0_regnum] = xstrdup ("scr0"); + var->register_names[scr1_regnum] = xstrdup ("scr1"); + var->register_names[scr2_regnum] = xstrdup ("scr2"); + var->register_names[scr3_regnum] = xstrdup ("scr3"); +} static const char * frv_register_name (int reg) @@ -506,7 +525,13 @@ frv_analyze_prologue (CORE_ADDR pc, struct frame_info *next_frame, /* Scan the prologue. */ while (pc < lim_pc) { - LONGEST op = read_memory_integer (pc, 4); + char buf[frv_instr_size]; + LONGEST op; + + if (target_read_memory (pc, buf, sizeof buf) != 0) + break; + op = extract_signed_integer (buf, sizeof buf); + next_pc = pc + 4; /* The tests in this chain of ifs should be in order of @@ -916,7 +941,6 @@ frv_frame_unwind_cache (struct frame_info *next_frame, { struct gdbarch *gdbarch = get_frame_arch (next_frame); CORE_ADDR pc; - ULONGEST prev_sp; ULONGEST this_base; struct frv_unwind_cache *info; @@ -985,6 +1009,45 @@ frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) } static CORE_ADDR +find_func_descr (struct gdbarch *gdbarch, CORE_ADDR entry_point) +{ + CORE_ADDR descr; + char valbuf[4]; + + descr = frv_fdpic_find_canonical_descriptor (entry_point); + + if (descr != 0) + return descr; + + /* Construct a non-canonical descriptor from space allocated on + the stack. */ + + descr = value_as_long (value_allocate_space_in_inferior (8)); + store_unsigned_integer (valbuf, 4, entry_point); + write_memory (descr, valbuf, 4); + store_unsigned_integer (valbuf, 4, + frv_fdpic_find_global_pointer (entry_point)); + write_memory (descr + 4, valbuf, 4); + return descr; +} + +static CORE_ADDR +frv_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, + struct target_ops *targ) +{ + CORE_ADDR entry_point; + CORE_ADDR got_address; + + entry_point = get_target_memory_unsigned (targ, addr, 4); + got_address = get_target_memory_unsigned (targ, addr + 4, 4); + + if (got_address == frv_fdpic_find_global_pointer (entry_point)) + return entry_point; + else + return addr; +} + +static CORE_ADDR frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, @@ -1001,6 +1064,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, CORE_ADDR regval; int stack_space; int stack_offset; + enum frv_abi abi = frv_abi (gdbarch); #if 0 printf("Push %d args at sp = %x, struct_return=%d (%x)\n", @@ -1040,6 +1104,22 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, len = 4; val = valbuf; } + else if (abi == FRV_ABI_FDPIC + && len == 4 + && typecode == TYPE_CODE_PTR + && TYPE_CODE (TYPE_TARGET_TYPE (arg_type)) == TYPE_CODE_FUNC) + { + /* The FDPIC ABI requires function descriptors to be passed instead + of entry points. */ + store_unsigned_integer + (valbuf, 4, + find_func_descr (gdbarch, + extract_unsigned_integer (VALUE_CONTENTS (arg), + 4))); + typecode = TYPE_CODE_PTR; + len = 4; + val = valbuf; + } else { val = (char *) VALUE_CONTENTS (arg); @@ -1077,6 +1157,14 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, always at BP_ADDR. */ regcache_cooked_write_unsigned (regcache, lr_regnum, bp_addr); + if (abi == FRV_ABI_FDPIC) + { + /* Set the GOT register for the FDPIC ABI. */ + regcache_cooked_write_unsigned + (regcache, first_gpr_regnum + 15, + frv_fdpic_find_global_pointer (func_addr)); + } + /* Finally, update the SP register. */ regcache_cooked_write_unsigned (regcache, sp_regnum, sp); @@ -1270,12 +1358,108 @@ frv_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame) frame_pc_unwind (next_frame)); } +/* Signal trampolines. */ + +static struct frv_unwind_cache * +frv_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache) +{ + struct frv_unwind_cache *cache; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + CORE_ADDR addr; + char buf[4]; + int regno; + CORE_ADDR sc_addr_cache_val = 0; + + if (*this_cache) + return *this_cache; + + cache = FRAME_OBSTACK_ZALLOC (struct frv_unwind_cache); + cache->saved_regs = trad_frame_alloc_saved_regs (next_frame); + + frame_unwind_register (next_frame, sp_regnum, buf); + cache->base = extract_unsigned_integer (buf, sizeof buf); + + for (regno = 0; regno < frv_num_regs; regno++) + { + cache->saved_regs[regno].addr + = tdep->sigcontext_reg_addr (next_frame, regno, &sc_addr_cache_val); + } + + + if (cache->saved_regs[sp_regnum].addr != -1 + && target_read_memory (cache->saved_regs[sp_regnum].addr, + buf, sizeof buf) == 0) + { + cache->prev_sp = extract_unsigned_integer (buf, sizeof buf); + + /* Now that we've bothered to read it out of memory, save the + prev frame's SP value in the cache. */ + trad_frame_set_value (cache->saved_regs, sp_regnum, cache->prev_sp); + } + else + { + warning ("Can't read SP value from sigtramp frame"); + } + + *this_cache = cache; + return cache; +} + +static void +frv_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache, + struct frame_id *this_id) +{ + struct frv_unwind_cache *cache = + frv_sigtramp_frame_cache (next_frame, this_cache); + + (*this_id) = frame_id_build (cache->base, frame_pc_unwind (next_frame)); +} + +static void +frv_sigtramp_frame_prev_register (struct frame_info *next_frame, + void **this_cache, + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *valuep) +{ + /* Make sure we've initialized the cache. */ + frv_sigtramp_frame_cache (next_frame, this_cache); + + frv_frame_prev_register (next_frame, this_cache, regnum, + optimizedp, lvalp, addrp, realnump, valuep); +} + +static const struct frame_unwind frv_sigtramp_frame_unwind = +{ + SIGTRAMP_FRAME, + frv_sigtramp_frame_this_id, + frv_sigtramp_frame_prev_register +}; + +static const struct frame_unwind * +frv_sigtramp_frame_sniffer (struct frame_info *next_frame) +{ + CORE_ADDR pc = frame_pc_unwind (next_frame); + char *name; + + /* We shouldn't even bother to try if the OSABI didn't register + a sigcontext_reg_addr handler. */ + if (!gdbarch_tdep (current_gdbarch)->sigcontext_reg_addr) + return NULL; + + find_pc_partial_function (pc, &name, NULL, NULL); + if (PC_IN_SIGTRAMP (pc, name)) + return &frv_sigtramp_frame_unwind; + + return NULL; +} static struct gdbarch * frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { struct gdbarch *gdbarch; struct gdbarch_tdep *var; + int elf_flags = 0; /* Check to see if we've already built an appropriate architecture object for this executable. */ @@ -1297,6 +1481,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; case bfd_mach_fr400: + case bfd_mach_fr450: set_variant_num_gprs (var, 32); set_variant_num_fprs (var, 32); break; @@ -1305,7 +1490,17 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Never heard of this variant. */ return 0; } - + + /* Extract the ELF flags, if available. */ + if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour) + elf_flags = elf_elfheader (info.abfd)->e_flags; + + if (elf_flags & EF_FRV_FDPIC) + set_variant_abi_fdpic (var); + + if (elf_flags & EF_FRV_CPU_FR450) + set_variant_scratch_registers (var); + gdbarch = gdbarch_alloc (&info, var); set_gdbarch_short_bit (gdbarch, 16); @@ -1348,8 +1543,9 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_unwind_pc (gdbarch, frv_unwind_pc); set_gdbarch_unwind_sp (gdbarch, frv_unwind_sp); set_gdbarch_frame_align (gdbarch, frv_frame_align); - frame_unwind_append_sniffer (gdbarch, frv_frame_sniffer); frame_base_set_default (gdbarch, &frv_frame_base); + /* We set the sniffer lower down after the OSABI hooks have been + established. */ /* Settings for calling functions in the inferior. */ set_gdbarch_push_dummy_call (gdbarch, frv_push_dummy_call); @@ -1376,6 +1572,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; case bfd_mach_fr400: + case bfd_mach_fr450: /* fr400-style hardware debugging support. */ var->num_hw_watchpoints = 2; var->num_hw_breakpoints = 4; @@ -1389,6 +1586,18 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } set_gdbarch_print_insn (gdbarch, print_insn_frv); + if (frv_abi (gdbarch) == FRV_ABI_FDPIC) + set_gdbarch_convert_from_func_ptr_addr (gdbarch, + frv_convert_from_func_ptr_addr); + + /* Hook in ABI-specific overrides, if they have been registered. */ + gdbarch_init_osabi (info, gdbarch); + + /* Set the sigtramp frame sniffer. */ + frame_unwind_append_sniffer (gdbarch, frv_sigtramp_frame_sniffer); + + /* Set the fallback (prologue based) frame sniffer. */ + frame_unwind_append_sniffer (gdbarch, frv_frame_sniffer); return gdbarch; } diff --git a/gdb/gdb_obstack.h b/gdb/gdb_obstack.h index ee54cd1..253fd19 100644 --- a/gdb/gdb_obstack.h +++ b/gdb/gdb_obstack.h @@ -24,6 +24,8 @@ #include "obstack.h" +/* Utility macros - wrap obstack alloc into something more robust. */ + #define OBSTACK_ZALLOC(OBSTACK,TYPE) (memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE))) #define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) (memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), 0, (NUMBER) * sizeof (TYPE))) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 8baf82e..e718fa6 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,12 @@ +2004-03-12 Daniel Jacobowitz <drow@mvista.com> + + * linux-low.c: Include <errno.h>. Remove extern declaration of + errno. + +2004-03-12 Daniel Jacobowitz <drow@mvista.com> + + * gdbreplay.c, server.h, utils.c: Update copyright years. + 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com> * server.c (main): Print child status or termination signal from diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c index ec7a2b8..7c9064b 100644 --- a/gdb/gdbserver/gdbreplay.c +++ b/gdb/gdbserver/gdbreplay.c @@ -1,5 +1,5 @@ /* Replay a remote debug session logfile for GDB. - Copyright 1996, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1996, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. Written by Fred Fish (fnf@cygnus.com) from pieces of gdbserver. This file is part of GDB. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 69b35c1..a3d6a54 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -34,6 +34,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <errno.h> /* ``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 @@ -69,8 +70,6 @@ struct pending_signals static int use_regsets_p = 1; #endif -extern int errno; - int debug_threads = 0; #define pid_of(proc) ((proc)->head.id) diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index 4896afb..59dbcf9 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -1,5 +1,5 @@ /* Common definitions for remote server for GDB. - Copyright 1993, 1995, 1997, 1998, 1999, 2000, 2002 + Copyright 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index 20244d6..44bdccf 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -1,5 +1,5 @@ /* General utility routines for the remote server for GDB. - Copyright 1986, 1989, 1993, 1995, 1996, 1997, 1999, 2000, 2002 + Copyright 1986, 1989, 1993, 1995, 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 768a5b6..da4c1e6 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -1,6 +1,6 @@ -/* Target-dependent code for GNU/Linux running on i386's, for GDB. +/* Target-dependent code for GNU/Linux i386. - Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -27,13 +27,13 @@ #include "inferior.h" #include "osabi.h" #include "reggroups.h" -#include "solib-svr4.h" #include "gdb_string.h" #include "i386-tdep.h" #include "i386-linux-tdep.h" #include "glibc-tdep.h" +#include "solib-svr4.h" /* Return the name of register REG. */ @@ -306,47 +306,6 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid) write_register_pid (I386_LINUX_ORIG_EAX_REGNUM, -1, ptid); } -/* Fetch (and possibly build) an appropriate link_map_offsets - structure for native GNU/Linux x86 targets using the struct offsets - defined in link.h (but without actual reference to that file). - - This makes it possible to access GNU/Linux x86 shared libraries - from a GDB that was not built on an GNU/Linux x86 host (for cross - debugging). */ - -static struct link_map_offsets * -i386_linux_svr4_fetch_link_map_offsets (void) -{ - static struct link_map_offsets lmo; - static struct link_map_offsets *lmp = NULL; - - if (lmp == NULL) - { - lmp = &lmo; - - lmo.r_debug_size = 8; /* The actual size is 20 bytes, but - this is all we need. */ - lmo.r_map_offset = 4; - lmo.r_map_size = 4; - - lmo.link_map_size = 20; /* The actual size is 552 bytes, but - this is all we need. */ - lmo.l_addr_offset = 0; - lmo.l_addr_size = 4; - - lmo.l_name_offset = 4; - lmo.l_name_size = 4; - - lmo.l_next_offset = 12; - lmo.l_next_size = 4; - - lmo.l_prev_offset = 16; - lmo.l_prev_size = 4; - } - - return lmp; -} - /* The register sets used in GNU/Linux ELF core-dumps are identical to the register sets in `struct user' that are used for a.out @@ -445,9 +404,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) to support backtracing through calls to signal handlers. */ set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp); + /* GNU/Linux uses SVR4-style shared libraries. */ + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); + + /* GNU/Linux uses the dynamic linker included in the GNU C Library. */ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); - set_solib_svr4_fetch_link_map_offsets (gdbarch, - i386_linux_svr4_fetch_link_map_offsets); } /* Provide a prototype to silence -Wmissing-prototypes. */ diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c index 9383a1d..0f06b2b 100644 --- a/gdb/i386bsd-nat.c +++ b/gdb/i386bsd-nat.c @@ -1,5 +1,6 @@ /* Native-dependent code for modern i386 BSD's. - Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + + Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -52,20 +53,18 @@ typedef struct fpreg fpregset_t; presence, and deal gracefully with their absence. */ /* Registers we shouldn't try to fetch. */ -#if !defined (CANNOT_FETCH_REGISTER) -#define CANNOT_FETCH_REGISTER(regno) cannot_fetch_register (regno) -#endif +#undef CANNOT_FETCH_REGISTER +#define CANNOT_FETCH_REGISTER(regnum) cannot_fetch_register (regnum) /* Registers we shouldn't try to store. */ -#if !defined (CANNOT_STORE_REGISTER) -#define CANNOT_STORE_REGISTER(regno) cannot_fetch_register (regno) -#endif +#undef CANNOT_STORE_REGISTER +#define CANNOT_STORE_REGISTER(regnum) cannot_fetch_register (regnum) /* Offset to the gregset_t location where REG is stored. */ #define REG_OFFSET(reg) offsetof (gregset_t, reg) -/* At reg_offset[REGNO] you'll find the offset to the gregset_t - location where the GDB register REGNO is stored. Unsupported +/* At reg_offset[REGNUM] you'll find the offset to the gregset_t + location where the GDB register REGNUM is stored. Unsupported registers are marked with `-1'. */ static int reg_offset[] = { @@ -95,11 +94,11 @@ static int reg_offset[] = #endif }; -#define REG_ADDR(regset, regno) ((char *) (regset) + reg_offset[regno]) +#define REG_ADDR(regset, regnum) ((char *) (regset) + reg_offset[regnum]) /* Macro to determine if a register is fetched with PT_GETREGS. */ -#define GETREGS_SUPPLIES(regno) \ - ((0 <= (regno) && (regno) <= 15)) +#define GETREGS_SUPPLIES(regnum) \ + ((0 <= (regnum) && (regnum) <= 15)) #ifdef HAVE_PT_GETXMMREGS /* Set to 1 if the kernel supports PT_GETXMMREGS. Initialized to -1 @@ -107,12 +106,12 @@ static int reg_offset[] = static int have_ptrace_xmmregs = -1; #endif -/* Return nonzero if we shouldn't try to fetch register REGNO. */ +/* Return nonzero if we shouldn't try to fetch register REGNUM. */ static int -cannot_fetch_register (int regno) +cannot_fetch_register (int regnum) { - return (reg_offset[regno] == -1); + return (reg_offset[regnum] == -1); } @@ -135,17 +134,17 @@ supply_gregset (gregset_t *gregsetp) } } -/* Fill register REGNO (if it is a general-purpose register) in - *GREGSETPS with the value in GDB's register array. If REGNO is -1, +/* Fill register REGNUM (if it is a general-purpose register) in + *GREGSETPS with the value in GDB's register array. If REGNUM is -1, do this for all registers. */ void -fill_gregset (gregset_t *gregsetp, int regno) +fill_gregset (gregset_t *gregsetp, int regnum) { int i; for (i = 0; i < I386_NUM_GREGS; i++) - if ((regno == -1 || regno == i) && ! CANNOT_STORE_REGISTER (i)) + if ((regnum == -1 || regnum == i) && ! CANNOT_STORE_REGISTER (i)) regcache_collect (i, REG_ADDR (gregsetp, i)); } @@ -160,23 +159,23 @@ supply_fpregset (fpregset_t *fpregsetp) i387_supply_fsave (current_regcache, -1, fpregsetp); } -/* 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 register) in + *FPREGSETP with the value in GDB's register array. If REGNUM is + -1, do this for all registers. */ void -fill_fpregset (fpregset_t *fpregsetp, int regno) +fill_fpregset (fpregset_t *fpregsetp, int regnum) { - i387_fill_fsave ((char *) fpregsetp, regno); + i387_collect_fsave (current_regcache, regnum, fpregsetp); } -/* Fetch register REGNO from the inferior. If REGNO is -1, do this +/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this for all registers (including the floating point registers). */ void -fetch_inferior_registers (int regno) +fetch_inferior_registers (int regnum) { - if (regno == -1 || GETREGS_SUPPLIES (regno)) + if (regnum == -1 || GETREGS_SUPPLIES (regnum)) { gregset_t gregs; @@ -185,11 +184,11 @@ fetch_inferior_registers (int regno) perror_with_name ("Couldn't get registers"); supply_gregset (&gregs); - if (regno != -1) + if (regnum != -1) return; } - if (regno == -1 || regno >= FP0_REGNUM) + if (regnum == -1 || regnum >= I386_ST0_REGNUM) { fpregset_t fpregs; #ifdef HAVE_PT_GETXMMREGS @@ -220,13 +219,13 @@ fetch_inferior_registers (int regno) } } -/* Store register REGNO back into the inferior. If REGNO is -1, do +/* Store register REGNUM back into the inferior. If REGNUM is -1, do this for all registers (including the floating point registers). */ void -store_inferior_registers (int regno) +store_inferior_registers (int regnum) { - if (regno == -1 || GETREGS_SUPPLIES (regno)) + if (regnum == -1 || GETREGS_SUPPLIES (regnum)) { gregset_t gregs; @@ -234,17 +233,17 @@ store_inferior_registers (int regno) (PTRACE_ARG3_TYPE) &gregs, 0) == -1) perror_with_name ("Couldn't get registers"); - fill_gregset (&gregs, regno); + fill_gregset (&gregs, regnum); if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) &gregs, 0) == -1) perror_with_name ("Couldn't write registers"); - if (regno != -1) + if (regnum != -1) return; } - if (regno == -1 || regno >= FP0_REGNUM) + if (regnum == -1 || regnum >= I386_ST0_REGNUM) { fpregset_t fpregs; #ifdef HAVE_PT_GETXMMREGS @@ -256,7 +255,7 @@ store_inferior_registers (int regno) { have_ptrace_xmmregs = 1; - i387_fill_fxsave (xmmregs, regno); + i387_collect_fxsave (current_regcache, regnum, xmmregs); if (ptrace (PT_SETXMMREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) xmmregs, 0) == -1) @@ -270,8 +269,8 @@ store_inferior_registers (int regno) (PTRACE_ARG3_TYPE) &fpregs, 0) == -1) perror_with_name ("Couldn't get floating point status"); - i387_fill_fsave ((char *) &fpregs, regno); - + i387_collect_fsave (current_regcache, regnum, &fpregs); + if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) &fpregs, 0) == -1) perror_with_name ("Couldn't write floating point status"); @@ -361,13 +360,13 @@ i386bsd_dr_get_status (void) /* Support for the user struct. */ -/* Return the address register REGNO. BLOCKEND is the value of +/* Return the address register REGNUM. BLOCKEND is the value of u.u_ar0, which should point to the registers. */ CORE_ADDR -register_u_addr (CORE_ADDR blockend, int regno) +register_u_addr (CORE_ADDR blockend, int regnum) { - return (CORE_ADDR) REG_ADDR (blockend, regno); + return (CORE_ADDR) REG_ADDR (blockend, regnum); } #include <sys/param.h> diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 21386fb..4b212c4 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave) } /* Fill register REGNUM (if it is a floating-point register) in *FSAVE - with the value in GDB's register cache. If REGNUM is -1, do this - for all registers. This function doesn't touch any of the reserved - bits in *FSAVE. */ + with the value from REGCACHE. If REGNUM is -1, do this for all + registers. This function doesn't touch any of the reserved bits in + *FSAVE. */ void -i387_fill_fsave (void *fsave, int regnum) +i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave) { - struct regcache *regcache = current_regcache; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); char *regs = fsave; int i; @@ -468,6 +467,17 @@ i387_fill_fsave (void *fsave, int regnum) } #undef I387_ST0_REGNUM } + +/* Fill register REGNUM (if it is a floating-point register) in *FSAVE + with the value in GDB's register cache. If REGNUM is -1, do this + for all registers. This function doesn't touch any of the reserved + bits in *FSAVE. */ + +void +i387_fill_fsave (void *fsave, int regnum) +{ + i387_collect_fsave (current_regcache, regnum, fsave); +} /* At fxsave_offset[REGNUM] you'll find the offset to the location in diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h index 978fdf99..38e6755 100644 --- a/gdb/i387-tdep.h +++ b/gdb/i387-tdep.h @@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave); /* Fill register REGNUM (if it is a floating-point register) in *FSAVE + with the value from REGCACHE. If REGNUM is -1, do this for all + registers. This function doesn't touch any of the reserved bits in + *FSAVE. */ + +extern void i387_collect_fsave (const struct regcache *regcache, int regnum, + void *fsave); + +/* Fill register REGNUM (if it is a floating-point register) in *FSAVE with the value in GDB's register cache. If REGNUM is -1, do this for all registers. This function doesn't touch any of the reserved bits in *FSAVE. */ diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c index bf0c36d..d7e8dbc 100644 --- a/gdb/libunwind-frame.c +++ b/gdb/libunwind-frame.c @@ -111,7 +111,7 @@ libunwind_frame_set_descr (struct gdbarch *gdbarch, struct libunwind_descr *desc { /* First time here. Must initialize data area. */ arch_descr = libunwind_descr_init (gdbarch); - set_gdbarch_data (gdbarch, libunwind_descr_handle, arch_descr); + deprecated_set_gdbarch_data (gdbarch, libunwind_descr_handle, arch_descr); } /* Copy new descriptor info into arch descriptor. */ @@ -381,7 +381,7 @@ void _initialize_libunwind_frame (void); void _initialize_libunwind_frame (void) { - libunwind_descr_handle = register_gdbarch_data (libunwind_descr_init); + libunwind_descr_handle = gdbarch_data_register_post_init (libunwind_descr_init); libunwind_initialized = libunwind_load (); } diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 278adf7..efe0509 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -385,6 +385,8 @@ m68hc11_register_name (int reg_nr) if (reg_nr >= M68HC11_ALL_REGS) return NULL; + m68hc11_initialize_register_info (); + /* If we don't know the address of a soft register, pretend it does not exist. */ if (reg_nr > M68HC11_LAST_HARD_REG && soft_regs[reg_nr].name == 0) diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index cc8ae5f..7e59eb1 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -668,7 +668,7 @@ static void set_mips_linux_register_addr (struct gdbarch *gdbarch, CORE_ADDR (*register_addr_ptr) (int, CORE_ADDR)) { - set_gdbarch_data (gdbarch, register_addr_data, register_addr_ptr); + deprecated_set_gdbarch_data (gdbarch, register_addr_data, register_addr_ptr); } static void * @@ -844,7 +844,7 @@ _initialize_mips_linux_tdep (void) const struct bfd_arch_info *arch_info; register_addr_data = - register_gdbarch_data (init_register_addr_data); + gdbarch_data_register_post_init (init_register_addr_data); for (arch_info = bfd_lookup_arch (bfd_arch_mips, 0); arch_info != NULL; diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c index 01d8262..157d2b4 100644 --- a/gdb/mipsnbsd-tdep.c +++ b/gdb/mipsnbsd-tdep.c @@ -1,5 +1,5 @@ /* Target-dependent code for MIPS systems running NetBSD. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Wasabi Systems, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "nbsd-tdep.h" #include "mipsnbsd-tdep.h" +#include "mips-tdep.h" #include "solib-svr4.h" diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 619984a..a8eb7b6 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -507,7 +507,24 @@ store_inferior_registers (int regno) void supply_gregset (gdb_gregset_t *gregsetp) { - ppc_linux_supply_gregset ((char *) gregsetp); + /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace + interface, and not the wordsize of the program's ABI. */ + int wordsize = sizeof (PTRACE_XFER_TYPE); + ppc_linux_supply_gregset (current_regcache, -1, gregsetp, + sizeof (gdb_gregset_t), wordsize); +} + +static void +right_fill_reg (int regnum, void *reg) +{ + /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace + interface, and not the wordsize of the program's ABI. */ + int wordsize = sizeof (PTRACE_XFER_TYPE); + /* Right fill the register. */ + regcache_raw_collect (current_regcache, regnum, + ((bfd_byte *) reg + + wordsize + - register_size (current_gdbarch, regnum))); } void @@ -516,36 +533,42 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno) int regi; elf_greg_t *regp = (elf_greg_t *) gregsetp; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + const int elf_ngreg = 48; + + + /* Start with zeros. */ + memset (regp, 0, elf_ngreg * sizeof (*regp)); for (regi = 0; regi < 32; regi++) { if ((regno == -1) || regno == regi) - regcache_collect (regi, regp + PT_R0 + regi); + right_fill_reg (regi, (regp + PT_R0 + regi)); } if ((regno == -1) || regno == PC_REGNUM) - regcache_collect (PC_REGNUM, regp + PT_NIP); + right_fill_reg (PC_REGNUM, regp + PT_NIP); if ((regno == -1) || regno == tdep->ppc_lr_regnum) - regcache_collect (tdep->ppc_lr_regnum, regp + PT_LNK); + right_fill_reg (tdep->ppc_lr_regnum, regp + PT_LNK); if ((regno == -1) || regno == tdep->ppc_cr_regnum) regcache_collect (tdep->ppc_cr_regnum, regp + PT_CCR); if ((regno == -1) || regno == tdep->ppc_xer_regnum) regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER); if ((regno == -1) || regno == tdep->ppc_ctr_regnum) - regcache_collect (tdep->ppc_ctr_regnum, regp + PT_CTR); + right_fill_reg (tdep->ppc_ctr_regnum, regp + PT_CTR); #ifdef PT_MQ if (((regno == -1) || regno == tdep->ppc_mq_regnum) && (tdep->ppc_mq_regnum != -1)) - regcache_collect (tdep->ppc_mq_regnum, regp + PT_MQ); + right_fill_reg (tdep->ppc_mq_regnum, regp + PT_MQ); #endif if ((regno == -1) || regno == tdep->ppc_ps_regnum) - regcache_collect (tdep->ppc_ps_regnum, regp + PT_MSR); + right_fill_reg (tdep->ppc_ps_regnum, regp + PT_MSR); } void supply_fpregset (gdb_fpregset_t * fpregsetp) { - ppc_linux_supply_fpregset ((char *) fpregsetp); + ppc_linux_supply_fpregset (NULL, current_regcache, -1, fpregsetp, + sizeof (gdb_fpregset_t)); } /* Given a pointer to a floating point register set in /proc format @@ -557,12 +580,13 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno) { int regi; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + bfd_byte *fpp = (void *) fpregsetp; for (regi = 0; regi < 32; regi++) { if ((regno == -1) || (regno == FP0_REGNUM + regi)) - regcache_collect (FP0_REGNUM + regi, (char *) (*fpregsetp + regi)); + regcache_collect (FP0_REGNUM + regi, fpp + 8 * regi); } if ((regno == -1) || regno == tdep->ppc_fpscr_regnum) - regcache_collect (tdep->ppc_fpscr_regnum, (char *) (*fpregsetp + regi)); + right_fill_reg (tdep->ppc_fpscr_regnum, (fpp + 8 * 32)); } diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 08f2d64..edac985 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -34,8 +34,11 @@ #include "osabi.h" #include "trad-frame.h" #include "tramp-frame.h" +#include "regset.h" #include "solib-svr4.h" #include "ppc-tdep.h" +#include "trad-frame.h" +#include "frame-unwind.h" /* The following instructions are used in the signal trampoline code on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and @@ -339,111 +342,6 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc) return SYMBOL_VALUE_ADDRESS (msymbol); } -/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The - signal handler details are different, so we'll handle those here - and call the rs6000 version to do the rest. */ -CORE_ADDR -ppc_linux_frame_saved_pc (struct frame_info *fi) -{ - if ((get_frame_type (fi) == SIGTRAMP_FRAME)) - { - CORE_ADDR regs_addr = - read_memory_integer (get_frame_base (fi) - + PPC_LINUX_REGS_PTR_OFFSET, 4); - /* return the NIP in the regs array */ - return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); - } - else if (get_next_frame (fi) - && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) - { - CORE_ADDR regs_addr = - read_memory_integer (get_frame_base (get_next_frame (fi)) - + PPC_LINUX_REGS_PTR_OFFSET, 4); - /* return LNK in the regs array */ - return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); - } - else - return rs6000_frame_saved_pc (fi); -} - -void -ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) -{ - rs6000_init_extra_frame_info (fromleaf, fi); - - if (get_next_frame (fi) != 0) - { - /* We're called from get_prev_frame_info; check to see if - this is a signal frame by looking to see if the pc points - at trampoline code */ - if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) - deprecated_set_frame_type (fi, SIGTRAMP_FRAME); - else - /* FIXME: cagney/2002-11-10: Is this double bogus? What - happens if the frame has previously been marked as a dummy? */ - deprecated_set_frame_type (fi, NORMAL_FRAME); - } -} - -int -ppc_linux_frameless_function_invocation (struct frame_info *fi) -{ - /* We'll find the wrong thing if we let - rs6000_frameless_function_invocation () search for a signal trampoline */ - if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) - return 0; - else - return rs6000_frameless_function_invocation (fi); -} - -void -ppc_linux_frame_init_saved_regs (struct frame_info *fi) -{ - if ((get_frame_type (fi) == SIGTRAMP_FRAME)) - { - CORE_ADDR regs_addr; - int i; - if (deprecated_get_frame_saved_regs (fi)) - return; - - frame_saved_regs_zalloc (fi); - - regs_addr = - read_memory_integer (get_frame_base (fi) - + PPC_LINUX_REGS_PTR_OFFSET, 4); - deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = - regs_addr + 4 * PPC_LINUX_PT_MSR; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = - regs_addr + 4 * PPC_LINUX_PT_CCR; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = - regs_addr + 4 * PPC_LINUX_PT_LNK; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = - regs_addr + 4 * PPC_LINUX_PT_CTR; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = - regs_addr + 4 * PPC_LINUX_PT_XER; - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = - regs_addr + 4 * PPC_LINUX_PT_MQ; - for (i = 0; i < 32; i++) - deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = - regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; - for (i = 0; i < 32; i++) - deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; - } - else - rs6000_frame_init_saved_regs (fi); -} - -CORE_ADDR -ppc_linux_frame_chain (struct frame_info *thisframe) -{ - /* Kernel properly constructs the frame chain for the handler */ - if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) - return read_memory_integer (get_frame_base (thisframe), 4); - else - return rs6000_frame_chain (thisframe); -} - /* 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 @@ -960,81 +858,218 @@ enum { }; enum { - ELF_GREGSET_SIZE = (ELF_NGREG * 4), ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) }; +static void +right_supply_register (struct regcache *regcache, int wordsize, int regnum, + const bfd_byte *buf) +{ + regcache_raw_supply (regcache, regnum, + (buf + wordsize + - register_size (current_gdbarch, regnum))); +} + +/* Extract the register values found in the WORDSIZED ABI GREGSET, + storing their values in REGCACHE. Note that some are left-aligned, + while others are right aligned. */ + void -ppc_linux_supply_gregset (char *buf) +ppc_linux_supply_gregset (struct regcache *regcache, + int regnum, const void *gregs, size_t size, + int wordsize) { int regi; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch *regcache_arch = get_regcache_arch (regcache); + struct gdbarch_tdep *regcache_tdep = gdbarch_tdep (regcache_arch); + const bfd_byte *buf = gregs; for (regi = 0; regi < 32; regi++) - supply_register (regi, buf + 4 * regi); - - supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); - supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); - supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); - supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); - supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); - if (tdep->ppc_mq_regnum != -1) - supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); - supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); + right_supply_register (regcache, wordsize, regi, buf + wordsize * regi); + + right_supply_register (regcache, wordsize, gdbarch_pc_regnum (regcache_arch), + buf + wordsize * PPC_LINUX_PT_NIP); + right_supply_register (regcache, wordsize, regcache_tdep->ppc_lr_regnum, + buf + wordsize * PPC_LINUX_PT_LNK); + regcache_raw_supply (regcache, regcache_tdep->ppc_cr_regnum, + buf + wordsize * PPC_LINUX_PT_CCR); + regcache_raw_supply (regcache, regcache_tdep->ppc_xer_regnum, + buf + wordsize * PPC_LINUX_PT_XER); + regcache_raw_supply (regcache, regcache_tdep->ppc_ctr_regnum, + buf + wordsize * PPC_LINUX_PT_CTR); + if (regcache_tdep->ppc_mq_regnum != -1) + right_supply_register (regcache, wordsize, regcache_tdep->ppc_mq_regnum, + buf + wordsize * PPC_LINUX_PT_MQ); + right_supply_register (regcache, wordsize, regcache_tdep->ppc_ps_regnum, + buf + wordsize * PPC_LINUX_PT_MSR); +} + +static void +ppc32_linux_supply_gregset (const struct regset *regset, + struct regcache *regcache, + int regnum, const void *gregs, size_t size) +{ + ppc_linux_supply_gregset (regcache, regnum, gregs, size, 4); } +static struct regset ppc32_linux_gregset = { + NULL, ppc32_linux_supply_gregset +}; + +struct ppc_linux_sigtramp_cache +{ + CORE_ADDR base; + struct trad_frame_saved_reg *saved_regs; +}; + +static struct ppc_linux_sigtramp_cache * +ppc_linux_sigtramp_cache (struct frame_info *next_frame, void **this_cache) +{ + CORE_ADDR regs; + CORE_ADDR gpregs; + CORE_ADDR fpregs; + int i; + struct ppc_linux_sigtramp_cache *cache; + struct gdbarch *gdbarch = get_frame_arch (next_frame); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if ((*this_cache) != NULL) + return (*this_cache); + cache = FRAME_OBSTACK_ZALLOC (struct ppc_linux_sigtramp_cache); + (*this_cache) = cache; + cache->saved_regs = trad_frame_alloc_saved_regs (next_frame); + + cache->base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); + + /* Find the register pointer, which gives the address of the + register buffers. */ + if (tdep->wordsize == 4) + regs = (cache->base + + 0xd0 /* Offset to ucontext_t. */ + + 0x30 /* Offset to .reg. */); + else + regs = (cache->base + + 0x80 /* Offset to ucontext_t. */ + + 0xe0 /* Offset to .reg. */); + /* And the corresponding register buffers. */ + gpregs = read_memory_unsigned_integer (regs, tdep->wordsize); + fpregs = gpregs + 48 * tdep->wordsize; + + /* General purpose. */ + for (i = 0; i < 32; i++) + { + int regnum = i + tdep->ppc_gp0_regnum; + cache->saved_regs[regnum].addr = gpregs + i * tdep->wordsize; + } + cache->saved_regs[PC_REGNUM].addr = gpregs + 32 * tdep->wordsize; + cache->saved_regs[tdep->ppc_ctr_regnum].addr = gpregs + 35 * tdep->wordsize; + cache->saved_regs[tdep->ppc_lr_regnum].addr = gpregs + 36 * tdep->wordsize; + cache->saved_regs[tdep->ppc_xer_regnum].addr = gpregs + 37 * tdep->wordsize; + cache->saved_regs[tdep->ppc_cr_regnum].addr = gpregs + 38 * tdep->wordsize; + + /* Floating point registers. */ + for (i = 0; i < 32; i++) + { + int regnum = i + FP0_REGNUM; + cache->saved_regs[regnum].addr = fpregs + i * tdep->wordsize; + } + cache->saved_regs[tdep->ppc_fpscr_regnum].addr = fpregs + 32 * tdep->wordsize; + + return cache; +} + +static void +ppc_linux_sigtramp_this_id (struct frame_info *next_frame, void **this_cache, + struct frame_id *this_id) +{ + struct ppc_linux_sigtramp_cache *info + = ppc_linux_sigtramp_cache (next_frame, this_cache); + (*this_id) = frame_id_build (info->base, frame_pc_unwind (next_frame)); +} + +static void +ppc_linux_sigtramp_prev_register (struct frame_info *next_frame, + void **this_cache, + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *valuep) +{ + struct ppc_linux_sigtramp_cache *info + = ppc_linux_sigtramp_cache (next_frame, this_cache); + trad_frame_prev_register (next_frame, info->saved_regs, regnum, + optimizedp, lvalp, addrp, realnump, valuep); +} + +static const struct frame_unwind ppc_linux_sigtramp_unwind = +{ + SIGTRAMP_FRAME, + ppc_linux_sigtramp_this_id, + ppc_linux_sigtramp_prev_register +}; + +static const struct frame_unwind * +ppc_linux_sigtramp_sniffer (struct frame_info *next_frame) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame)); + if (frame_pc_unwind (next_frame) + > frame_unwind_register_unsigned (next_frame, SP_REGNUM)) + /* Assume anything that is vaguely on the stack is a signal + trampoline. */ + return &ppc_linux_sigtramp_unwind; + else + return NULL; +} + +static void +ppc64_linux_supply_gregset (const struct regset *regset, + struct regcache * regcache, + int regnum, const void *gregs, size_t size) +{ + ppc_linux_supply_gregset (regcache, regnum, gregs, size, 8); +} + +static struct regset ppc64_linux_gregset = { + NULL, ppc64_linux_supply_gregset +}; + void -ppc_linux_supply_fpregset (char *buf) +ppc_linux_supply_fpregset (const struct regset *regset, + struct regcache * regcache, + int regnum, const void *fpset, size_t size) { int regi; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch *regcache_arch = get_regcache_arch (regcache); + struct gdbarch_tdep *regcache_tdep = gdbarch_tdep (regcache_arch); + const bfd_byte *buf = fpset; for (regi = 0; regi < 32; regi++) - supply_register (FP0_REGNUM + regi, buf + 8 * regi); + regcache_raw_supply (regcache, FP0_REGNUM + regi, buf + 8 * regi); /* The FPSCR is stored in the low order word of the last doubleword in the fpregset. */ - supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); + regcache_raw_supply (regcache, regcache_tdep->ppc_fpscr_regnum, + buf + 8 * 32 + 4); } -/* - Use a local version of this function to get the correct types for regsets. -*/ +static struct regset ppc_linux_fpregset = { NULL, ppc_linux_supply_fpregset }; -static void -fetch_core_registers (char *core_reg_sect, - unsigned core_reg_size, - int which, - CORE_ADDR reg_addr) +static const struct regset * +ppc_linux_regset_from_core_section (struct gdbarch *core_arch, + const char *sect_name, size_t sect_size) { - if (which == 0) + struct gdbarch_tdep *tdep = gdbarch_tdep (core_arch); + if (strcmp (sect_name, ".reg") == 0) { - if (core_reg_size == ELF_GREGSET_SIZE) - ppc_linux_supply_gregset (core_reg_sect); + if (tdep->wordsize == 4) + return &ppc32_linux_gregset; else - warning ("wrong size gregset struct in core file"); - } - else if (which == 2) - { - if (core_reg_size == ELF_FPREGSET_SIZE) - ppc_linux_supply_fpregset (core_reg_sect); - else - warning ("wrong size fpregset struct in core file"); + return &ppc64_linux_gregset; } + if (strcmp (sect_name, ".reg2") == 0) + return &ppc_linux_fpregset; + return NULL; } -/* Register that we are able to handle ELF file formats using standard - procfs "regset" structures. */ - -static struct core_fns ppc_linux_regset_core_fns = -{ - bfd_target_elf_flavour, /* core_flavour */ - default_check_format, /* check_format */ - default_core_sniffer, /* core_sniffer */ - fetch_core_registers, /* core_read_registers */ - NULL /* next */ -}; - static void ppc_linux_sigtramp_cache (struct frame_info *next_frame, struct trad_frame_cache *this_cache, @@ -1190,19 +1225,9 @@ ppc_linux_init_abi (struct gdbarch_info info, PowerOpen struct convention. */ set_gdbarch_return_value (gdbarch, ppc_linux_return_value); - /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding - *_push_arguments(). The same remarks hold for the methods below. */ - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); - set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); - set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); - - set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, - ppc_linux_frame_init_saved_regs); - set_gdbarch_deprecated_init_extra_frame_info (gdbarch, - ppc_linux_init_extra_frame_info); - set_gdbarch_memory_remove_breakpoint (gdbarch, ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); set_gdbarch_skip_trampoline_code (gdbarch, @@ -1232,6 +1257,8 @@ ppc_linux_init_abi (struct gdbarch_info info, tramp_frame_append (gdbarch, &ppc64_linux_sigaction_tramp_frame); tramp_frame_append (gdbarch, &ppc64_linux_sighandler_tramp_frame); } + set_gdbarch_regset_from_core_section (gdbarch, ppc_linux_regset_from_core_section); + frame_unwind_append_sniffer (gdbarch, ppc_linux_sigtramp_sniffer); } void @@ -1245,5 +1272,4 @@ _initialize_ppc_linux_tdep (void) ppc_linux_init_abi); gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, ppc_linux_init_abi); - add_core_fns (&ppc_linux_regset_core_fns); } diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h index 1c1c9ef..d570f79 100644 --- a/gdb/ppc-tdep.h +++ b/gdb/ppc-tdep.h @@ -1,6 +1,7 @@ /* Target-dependent code for GDB, the GNU debugger. - Copyright 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + + Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, + Inc. This file is part of GDB. @@ -29,11 +30,6 @@ struct regcache; struct type; /* From ppc-linux-tdep.c... */ -CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi); -void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *); -int ppc_linux_frameless_function_invocation (struct frame_info *); -void ppc_linux_frame_init_saved_regs (struct frame_info *); -CORE_ADDR ppc_linux_frame_chain (struct frame_info *); enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, @@ -62,8 +58,12 @@ CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr); int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache); struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void); -void ppc_linux_supply_gregset (char *buf); -void ppc_linux_supply_fpregset (char *buf); +void ppc_linux_supply_gregset (struct regcache *regcache, + int regnum, const void *gregs, size_t size, + int wordsize); +void ppc_linux_supply_fpregset (const struct regset *regset, + struct regcache *regcache, + int regnum, const void *gregs, size_t size); enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype, @@ -72,11 +72,6 @@ enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarc const void *writebuf); /* From rs6000-tdep.c... */ -CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi); -void rs6000_init_extra_frame_info (int fromleaf, struct frame_info *); -int rs6000_frameless_function_invocation (struct frame_info *); -void rs6000_frame_init_saved_regs (struct frame_info *); -CORE_ADDR rs6000_frame_chain (struct frame_info *); int altivec_register_p (int regno); diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 2d0b7f1..b6e869b 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -263,7 +263,7 @@ ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self, this_cache->this_id = frame_id_build (this_cache->this_base, func); } -/* Given the NEXTE frame, examine the instructions at and around this +/* Given the NEXT frame, examine the instructions at and around this frame's resume address (aka PC) to see of they look like a signal trampoline. Return the address of the trampolines first instruction, or zero if it isn't a signal trampoline. */ diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 7f0b90c..e211858 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -1434,13 +1434,14 @@ m32r_stop (void) } -/* Tell whether this target can support a hardware breakpoint. - This implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ +/* Tell whether this target can support a hardware breakpoint. CNT + is the number of hardware breakpoints already installed. This + implements the TARGET_CAN_USE_HARDWARE_WATCHPOINT macro. */ int -m32r_can_use_hardware_watchpoint (void) +m32r_can_use_hw_watchpoint (int type, int cnt, int othertype) { - return max_access_breaks; + return sdi_desc != NULL && cnt < max_access_breaks; } /* Set a data watchpoint. ADDR and LEN should be obvious. TYPE is 0 @@ -1448,12 +1449,12 @@ m32r_can_use_hardware_watchpoint (void) watchpoint. */ int -m32r_set_watchpoint (CORE_ADDR addr, int len, int type) +m32r_insert_watchpoint (CORE_ADDR addr, int len, int type) { int i; if (remote_debug) - fprintf_unfiltered (gdb_stdlog, "m32r_set_watchpoint(%08lx,%d,%d)\n", + fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%08lx,%d,%d)\n", addr, len, type); for (i = 0; i < MAX_ACCESS_BREAKS; i++) @@ -1618,6 +1619,11 @@ init_m32r_ops (void) m32r_ops.to_files_info = m32r_files_info; m32r_ops.to_insert_breakpoint = m32r_insert_breakpoint; m32r_ops.to_remove_breakpoint = m32r_remove_breakpoint; + m32r_ops.to_can_use_hw_breakpoint = m32r_can_use_hw_watchpoint; + m32r_ops.to_insert_watchpoint = m32r_insert_watchpoint; + m32r_ops.to_remove_watchpoint = m32r_remove_watchpoint; + m32r_ops.to_stopped_by_watchpoint = m32r_stopped_by_watchpoint; + m32r_ops.to_stopped_data_address = m32r_stopped_data_address; m32r_ops.to_kill = m32r_kill; m32r_ops.to_load = m32r_load; m32r_ops.to_create_inferior = m32r_create_inferior; diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 6117b82..a8e7023 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -183,68 +183,6 @@ struct frame_extra_info CORE_ADDR initial_sp; /* initial stack pointer. */ }; -void -rs6000_init_extra_frame_info (int fromleaf, struct frame_info *fi) -{ - struct frame_extra_info *extra_info = - frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info)); - extra_info->initial_sp = 0; - if (get_next_frame (fi) != NULL - && get_frame_pc (fi) < TEXT_SEGMENT_BASE) - /* We're in get_prev_frame */ - /* and this is a special signal frame. */ - /* (fi->pc will be some low address in the kernel, */ - /* to which the signal handler returns). */ - deprecated_set_frame_type (fi, SIGTRAMP_FRAME); -} - -/* 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. */ - -/* In this implementation for RS/6000, we do *not* save sp. I am - not sure if it will be needed. The following function takes care of gpr's - and fpr's only. */ - -void -rs6000_frame_init_saved_regs (struct frame_info *fi) -{ - frame_get_saved_regs (fi, NULL); -} - -static CORE_ADDR -rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev) -{ - return (fromleaf - ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev)) - : frame_relative_level (prev) > 0 - ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev)) - : read_pc ()); -} - -static CORE_ADDR -rs6000_frame_args_address (struct frame_info *fi) -{ - struct frame_extra_info *extra_info = get_frame_extra_info (fi); - if (extra_info->initial_sp != 0) - return extra_info->initial_sp; - else - return frame_initial_stack_address (fi); -} - -/* Immediately after a function call, return the saved pc. - Can't go through the frames for this because on some machines - the new frame is not set up until the new function executes - some instructions. */ - -static CORE_ADDR -rs6000_saved_pc_after_call (struct frame_info *fi) -{ - return read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); -} - /* Get the ith function argument for the current function. */ static CORE_ADDR rs6000_fetch_pointer_argument (struct frame_info *frame, int argi, @@ -555,9 +493,26 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) if ((op & 0xfc1fffff) == 0x7c0802a6) { /* mflr Rx */ - lr_reg = (op & 0x03e00000); + /* Since shared library / PIC code, which needs to get its + address at runtime, can appear to save more than one link + register vis: + + *INDENT-OFF* + stwu r1,-304(r1) + mflr r3 + bl 0xff570d0 (blrl) + stw r30,296(r1) + mflr r30 + stw r31,300(r1) + stw r3,308(r1); + ... + *INDENT-ON* + + remember just the first one, but skip over additional + ones. */ + if (lr_reg < 0) + lr_reg = (op & 0x03e00000); continue; - } else if ((op & 0xfc1fffff) == 0x7c000026) { /* mfcr Rx */ @@ -1021,79 +976,6 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) *************************************************************************/ -/* Pop the innermost frame, go back to the caller. */ - -static void -rs6000_pop_frame (void) -{ - CORE_ADDR pc, lr, sp, prev_sp, addr; /* %pc, %lr, %sp */ - struct rs6000_framedata fdata; - struct frame_info *frame = get_current_frame (); - int ii, wordsize; - - pc = read_pc (); - sp = get_frame_base (frame); - - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), - get_frame_base (frame), - get_frame_base (frame))) - { - generic_pop_dummy_frame (); - flush_cached_frames (); - return; - } - - /* Make sure that all registers are valid. */ - deprecated_read_register_bytes (0, NULL, DEPRECATED_REGISTER_BYTES); - - /* Figure out previous %pc value. If the function is frameless, it is - still in the link register, otherwise walk the frames and retrieve the - saved %pc value in the previous frame. */ - - addr = get_frame_func (frame); - (void) skip_prologue (addr, get_frame_pc (frame), &fdata); - - wordsize = gdbarch_tdep (current_gdbarch)->wordsize; - if (fdata.frameless) - prev_sp = sp; - else - prev_sp = read_memory_addr (sp, wordsize); - if (fdata.lr_offset == 0) - lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); - else - lr = read_memory_addr (prev_sp + fdata.lr_offset, wordsize); - - /* reset %pc value. */ - write_register (PC_REGNUM, lr); - - /* reset register values if any was saved earlier. */ - - if (fdata.saved_gpr != -1) - { - addr = prev_sp + fdata.gpr_offset; - for (ii = fdata.saved_gpr; ii <= 31; ++ii) - { - read_memory (addr, &deprecated_registers[DEPRECATED_REGISTER_BYTE (ii)], - wordsize); - addr += wordsize; - } - } - - if (fdata.saved_fpr != -1) - { - addr = prev_sp + fdata.fpr_offset; - for (ii = fdata.saved_fpr; ii <= 31; ++ii) - { - read_memory (addr, &deprecated_registers[DEPRECATED_REGISTER_BYTE (ii + FP0_REGNUM)], 8); - addr += 8; - } - } - - write_register (SP_REGNUM, prev_sp); - target_store_registers (-1); - flush_cached_frames (); -} - /* All the ABI's require 16 byte alignment. */ static CORE_ADDR rs6000_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) @@ -1493,99 +1375,6 @@ rs6000_skip_trampoline_code (CORE_ADDR pc) return pc; } -/* Determines whether the function FI has a frame on the stack or not. */ - -int -rs6000_frameless_function_invocation (struct frame_info *fi) -{ - CORE_ADDR func_start; - struct rs6000_framedata fdata; - - /* Don't even think about framelessness except on the innermost frame - or if the function was interrupted by a signal. */ - if (get_next_frame (fi) != NULL - && !(get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) - return 0; - - func_start = get_frame_func (fi); - - /* If we failed to find the start of the function, it is a mistake - to inspect the instructions. */ - - if (!func_start) - { - /* A frame with a zero PC is usually created by dereferencing a NULL - function pointer, normally causing an immediate core dump of the - inferior. Mark function as frameless, as the inferior has no chance - of setting up a stack frame. */ - if (get_frame_pc (fi) == 0) - return 1; - else - return 0; - } - - (void) skip_prologue (func_start, get_frame_pc (fi), &fdata); - return fdata.frameless; -} - -/* Return the PC saved in a frame. */ - -CORE_ADDR -rs6000_frame_saved_pc (struct frame_info *fi) -{ - CORE_ADDR func_start; - struct rs6000_framedata fdata; - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - int wordsize = tdep->wordsize; - - if ((get_frame_type (fi) == SIGTRAMP_FRAME)) - return read_memory_addr (get_frame_base (fi) + SIG_FRAME_PC_OFFSET, - wordsize); - - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), - get_frame_base (fi), - get_frame_base (fi))) - return deprecated_read_register_dummy (get_frame_pc (fi), - get_frame_base (fi), PC_REGNUM); - - func_start = get_frame_func (fi); - - /* If we failed to find the start of the function, it is a mistake - to inspect the instructions. */ - if (!func_start) - return 0; - - (void) skip_prologue (func_start, get_frame_pc (fi), &fdata); - - if (fdata.lr_offset == 0 && get_next_frame (fi) != NULL) - { - if ((get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) - return read_memory_addr ((get_frame_base (get_next_frame (fi)) - + SIG_FRAME_LR_OFFSET), - wordsize); - else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0)) - /* The link register wasn't saved by this frame and the next - (inner, newer) frame is a dummy. Get the link register - value by unwinding it from that [dummy] frame. */ - { - ULONGEST lr; - frame_unwind_unsigned_register (get_next_frame (fi), - tdep->ppc_lr_regnum, &lr); - return lr; - } - else - return read_memory_addr (DEPRECATED_FRAME_CHAIN (fi) - + tdep->lr_frame_offset, - wordsize); - } - - if (fdata.lr_offset == 0) - return read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); - - return read_memory_addr (DEPRECATED_FRAME_CHAIN (fi) + fdata.lr_offset, - wordsize); -} - /* If saved registers of frame FI are not known yet, read and cache them. &FDATAP contains rs6000_framedata; TDATAP can be NULL, in which case the framedata are read. */ @@ -1763,47 +1552,6 @@ frame_initial_stack_address (struct frame_info *fi) return get_frame_extra_info (fi)->initial_sp; } -/* Describe the pointer in each stack frame to the previous stack frame - (its caller). */ - -/* DEPRECATED_FRAME_CHAIN takes a frame's nominal address and produces - the frame's chain-pointer. */ - -/* In the case of the RS/6000, the frame's nominal address - is the address of a 4-byte word containing the calling frame's address. */ - -CORE_ADDR -rs6000_frame_chain (struct frame_info *thisframe) -{ - CORE_ADDR fp, fpp, lr; - int wordsize = gdbarch_tdep (current_gdbarch)->wordsize; - - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe), - get_frame_base (thisframe), - get_frame_base (thisframe))) - /* A dummy frame always correctly chains back to the previous - frame. */ - return read_memory_addr (get_frame_base (thisframe), wordsize); - - if (deprecated_inside_entry_file (get_frame_pc (thisframe)) - || get_frame_pc (thisframe) == entry_point_address ()) - return 0; - - if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) - fp = read_memory_addr (get_frame_base (thisframe) + SIG_FRAME_FP_OFFSET, - wordsize); - else if (get_next_frame (thisframe) != NULL - && (get_frame_type (get_next_frame (thisframe)) == SIGTRAMP_FRAME) - && (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P () - && DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (thisframe))) - /* A frameless function interrupted by a signal did not change the - frame pointer. */ - fp = get_frame_base (thisframe); - else - fp = read_memory_addr (get_frame_base (thisframe), wordsize); - return fp; -} - /* Return the size of register REG when words are WORDSIZE bytes long. If REG isn't available with that word size, return 0. */ @@ -1866,12 +1614,12 @@ rs6000_register_virtual_type (int n) case 0: return builtin_type_int0; case 4: - return builtin_type_int32; + return builtin_type_uint32; case 8: if (tdep->ppc_ev0_regnum <= n && n <= tdep->ppc_ev31_regnum) return builtin_type_vec64; else - return builtin_type_int64; + return builtin_type_uint64; break; case 16: return builtin_type_vec128; @@ -2640,20 +2388,27 @@ rs6000_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame) frame_pc_unwind (next_frame)); } -static struct trad_frame_cache * +struct rs6000_frame_cache +{ + CORE_ADDR base; + CORE_ADDR initial_sp; + struct trad_frame_saved_reg *saved_regs; +}; + +static struct rs6000_frame_cache * rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) { - struct trad_frame_cache *cache; + struct rs6000_frame_cache *cache; struct gdbarch *gdbarch = get_frame_arch (next_frame); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); struct rs6000_framedata fdata; int wordsize = tdep->wordsize; - CORE_ADDR base; if ((*this_cache) != NULL) return (*this_cache); - cache = trad_frame_cache_zalloc (next_frame); + cache = FRAME_OBSTACK_ZALLOC (struct rs6000_frame_cache); (*this_cache) = cache; + cache->saved_regs = trad_frame_alloc_saved_regs (next_frame); skip_prologue (frame_func_unwind (next_frame), frame_pc_unwind (next_frame), &fdata); @@ -2671,7 +2426,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) && fdata.cr_offset == 0 && fdata.vr_offset == 0 && fdata.ev_offset == 0) - base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); + cache->base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); else { /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most @@ -2679,12 +2434,12 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) ->frame pointed to the outer-most address of the frame. In the mean time, the address of the prev frame is used as the base address of this frame. */ - base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); + cache->base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); if (!fdata.frameless) /* Frameless really means stackless. */ - base = read_memory_addr (base, wordsize); + cache->base = read_memory_addr (cache->base, wordsize); } - trad_frame_set_reg_value (cache, SP_REGNUM, base); + trad_frame_set_value (cache->saved_regs, SP_REGNUM, cache->base); /* if != -1, fdata.saved_fpr is the smallest number of saved_fpr. All fpr's from saved_fpr to fp31 are saved. */ @@ -2692,7 +2447,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) if (fdata.saved_fpr >= 0) { int i; - CORE_ADDR fpr_addr = base + fdata.fpr_offset; + CORE_ADDR fpr_addr = cache->base + fdata.fpr_offset; for (i = fdata.saved_fpr; i < 32; i++) { cache->saved_regs[FP0_REGNUM + i].addr = fpr_addr; @@ -2706,7 +2461,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) if (fdata.saved_gpr >= 0) { int i; - CORE_ADDR gpr_addr = base + fdata.gpr_offset; + CORE_ADDR gpr_addr = cache->base + fdata.gpr_offset; for (i = fdata.saved_gpr; i < 32; i++) { cache->saved_regs[tdep->ppc_gp0_regnum + i].addr = gpr_addr; @@ -2721,7 +2476,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) if (fdata.saved_vr >= 0) { int i; - CORE_ADDR vr_addr = base + fdata.vr_offset; + CORE_ADDR vr_addr = cache->base + fdata.vr_offset; for (i = fdata.saved_vr; i < 32; i++) { cache->saved_regs[tdep->ppc_vr0_regnum + i].addr = vr_addr; @@ -2737,7 +2492,7 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) if (fdata.saved_ev >= 0) { int i; - CORE_ADDR ev_addr = base + fdata.ev_offset; + CORE_ADDR ev_addr = cache->base + fdata.ev_offset; for (i = fdata.saved_ev; i < 32; i++) { cache->saved_regs[tdep->ppc_ev0_regnum + i].addr = ev_addr; @@ -2750,54 +2505,50 @@ rs6000_frame_cache (struct frame_info *next_frame, void **this_cache) /* If != 0, fdata.cr_offset is the offset from the frame that holds the CR. */ if (fdata.cr_offset != 0) - cache->saved_regs[tdep->ppc_cr_regnum].addr = base + fdata.cr_offset; + cache->saved_regs[tdep->ppc_cr_regnum].addr = cache->base + fdata.cr_offset; /* If != 0, fdata.lr_offset is the offset from the frame that holds the LR. */ if (fdata.lr_offset != 0) - cache->saved_regs[tdep->ppc_lr_regnum].addr = base + fdata.lr_offset; + cache->saved_regs[tdep->ppc_lr_regnum].addr = cache->base + fdata.lr_offset; /* The PC is found in the link register. */ cache->saved_regs[PC_REGNUM] = cache->saved_regs[tdep->ppc_lr_regnum]; /* If != 0, fdata.vrsave_offset is the offset from the frame that holds the VRSAVE. */ if (fdata.vrsave_offset != 0) - cache->saved_regs[tdep->ppc_vrsave_regnum].addr = base + fdata.vrsave_offset; + cache->saved_regs[tdep->ppc_vrsave_regnum].addr = cache->base + fdata.vrsave_offset; if (fdata.alloca_reg < 0) /* If no alloca register used, then fi->frame is the value of the %sp for this frame, and it is good enough. */ - cache->this_base = frame_unwind_register_unsigned (next_frame, SP_REGNUM); + cache->initial_sp = frame_unwind_register_unsigned (next_frame, SP_REGNUM); else - cache->this_base = frame_unwind_register_unsigned (next_frame, - fdata.alloca_reg); - - cache->this_id = frame_id_build (base, frame_func_unwind (next_frame)); + cache->initial_sp = frame_unwind_register_unsigned (next_frame, + fdata.alloca_reg); return cache; } static void -rs6000_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, void **this_cache, +rs6000_frame_this_id (struct frame_info *next_frame, void **this_cache, struct frame_id *this_id) { - struct trad_frame_cache *trad_cache = rs6000_frame_cache (next_frame, - this_cache); - trad_frame_this_id (trad_cache, next_frame, this_id); + struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, + this_cache); + (*this_id) = frame_id_build (info->base, frame_func_unwind (next_frame)); } static void -rs6000_frame_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, - void **this_cache, - int regnum, int *optimizedp, - enum lval_type *lvalp, CORE_ADDR *addrp, - int *realnump, void *valuep) -{ - struct trad_frame_cache *trad_cache = rs6000_frame_cache (next_frame, - this_cache); - trad_frame_prev_register (trad_cache, next_frame, regnum, +rs6000_frame_prev_register (struct frame_info *next_frame, + void **this_cache, + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realnump, void *valuep) +{ + struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, + this_cache); + trad_frame_prev_register (next_frame, info->saved_regs, regnum, optimizedp, lvalp, addrp, realnump, valuep); } @@ -2817,13 +2568,12 @@ rs6000_frame_sniffer (struct frame_info *next_frame) static CORE_ADDR -rs6000_frame_base_address (const struct frame_base *self, - struct frame_info *next_frame, - void **this_cache) +rs6000_frame_base_address (struct frame_info *next_frame, + void **this_cache) { - struct trad_frame_cache *trad_cache = rs6000_frame_cache (next_frame, - this_cache); - return trad_cache->this_base; + struct rs6000_frame_cache *info = rs6000_frame_cache (next_frame, + this_cache); + return info->initial_sp; } static const struct frame_base rs6000_frame_base = { @@ -2834,8 +2584,7 @@ static const struct frame_base rs6000_frame_base = { }; static const struct frame_base * -rs6000_frame_base_sniffer (const struct frame_base_sniffer *self, - struct frame_info *next_frame) +rs6000_frame_base_sniffer (struct frame_info *next_frame) { return &rs6000_frame_base; } @@ -3161,16 +2910,11 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) default: set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_believe_pcc_promotion (gdbarch, 1); - set_gdbarch_deprecated_pop_frame (gdbarch, rs6000_pop_frame); - set_gdbarch_deprecated_frame_args_address (gdbarch, rs6000_frame_args_address); - set_gdbarch_deprecated_frame_locals_address (gdbarch, rs6000_frame_args_address); - set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, rs6000_frameless_function_invocation); - set_gdbarch_deprecated_frame_chain (gdbarch, rs6000_frame_chain); - set_gdbarch_deprecated_frame_saved_pc (gdbarch, rs6000_frame_saved_pc); - set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs); - set_gdbarch_deprecated_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info); - set_gdbarch_deprecated_init_frame_pc_first (gdbarch, rs6000_init_frame_pc_first); + + set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); + frame_unwind_append_sniffer (gdbarch, rs6000_frame_sniffer); + set_gdbarch_unwind_dummy_id (gdbarch, rs6000_unwind_dummy_id); + frame_base_append_sniffer (gdbarch, rs6000_frame_base_sniffer); } if (from_xcoff_exec) diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c index 4650666..94c1ee3 100644 --- a/gdb/sentinel-frame.c +++ b/gdb/sentinel-frame.c @@ -45,8 +45,7 @@ sentinel_frame_cache (struct regcache *regcache) /* Here the register value is taken direct from the register cache. */ static void -sentinel_frame_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, +sentinel_frame_prev_register (struct frame_info *next_frame, void **this_prologue_cache, int regnum, int *optimized, enum lval_type *lvalp, CORE_ADDR *addrp, @@ -72,8 +71,7 @@ sentinel_frame_prev_register (const struct frame_unwind *self, } static void -sentinel_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, +sentinel_frame_this_id (struct frame_info *next_frame, void **this_prologue_cache, struct frame_id *this_id) { diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index c9fdff2..abf2948 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1004,7 +1004,7 @@ enable_break (void) char *buf; CORE_ADDR load_addr = 0; int load_addr_found = 0; - struct so_list *inferior_sos; + struct so_list *so; bfd *tmp_bfd = NULL; struct target_ops *tmp_bfd_target; int tmp_fd = -1; @@ -1047,23 +1047,19 @@ enable_break (void) target will also close the underlying bfd. */ tmp_bfd_target = target_bfd_reopen (tmp_bfd); - /* If the entry in _DYNAMIC for the dynamic linker has already - been filled in, we can read its base address from there. */ - inferior_sos = svr4_current_sos (); - if (inferior_sos) + /* On a running target, we can get the dynamic linker's base + address from the shared library table. */ + solib_add (NULL, 0, NULL, auto_solib_add); + so = master_so_list (); + while (so) { - /* Connected to a running target. Update our shared library table. */ - solib_add (NULL, 0, NULL, auto_solib_add); - } - while (inferior_sos) - { - if (strcmp (buf, inferior_sos->so_original_name) == 0) + if (strcmp (buf, so->so_original_name) == 0) { load_addr_found = 1; - load_addr = LM_ADDR (inferior_sos); + load_addr = LM_ADDR (so); break; } - inferior_sos = inferior_sos->next; + so = so->next; } /* Otherwise we find the dynamic linker's base address by examining diff --git a/gdb/solib-svr4.h b/gdb/solib-svr4.h index 5dc13c6..0909e4c 100644 --- a/gdb/solib-svr4.h +++ b/gdb/solib-svr4.h @@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef SOLIB_SVR4 -#define SOLIB_SVR4 +#ifndef SOLIB_SVR4_H +#define SOLIB_SVR4_H struct objfile; @@ -92,4 +92,4 @@ extern struct link_map_offsets *(*legacy_svr4_fetch_link_map_offsets_hook)(void) extern struct link_map_offsets *svr4_ilp32_fetch_link_map_offsets (void); extern struct link_map_offsets *svr4_lp64_fetch_link_map_offsets (void); -#endif +#endif /* solib-svr4.h */ diff --git a/gdb/solib.c b/gdb/solib.c index a98c3bd..137fc70 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -333,6 +333,14 @@ free_so (struct so_list *so) } +/* Return address of first so_list entry in master shared object list. */ +struct so_list * +master_so_list (void) +{ + return so_list_head; +} + + /* A small stub to get us past the arg-passing pinhole of catch_errors. */ static int diff --git a/gdb/solist.h b/gdb/solist.h index 8e5c432..7977c54 100644 --- a/gdb/solist.h +++ b/gdb/solist.h @@ -107,8 +107,12 @@ struct target_so_ops }; +/* Free the memory associated with a (so_list *). */ void free_so (struct so_list *so); +/* Return address of first so_list entry in master shared object list. */ +struct so_list *master_so_list (void); + /* Find solib binary file and open it. */ extern int solib_open (char *in_pathname, char **found_pathname); diff --git a/gdb/stack.c b/gdb/stack.c index 18d9a7c..93e36b5 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1947,20 +1947,8 @@ If you continue, the return value that you specified will be ignored.\n"; /* If we are at the end of a call dummy now, pop the dummy frame too. */ - /* NOTE: cagney/2003-01-18: Is this silly? Instead of popping all - the frames in sequence, should this code just pop the dummy frame - directly? */ -#ifdef DEPRECATED_CALL_DUMMY_HAS_COMPLETED - /* Since all up-to-date architectures return direct to the dummy - breakpoint address, a dummy frame has, by definition, always - completed. Hence this method is no longer needed. */ - if (DEPRECATED_CALL_DUMMY_HAS_COMPLETED (read_pc(), read_sp (), - get_frame_base (get_current_frame ()))) - frame_pop (get_current_frame ()); -#else if (get_frame_type (get_current_frame ()) == DUMMY_FRAME) frame_pop (get_current_frame ()); -#endif /* If interactive, print the frame that is now current. */ if (from_tty) diff --git a/gdb/symtab.h b/gdb/symtab.h index 5a6c398..16a212e 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1067,9 +1067,6 @@ extern int find_pc_partial_function (CORE_ADDR, char **, CORE_ADDR *, extern void clear_pc_function_cache (void); -extern int find_pc_sect_partial_function (CORE_ADDR, asection *, - char **, CORE_ADDR *, CORE_ADDR *); - /* from symtab.c: */ /* lookup partial symbol table by filename */ diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a1d5f12..1dcd201 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2004-03-17 David Carlton <carlton@kealia.com> + + * gdb.cp/classes.exp (test_enums): Refer to PR c++/1588 instead of + PR c++/826. + +2004-03-16 Roland McGrath <roland@redhat.com> + + * gdb.base/auxv.exp: New file. + * gdb.base/auxv.c: New file, copied verbatim from coremaker2.c. + +2004-03-12 David Carlton <carlton@kealia.com> + + * gdb.cp/pr-1553.exp: New. Tests for PR c++/1553. + * gdb.cp/pr-1553.cc: Ditto. + * gdb.cp/local.exp (ptype NestedInnerLocal): Add comment, third + pass branch. + +2004-03-12 Michael Chastain <mec.gnu@mindspring.com> + + * gdb.cp/templates.exp: Accept more template types. + 2004-03-09 Michael Chastain <mec.gnu@mindspring.com> From Corinna Vinschen with modifications. @@ -67,7 +88,7 @@ support. 2004-02-26 Fred Fish <fnf@redhat.com> - + * gdb.arch/gdb1431.c: Remove. * gdb.arch/gdb1431.s: New file, copy of gdb1291.s * gdb.arch/gdb1431.exp: Use "advance" correctly instead @@ -998,7 +1019,7 @@ * lib/gdb.exp (gdb_internal_error_resync): Issue a perror when the resync count exceeded. - + * gdb.base/maint.exp: Use gdb_internal_error_resync to recover from the internal error. * lib/gdb.exp (gdb_internal_error_resync): New procedure. @@ -1031,7 +1052,7 @@ 2003-11-13 Elena Zannoni <ezannoni@redhat.com> * gdb.base/break.c: Add comments to aid finding line numbers for - breakpoints. + breakpoints. * gdb.base/break.exp: Remove all references to explicit line numbers. @@ -1151,7 +1172,7 @@ 2003-09-23 Elena Zannoni <ezannoni@redhat.com> - * gdb.base/selftest.exp: Accomodate more instruction reordering + * gdb.base/selftest.exp: Accomodate more instruction reordering weirdness. 2003-09-17 Michael Chastain <mec@shout.net> @@ -1258,7 +1279,7 @@ escaped correctly. 2003-08-07 Elena Zannoni <ezannoni@redhat.com> - + * configure.in: Don't generate config.h from config.hin. * configure: Regenerate. * config.hin: Remove file. @@ -1306,12 +1327,12 @@ 2003-07-22 Michael Snyder <msnyder@redhat.com> - * gdb.disasm/8300s.s: Fix syntax of bsr insn. + * gdb.disasm/8300s.s: Fix syntax of bsr insn. * gdb.disasm/h8300s.exp : Minor changes in disassembler output require patterns to be more general, accepting old and new output. Some output chars (such as '+') also must be quoted. - Some addresses are displayed numerically instead of + Some addresses are displayed numerically instead of symbolically. 2003-07-23 Michael Snyder <msnyder@redhat.com> @@ -1392,7 +1413,7 @@ * gdb.base/annota1.exp: Make sure that we properly escape the full path of the source file. Xfail more permissive patterns, - due to a compiler debug info problem. + due to a compiler debug info problem. 2003-07-07 Andreas Schwab <schwab@suse.de> @@ -1499,7 +1520,7 @@ * gdb.base/fileio.exp: Disable target when nointerrupts and noinferiorio, instead of limiting it to remote. Use remote_exec instead of system. - + 2003-06-12 Jeff Johnston <jjohnstn@redhat.com> * gdb.base/float.exp: Add ia64 support. @@ -1587,7 +1608,7 @@ * gdb.base/corefile.exp: Tolerate stuff after argument parens in backtrace. - + 2003-05-20 David Carlton <carlton@math.stanford.edu> * gdb.c++/namespace1.cc: Actually do 'cvs add' before committing @@ -1610,13 +1631,13 @@ 2003-05-14 Jeff Johnston <jjohnstn@redhat.com> Roland McGrath <roland@redhat.com> - * gdb.threads/linux-dp.exp: Account for fact that in nptl model + * gdb.threads/linux-dp.exp: Account for fact that in nptl model there is no manager thread. 2003-05-08 Jeff Johnston <jjohnstn@redhat.com> - * gdb.threads/schedlock.exp: Remove assumption that all threads - will run in a particular small time slice. Also ensure we break + * gdb.threads/schedlock.exp: Remove assumption that all threads + will run in a particular small time slice. Also ensure we break in one of the child threads rather than the main thread. 2003-05-07 Jim Blandy <jimb@redhat.com> @@ -1688,7 +1709,7 @@ * gdb.base/attach.exp: Add new message from ptrace in case of attaching to nonexistent process. - + 2003-04-11 Jim Blandy <jimb@redhat.com> * gdb.c++/derivation.exp, gdb.c++/overload.exp, @@ -1705,7 +1726,7 @@ 2003-04-10 Elena Zannoni <ezannoni@redhat.com> - * gdb.base/completion.exp: Use string_to_regexp to match the + * gdb.base/completion.exp: Use string_to_regexp to match the working directory name. 2003-04-09 Jim Blandy <jimb@redhat.com> @@ -1741,9 +1762,9 @@ * lib/gdb.exp: Put "the program is no longer running", and "the program exited" in parenthesis. * lib/mi-support.exp: Ditto. - + 2003-04-02 Bob Rossi <bob_rossi@cox.net> - + * gdb.mi/mi-file.exp: New file for -file-list-exec-source-file. 2003-03-29 Andrew Cagney <cagney@redhat.com> @@ -1872,7 +1893,7 @@ 2003-02-27 Michael Snyder <msnyder@redhat.com> - * gdb.base/restore.c (main): Return zero, so exit code + * gdb.base/restore.c (main): Return zero, so exit code will be consistant. 2003-02-26 David Carlton <carlton@math.stanford.edu> @@ -1944,7 +1965,7 @@ Andrew Cagney <ac131313@redhat.com> * gdb.mi/mi-cli.exp: New file. - + 2003-02-04 Michael Chastain <mec@shout.net> * gdb.c++/anon-union.exp: Do not call gdb_suppress_entire_file. @@ -2050,7 +2071,7 @@ * gdb.asm/asm-source.exp: Ditto. * gdb.base/advance.exp: Ditto. * gdb.base/display.exp: Ditto. - * gdb.base/long_long.exp: Ditto. + * gdb.base/long_long.exp: Ditto. * gdb.base/mips_pro.exp: Ditto. * gdb.base/overlays.exp: Ditto. * gdb.base/relocate.exp: Ditto. @@ -2384,8 +2405,8 @@ 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> - * lib/mi-support.exp (mi_gdb_start): Verify the startup message - for mi1 and current mi is in correct format. New mi startup message + * lib/mi-support.exp (mi_gdb_start): Verify the startup message + for mi1 and current mi is in correct format. New mi startup message should be in mi console format. This is part of fix for PR gdb/604. 2002-09-18 Fernando Nasser <fnasser@redhat.com> @@ -2440,7 +2461,7 @@ * mi0-stack.exp, mi0-stepi.exp, mi0-until.exp: Delete. * mi0-var-block.exp, mi0-var-child.exp: Delete. * mi0-var-cmd.exp, mi0-var-display.exp, mi0-watch.exp: Delete. - + 2002-09-27 Kevin Buettner <kevinb@redhat.com> * gdb.base/annota1.exp (info break): Make directory components of @@ -2467,7 +2488,7 @@ (test_empty_complaint): New function. (test_empty_complaints): New function. Check no output when no complaints. - + 2002-09-19 Jim Blandy <jimb@redhat.com> * gdb.base/charset.exp, gdb.base/charset.c: New files. @@ -2710,7 +2731,7 @@ to avoid having GDB convert them to pointers (with loss of information). - * gdb.base/d10v.ld: Merge in several years worth of + * 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). @@ -2718,7 +2739,7 @@ * 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>: @@ -2740,7 +2761,7 @@ From Benjamin Kosnik <bkoz@redhat.com>: * gdb.c++/try_catch.cc: New file. - * gdb.c++/try_catch.exp: New file. + * gdb.c++/try_catch.exp: New file. 2002-05-27 Michael Chastain <mec@shout.net> @@ -2760,7 +2781,7 @@ 2002-05-23 Michael Snyder <msnyder@redhat.com> - * gdb.base/all-bin.exp: Revise previous patch by just reducing + * gdb.base/all-bin.exp: Revise previous patch by just reducing the precision of the floating point test results. * gdb.base/call-rt-st.exp: Ditto. @@ -2792,7 +2813,7 @@ * gdb.base/maint.exp (maint print type): Update for new type structure. - + 2002-05-14 Elena Zannoni <ezannoni@redhat.com> * gdb.arch: New directory. @@ -2838,7 +2859,7 @@ * gdb.base/default.exp: Merge clauses for arm, strongarm, xscale. * gdb.base/long_long.exp: Merge clauses for arm and xscale. Add iftarget clause for strongarm. - + 2002-05-06 Michael Snyder <msnyder@redhat.com> * lib/gdb.exp (gdb_test): Add case to allow for status wrapper. @@ -3068,7 +3089,7 @@ From Jim Blandy <jimb@redhat.com> 2002-03-27 Michael Snyder <msnyder@redhat.com> - * gdb.base/help.exp: Modify expect strings to reflect + * gdb.base/help.exp: Modify expect strings to reflect clean-ups in help messages. 2002-03-26 Fred Fish <fnf@redhat.com> @@ -3354,7 +3375,7 @@ From Jim Blandy <jimb@redhat.com> print foo_instance1.overload1arg((unsigned int)arg8) print foo_instance1.overload1arg((float)arg11) print foo_instance1.overload1arg((double)arg12) - + 2002-01-07 Michael Snyder <msnyder@redhat.com> * gdb.base/huge.exp: New test. Print a very large target data object. @@ -3476,7 +3497,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) * gdb.base/break.exp: Fix HP specific search string when testing backtracing in a called function. - * gdb.base/constvars.exp: Only set lang to C++ if we're + * gdb.base/constvars.exp: Only set lang to C++ if we're compiling the test with HP's compilers. * gdb.base/volatile.exp: Similarly. @@ -3559,7 +3580,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) 2001-12-06 Michael Snyder <msnyder@redhat.com> - * gdb.asm/asm-source.exp: Add tests for info target, info symbol, + * gdb.asm/asm-source.exp: Add tests for info target, info symbol, and detect whether the start symbol has a leading underscore. 2001-12-04 Jim Blandy <jimb@redhat.com> @@ -3611,7 +3632,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) * gdb.asm/asm-source.exp: Recognize sparc target. * gdb.asm/configure.in: Recognize sparc target. * gdb.asm/configure: Regenerate. - + 2001-11-21 Michael Snyder <msnyder@redhat.com> * gdb.asm/m32r.inc: New file. @@ -3658,7 +3679,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) * gdb.mi/mi0-simplerun.exp: Likewise. * gdb.mi/mi-var-cmd.exp: Likewise. * gdb.mi/mi0-var-cmd.exp: Likewise. - + 2001-11-10 Andrew Cagney <ac131313@redhat.com> * gdb.asm/asmsrc1.s: Add ``gdbasm_'' prefix to all macros. @@ -3681,21 +3702,21 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) 2001-11-07 Michael Snyder <msnyder@redhat.com> - * gdb.c++/templates.exp (test_template_breakpoints): - If we get an overload menu, but it does not match what + * gdb.c++/templates.exp (test_template_breakpoints): + If we get an overload menu, but it does not match what we expect, we still need to issue the "cancel" command. * gdb.c++/templates.exp: Replace "void \\*" with "void ?\\*", making the whitespace optional. Argument for "new" may be "unsigned" as well as "unsigned int/long". - * gdb.c++/templates.exp: Replace "const &" with "const ?&", + * gdb.c++/templates.exp: Replace "const &" with "const ?&", making the whitespace optional. Also replace "(void) with "((void|)), making the keyword "void" optional. - * gdb.c++/virtfunc.exp: Replace "const &" with "const ?&", + * gdb.c++/virtfunc.exp: Replace "const &" with "const ?&", making the whitespace optional. Also replace "(void) with "((void|)), making the keyword "void" optional. * gdb.base/callfuncs.c (t_float_values): This function must _not_ be prototyped, and the following function (t_float_values2) - must be prototyped (if the compiler supports it), so that GDB + must be prototyped (if the compiler supports it), so that GDB can be tested against both cases. Usually one case involves promotion of float to double, while the other does not. * gdb.base/callfwmall.c: Ditto. @@ -3750,7 +3771,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) * gdb.base/ending-run.exp: Create identical output when passing `step to end of run' case. Add regular expression branch satisfying - Stormy16 target. + Stormy16 target. 2001-10-28 Mark Kettenis <kettenis@gnu.org> @@ -3958,7 +3979,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) 2001-07-17 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * gdb.base/remote.c (RANDOM_DATA_SIZE): New define, defaults to 48K + * gdb.base/remote.c (RANDOM_DATA_SIZE): New define, defaults to 48K and defined to 1K for m68hc11. (random_data): Reduce table to 1K for embedded platforms (68hc11). * gdb.base/remote.exp (get_sizeof): New function from sizeof.exp. @@ -4044,13 +4065,13 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) 2001-06-04 Michael Snyder <msnyder@redhat.com> * gdb.threads/pthreads.exp (check_control_c): Return 0 for success, - non-zero if control_c fails. Terminate the test on failure, + non-zero if control_c fails. Terminate the test on failure, rather than wait for 12 more tests to time out. 2001-06-06 Jim Blandy <jimb@redhat.com> * gdb.base/exprs.exp ("sizeof (long long) > sizeof (long) (true)"): - Don't forget to match the GDB prompt. + Don't forget to match the GDB prompt. * gdb.trace/gdb_c_test.c, actions.c: Fix misspellings. @@ -4091,7 +4112,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) Don't assume that short is shorter than int. * gdb.base/exprs.exp ("print unsigned short == (~0)"): Don't assume that shorts are smaller than ints. On a 16-bit machine, - this isn't true. + this isn't true. ("print unsigned char == (~0)"): Add test that verifies that ~0, an int, is not equal to ~0 stored in an unsigned char. This tests the same thing that the previous test meant to, but works on @@ -4101,7 +4122,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) 2001-05-24 Michael Snyder <msnyder@redhat.com> * gdb.threads/pthreads.exp (all_threads_running): Add an explicit - test for (full_coverage == 0). This makes the test run faster, + test for (full_coverage == 0). This makes the test run faster, and prevents dejagnu getting out of step. 2001-05-23 Kevin Buettner <kevinb@redhat.com> @@ -4169,7 +4190,7 @@ Wed Dec 19 14:10:57 2001 Jeffrey A Law (law@redhat.com) * config/sid.exp (gdb_target_sid): Check for error messages. On error or timeout, don't make expect exit (which will terminate all subsequent tests); instead just make gdb exit. - (gdb_load): Check for error messages. On error or timeout, + (gdb_load): Check for error messages. On error or timeout, return a negative value. 2001-04-24 Jim Blandy <jimb@redhat.com> @@ -4415,7 +4436,7 @@ Sun Feb 4 17:32:21 2001 Andrew Cagney <cagney@redhat.com> 2001-01-25 matthew green <mrg@redhat.com> * config/sid.exp (sid_start): Use `remote_spawn' instead of `spawn.' - Deprecate $sid_spawn_id. + Deprecate $sid_spawn_id. (sid_exit): Remove code necessary only for `spawn.' 2001-01-25 matthew green <mrg@redhat.com> @@ -4463,7 +4484,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com> 2000-12-18 Michael Snyder <msnyder@cygnus.com> - * gdb.base/setvar.exp: Use double '\\' to quote curly braces + * gdb.base/setvar.exp: Use double '\\' to quote curly braces in regexp. One '\' does not suffice on Linux. 2000-12-09 Michael Chastain <chastain@redhat.com> @@ -4542,7 +4563,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com> * config/monitor.exp (gdb_target_cmd): Abstracts some of the code from gdb_target_monitor, so it can be used independantly for gdbserver. Also comment out an unnecessary PUTS. - + 2000-11-03 Michael Snyder <msnyder@cygnus.com> * gdb.base/a2-run.exp: Use gdb_skip_stdio_test. @@ -4622,7 +4643,7 @@ Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com> gnu-oldld case on ARM. * gdb.base/watchpoint.exp (test_stepping): Clear xfail for ARM targets. - + Mon Jul 24 07:46:02 CDT 2000 Clinton Popetz <cpopetz@cygnus.com> * gdb.java/configure.in (AC_INIT): Use jmisc.exp. @@ -4678,7 +4699,7 @@ Tue Jul 4 03:43:49 2000 Andrew Cagney <cagney@b1.cygnus.com> compile/link program. Update line numbers. * gdb.asm/d10v.inc: Define ``startup''. * gdb.asm/asmsrc1.s: Add definition of _start. - + Fri Jun 23 17:45:52 2000 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/call-ar-st.exp: More rewrites of multi-line patterns. @@ -4702,12 +4723,12 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-06-03 Daniel Berlin <dan@cgsoftware.com> * gdb.c++/templates.exp (do_tests): Make all of these work under - g++, and stop skipping them. + g++, and stop skipping them. * gdb.c++/namespace.exp: Move from gdb.hp/gdb.aCC to here, make it work under g++. - * gdb.c++/misc.cc: Fix ambiguous initialization with correct + * gdb.c++/misc.cc: Fix ambiguous initialization with correct initialization. 2000-06-02 Michael Snyder <msnyder@cygnus.com> @@ -4729,7 +4750,7 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-05-12 Kevin Buettner <kevinb@redhat.com> * gdb.base/step-test.exp: On IA-64 targets, when stepping out of - a call, do not require that gdb stop on the line after the call. + a call, do not require that gdb stop on the line after the call. Instead, it is permissible for gdb to stop on the line of the call itself. @@ -4746,7 +4767,7 @@ Wed Jun 7 13:02:40 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-05-08 Michael Snyder <msnyder@cygnus.com> - * gdb.base/interrupt.exp: Make "pass" message say "send" + * gdb.base/interrupt.exp: Make "pass" message say "send" rather than "send_gdb" (for consistancy). Mon May 1 15:37:58 2000 Andrew Cagney <cagney@b1.cygnus.com> @@ -4757,7 +4778,7 @@ Mon May 1 15:37:58 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-04-28 Michael Snyder <msnyder@cygnus.com> - * gdb.base/break.exp: When compiled with -O2 optimization, + * gdb.base/break.exp: When compiled with -O2 optimization, gdb may not stop at the first line of main, due to code motion. 2000-04-26 Michael Snyder <msnyder@cygnus.com> @@ -4851,7 +4872,7 @@ Mon Mar 27 14:46:37 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-03-13 James Ingham <jingham@leda.cygnus.com> * lib/gdb.exp: Fix the gdbtk_start routine to correctly find all - the library directories. + the library directories. Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com> @@ -4859,7 +4880,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com> * configure: Re-generate. * gdb.mi: New directory. - + 2000-02-25 Scott Bambrough <scottb@netwinder.org> * gdb.base/long_long.exp: Correct test suite failure when printing @@ -4920,7 +4941,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/so-indr-cl.exp: Don't execute the test if not on HPUX. Don't use xfail's because that affects only the following test. - + * gdb.base/so-impl-ld.exp: Don't execute the tests if not on hpux, solaris or linux. @@ -4928,7 +4949,7 @@ Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com> 2000-01-07 Michael Snyder <msnyder@cygnus.com> - * gdb.base/display.exp: Some yacc parsers like to say + * gdb.base/display.exp: Some yacc parsers like to say "A syntax error" rather than "A parse error". Accept both. 2000-01-06 Fernando Nasser <fnasser@totem.to.cygnus.com> @@ -5055,13 +5076,13 @@ Sat Dec 4 15:21:18 1999 Andrew Cagney <cagney@b1.cygnus.com> * gdb.c++/derivation.exp: remove redundant get compiler info code. - * gdb.base/commands.exp: add '$gdb_prompt $' anchor to + * gdb.base/commands.exp: add '$gdb_prompt $' anchor to 'continue with watch' test point. 1999-11-08 Jim Blandy <jimb@zenia.red-bean.com> Merged from p2linux-990323-branch: - + * lib/gdb.exp (gdb_continue_to_breakpoint): New function. Mon Nov 8 23:07:09 1999 Andrew Cagney <cagney@amy.cygnus.com> @@ -5127,7 +5148,7 @@ Mon Oct 11 13:57:21 1999 Andrew Cagney <cagney@amy.cygnus.com> containing exp_continue into a while within an expect. Don't attempt a start more than three times. Check return value from gdb_load. - + Wed Oct 6 12:05:58 1999 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/watchpoint.exp: Match fail ``finish from marker1'' with @@ -5142,7 +5163,7 @@ Wed Oct 6 12:05:58 1999 Andrew Cagney <cagney@b1.cygnus.com> 1999-10-01 Fred Fish <fnf@cygnus.com> - * gdb.base/help.exp (help add-symbol-file): Update to match current + * gdb.base/help.exp (help add-symbol-file): Update to match current gdb output. 1999-09-18 Jim Blandy <jimb@cris.red-bean.com> @@ -5373,7 +5394,7 @@ Tue Aug 10 15:25:16 1999 Andrew Cagney <cagney@b1.cygnus.com> * gdb.c++/virtfunc.cc: Add return type and value for main. * gdb.c++/virtfunc.exp: Run if HP compiler used, add some match alternatives. - + 1999-07-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * gdb.base/display.exp: Fix output of 'p/a &&j' test. @@ -5427,8 +5448,8 @@ Tue Aug 10 15:25:16 1999 Andrew Cagney <cagney@b1.cygnus.com> * gdb.c++/annota2.exp: Fix delete breakpoint query testcase. Fix run to main failures. Watchpoint can be hardware watchpoint. - - * gdb.base/annota1.exp: Clean up some more, in case printf has + + * gdb.base/annota1.exp: Clean up some more, in case printf has debug info. Deal with lack of signal hanlder info in stack. From Jim Kingdon <kingdon@redhat.com>: @@ -5570,7 +5591,7 @@ Fri Jun 25 19:27:28 1999 Andrew Cagney <cagney@b1.cygnus.com> print_double_array(double_array)", "continuing to breakpoint 1018", "print print_double_array(array_d)" and "continuing to 1034" tests. - + 1999-06-24 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in: Add empty html and install-html targets. @@ -5643,9 +5664,9 @@ Wed Jun 2 17:37:05 1999 Andrew Cagney <cagney@b1.cygnus.com> 1999-05-20 Elena Zannoni <ezannoni@kwikemart.cygnus.com> - * gdb.base/annota1.exp: Allow any number of "frames-invalid" and + * gdb.base/annota1.exp: Allow any number of "frames-invalid" and "breakpoint-invalid" to be printed. - * gdb.base/annota2.exp: Revise line number for main breakpoint. Allow any + * gdb.base/annota2.exp: Revise line number for main breakpoint. Allow any number of "frames-invalid" and "breakpoint-invalid" to be printed. * gdb.base/annota2.cc: Initialize a.x to 0. @@ -5662,7 +5683,7 @@ Wed Jun 2 17:37:05 1999 Andrew Cagney <cagney@b1.cygnus.com> "skip_float_tests" is set. * gdb.base/varargs.exp: Skip "print find_max_double(5,1.0,17.0,2.0,3.0,4.0)" when "skip_float_tests" set. - + 1999-05-06 Keith Seitz <keiths@cygnus.com> * gdb.base/annota2.cc: Include stdio.h. @@ -5744,7 +5765,7 @@ Wed May 5 17:44:31 1999 Stan Shebs <shebs@andros.cygnus.com> change, to mollify finicky HP compiler. * gdb.hp/reg-test.exp (testfile): Fix file name. * gdb.stabs/weird.exp: Don't try to run if HP compiler in use. - + * gdb.c++/misc.cc (main): Initialize obj_with_enum. * gdb.c++/classes.exp: Fix test of obj_with_enum values, allow alternate form of enum ptype. @@ -5763,7 +5784,7 @@ Wed May 5 17:44:31 1999 Stan Shebs <shebs@andros.cygnus.com> Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * gdb.base/commands.exp: Add test for correct position of '>' - when issuing the 'commands' command after a 'while' or 'if' + when issuing the 'commands' command after a 'while' or 'if' command. 1999-03-18 James Ingham <jingham@cygnus.com> @@ -5776,7 +5797,7 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * gdb.base/watchpoint.exp: Use gdb_continue_to_end. * gdb.base/step-test.exp: Catch a case where finish is broken and - keep it from killing the rest of the tests. + keep it from killing the rest of the tests. Use gdb_continue_to_end. * gdb.base/sigall.exp: use gdb_continue_to_end. @@ -5785,11 +5806,11 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * gdb.base/display.exp: use runto_main, not run. - * gdb.base/default.exp: Check for the current error message in the - r abbreviation test. + * gdb.base/default.exp: Check for the current error message in the + r abbreviation test. Add strongarm to the targets that know info float. - * gdb.base/condbreak.exp: Use the gdb_run command rather than just + * gdb.base/condbreak.exp: Use the gdb_run command rather than just run which doesn't work with monitors. * gdb.base/call-ar-st.exp: fixed bogus regexp in continuing to 1034 test. @@ -5797,8 +5818,8 @@ Tue Mar 23 14:56:36 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * gdb.base/break.exp: use the gdb_continue_to_end proc. * lib/gdb.exp: I had added gdb_continue_to_end used to run to the end of a - program. Traps the case (in Cygmon) when the program never really - exits. Same as Mark's continue_to_exit, but I had put it in a lot + program. Traps the case (in Cygmon) when the program never really + exits. Same as Mark's continue_to_exit, but I had put it in a lot more places, so I used my name. Sorry Mark... * config/monitor.exp (gdb_target_monitor): added another @@ -5836,7 +5857,7 @@ Fri Mar 12 18:06:21 1999 Stan Shebs <shebs@andros.cygnus.com> * gdb.base/call-ar-st.c (main): Terminate char_array with a null character, so GDB won't print garbage after its end. - + * gdb.base/call-ar-st.exp: Don't step into sum_array_print; set a breakpoint there instead. Sometimes GCC emits memcpy to handle the large structures being passed by value, so we step into that @@ -5860,7 +5881,7 @@ Fri Mar 12 18:06:21 1999 Stan Shebs <shebs@andros.cygnus.com> 1999-03-05 Nick Clifton <nickc@cygnus.com> - * gdb.base/a2-run.exp: Add expected fails for strongarm-coff. + * gdb.base/a2-run.exp: Add expected fails for strongarm-coff. 1999-03-04 Jim Blandy <jimb@zwingli.cygnus.com> @@ -5924,12 +5945,12 @@ Fri Feb 5 12:42:56 1999 Stan Shebs <shebs@andros.cygnus.com> * gdb.base/long_long.c (known_types): Initialize values to zero. * gdb.base/long_long.exp: Step one more line so 'dec' is initialized in "get to known place". GDB removes - leading zeros. Explicitly ask for hex formatting. Use + leading zeros. Explicitly ask for hex formatting. Use unique test case names. Tue Feb 2 10:16:08 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> - * lib/gdb.exp (gdb_preprocess): Remove 'puts' statement. + * lib/gdb.exp (gdb_preprocess): Remove 'puts' statement. * gdb.c++/method.exp: Add missing close brace. @@ -5979,8 +6000,8 @@ Tue Jan 19 17:20:09 1999 David Taylor <taylor@texas.cygnus.com> Fri Jan 15 14:04:57 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> - * gdb.hp/xdb3.exp: do not execute unless on hppa-hpux platform - and compiled w/o GCC. + * gdb.hp/xdb3.exp: do not execute unless on hppa-hpux platform + and compiled w/o GCC. * gdb.hp/watch-cmd.exp: ditto. @@ -6120,7 +6141,7 @@ Wed Jan 6 18:41:15 1999 David Taylor <taylor@texas.cygnus.com> * gdb.c++/ref-types.exp: new file. * gdb.c++/ref-types2.exp: new file. * gdb.c++/userdef.exp: new file. - + Wed Jan 6 13:50:57 1999 Stan Shebs <shebs@andros.cygnus.com> * gdb.base/default.exp: Reflect wording change in remote.c. @@ -6158,22 +6179,22 @@ Tue Jan 5 13:05:32 1999 David Taylor <taylor@texas.cygnus.com> * gdb.c++/ref-types.cc: new file. * gdb.c++/ref-types2.cc: new file. * gdb.c++/userdef.cc: new file. - + * gdb.base/scope.exp: compile one file at a time, then link. * gdb.base/langs.exp: ditto. * gdb.base/list.exp: ditto. - + Mon Jan 4 10:06:43 1999 David Taylor <taylor@texas.cygnus.com> The following changes were made by David Taylor <taylor@cygnus.com>, Elena Zannoni <ezannoni@cygnus.com>, and Edith Epstein <eepstein@cygnus.com> as part of a project to merge in changes by HP. - + * gdb.c++/inherit.exp: if on hppa*-*-hpux* and not using gcc, skip tests. When compiling pass c++ flag to gdb_compile. * gdb.c++/ - + * lib/gdb.exp (get_compiler_info): new, optional argument -- args; test for on hppa*-*-hpux*; use args to see if c++ was specified. (skip_hp_tests): new function. @@ -6202,7 +6223,7 @@ Mon Jan 4 10:06:43 1999 David Taylor <taylor@texas.cygnus.com> run the tests. tell gdb_compile that it's a c++ compilation. * gdb.threads/pthreads.exp: fix typo in message. - + * gdb.base/all-bin.exp: new file. * gdb.base/arithmet.exp: new file. * gdb.base/assign.exp: new file. @@ -6286,7 +6307,7 @@ Mon Dec 21 14:08:38 1998 David Taylor <taylor@texas.cygnus.com> T1<char>::~T1(void) (test_hp_style_demangling): new hp specific demangling test cases. - + Mon Dec 14 15:07:03 1998 Jeffrey A Law (law@cygnus.com) * gdb.trace/actions.exp: Ignore compiler warnings compiling actions.c @@ -6375,7 +6396,7 @@ Mon Sep 14 20:00:04 1998 Michael Snyder <msnyder@cygnus.com> * gdb.trace/{packetlen.exp passc-dyn.exp passcount.exp}: New files. * gdb.trace/{report.exp save-trace.exp tracecmd.exp}: New files. * gdb.trace/{while-dyn.exp while-stepping.exp}: New files. - + Fri Sep 11 13:58:02 1998 Michael Snyder <msnyder@cygnus.com> * gdb.c++/classes.exp: Change all regular expressions to match @@ -6406,7 +6427,7 @@ Thu Jul 16 18:20:46 1998 Jeffrey A Law (law@cygnus.com) Thurs Jul 9 11:08:31 1998 Dawn Perchik <dawn@cygnus.com> - * gdb.base/commands.exp: Break up infrun_breakpoint_command_test + * gdb.base/commands.exp: Break up infrun_breakpoint_command_test into two parts to get around a synchronization problem in expect. Fri Jun 26 14:27:13 1998 Keith Seitz <keiths@cygnus.com> @@ -6529,15 +6550,15 @@ Mon Apr 13 22:32:51 1998 Frank Ch. Eigler <fche@cygnus.com> Fri Apr 10 22:38:12 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.base/help.exp: Clean up `help set args' and `help show args' - tests. + tests. * gdb.base/interrupt.exp: Add "i*86-*-solaris2*" xfail for calling - function when asleep. + function when asleep. * gdb.base/signals.exp: Add "i*86-*-solaris2*" xfails. Add comment - for i*86 Linux and SVR4 signal handling problems. - Remove linux xfail for `next to handler in signals_tests_1', fixed - by recent infrun.c change. + for i*86 Linux and SVR4 signal handling problems. + Remove linux xfail for `next to handler in signals_tests_1', fixed + by recent infrun.c change. Limit backtrace to 10 frames to avoid timeout problems with infinite - stack backtraces. + stack backtraces. Adjust expect pattern in `handle all print' test to match Apr 28 1997 target.[ch] change. @@ -6574,7 +6595,7 @@ Mon Feb 23 08:22:44 1998 Mark Alexander <marka@cygnus.com> * config/mn10300-eval.exp: New file to support MN10300 eval board. Wed Feb 18 16:43:46 1998 Michael Snyder (msnyder@cygnus.com) - + * gdb.base/overlays (several files): Merge the two overlay managers into one. Change variables (foox, barx, bazx, grbxx) back into ints but force them to load in their proper sections. @@ -6597,7 +6618,7 @@ Tue Feb 10 17:23:22 1998 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/d10vovly.c (D10VTranslate): New function, handle updated d10v memory VMA/LMA map. (D10VCopy): Call D10VTranslate. - + Fri Feb 6 14:13:12 1998 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/m32rovly.c: Force variable _novlys into .data section. @@ -6611,12 +6632,12 @@ Fri Feb 6 14:13:12 1998 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/overlays.exp: Expect variables barx, bazx, foox, grbxx to be arrays. - + Thu Jan 29 14:48:19 1998 Michael Snyder (msnyder@cygnus.com) - + * gdb.base/overlays.exp: fix up and get working again. Add tests for backtraces from an overlay function. - + Fri Jan 23 07:52:45 1998 Fred Fish <fnf@cygnus.com> * gdb.base/watchpoint.exp: Set "d10v*-*-*" clear_xfail for @@ -6659,7 +6680,7 @@ Tue Nov 25 12:46:36 1997 Andrew Cagney <cagney@b1.cygnus.com> target_sizeof_long and target_bigendian_p. (structs_by_value, structs_by_reference): Check values according to targets word size and endianess. - + Mon Nov 24 16:37:06 1997 Andrew Cagney <cagney@b1.cygnus.com> * gdb.base/langs.exp: For "continue to exit" ignore any trailing @@ -6719,7 +6740,7 @@ Fri Sep 12 16:56:38 1997 Bob Manson <manson@charmed.cygnus.com> exists, reload the executable and do a "continue" instead of doing a jump. (runto_main): Use gdb_step_for_stub. - + * gdb.base/break.exp: Use gdb_step_for_stub. Also, rename certain tests to have unique names. * gdb.base/callfuncs.exp: Ditto. @@ -6730,7 +6751,7 @@ Fri Sep 12 16:56:38 1997 Bob Manson <manson@charmed.cygnus.com> * gdb.base/opaque.exp: Ditto. * gdb.base/printcmds.exp: Ditto. Use a loop to emit multiple similar tests. - + * gdb.base/setshow.c: Add set_debug_traps/breakpoint calls. * gdb.c++/cplusfuncs.cc: Ditto. * gdb.c++/virtfunc.cc: Ditto. @@ -6801,7 +6822,7 @@ Fri Jun 27 07:44:25 1997 Fred Fish <fnf@cygnus.com> * gdb.c++/inherit.exp: Ditto. * gdb.c++/templates.exp: Ditto. * gdb.c++/virtfunc.exp: Ditto. - + Wed Jun 25 09:08:51 1997 Bob Manson <manson@charmed.cygnus.com> * lib/gdb.exp(default_gdb_exit): Don't give an error if the remote @@ -6932,7 +6953,7 @@ Thu May 1 18:01:50 1997 Bob Manson <manson@charmed.cygnus.com> Mon Apr 28 17:27:40 1997 Michael Snyder <msnyder@cygnus.com> - * gdb.base/printcmds.exp: add a couple more tests a la + * gdb.base/printcmds.exp: add a couple more tests a la "p 123DEADBEEF", to check parse_number. * top.c: change "to enable to enable" to "to enable" in a couple of help strings. @@ -6941,7 +6962,7 @@ Thu Apr 24 14:38:18 1997 Jeffrey A Law (law@cygnus.com) * gdb.base/callfuncs.exp: Mark some tests as expected to fail on the mn10300. - + Mon Apr 21 15:05:42 1997 Fred Fish <fnf@cygnus.com> * gdb.base/a2-run.exp: Add arm-*-coff setup_xfails for cases @@ -6986,7 +7007,7 @@ Thu Apr 3 15:21:26 1997 Michael Snyder <msnyder@cygnus.com> d10v.ld m32r.ld d10vovly.c m32rovly.c: add test case for overlays. * gdb.base/sigall.c: add usestubs code frag * gdb.base/watchpoint.exp: turn on complex watchpoint test for M32R. - + Thu Apr 3 09:38:53 1997 Bob Manson <manson@charmed.cygnus.com> * lib/gdb.exp(gdb_suppress_tests): Add explanation for subsequent @@ -7141,7 +7162,7 @@ Sun Feb 23 19:56:02 1997 Bob Manson <manson@charmed.cygnus.com> * config/vr4300.exp: New file. * gdb.*/*.exp: Call gdb_expect instead of expect. - + * lib/gdb.exp(gdb_expect): New function. Thu Feb 20 13:57:01 1997 Bob Manson <manson@charmed.cygnus.com> @@ -7316,7 +7337,7 @@ Sun Feb 2 00:55:14 1997 Bob Manson <manson@charmed.cygnus.com> Sat Feb 1 23:51:01 1997 Bob Manson <manson@charmed.cygnus.com> * gdb.*/*.exp: Replace $prompt with $gdb_prompt. - + * gdb.base/scope.exp: Use gdb_test. * gdb.c++/classes.exp: Ditto. * gdb.c++/inherit.exp: Ditto. @@ -7346,7 +7367,7 @@ Thu Jan 30 16:49:25 1997 Bob Manson <manson@charmed.cygnus.com> Tue Jan 28 14:42:31 1997 Bob Manson <manson@charmed.cygnus.com> Major rewrite for testsuite revision. - + * lib/gdb.exp: Remove references to global CC, CXX, B_OPTIONS, TARGET_INCLUDES, LDFLAGS and target_alias. Use gdb_spawn_id instead of relying on spawn_id to always contain a valid @@ -7354,7 +7375,7 @@ Tue Jan 28 14:42:31 1997 Bob Manson <manson@charmed.cygnus.com> (get_compiler_info): New procedure to build the ${binfile}.ci file, instead of replicating this in N different places. (gdb_compile): New procedure. - + gdb.*/*.exp: Use gdb_compile and get_compiler_info (with appropriate arguments) instead of compile. Use gdb_test in a lot more places. Use send_gdb instead of send. Always run gdb_start @@ -7418,7 +7439,7 @@ Sat Nov 23 13:32:15 1996 Fred Fish <fnf@cygnus.com> * gdb.base/signals.exp (signal_tests_1): Remove setup_xfail "i*86-*-linux" for "signal SIGUSR1". Now works, at least with RedHat 4.0. - + * gdb.threads/pthreads.c (_MIT_POSIX_THREADS): Define if target is linux. This allows the test case to at least compile on latest linux, but still not run due to missing the threads runtime library. @@ -7447,7 +7468,7 @@ Thu Nov 21 09:17:19 1996 Fred Fish <fnf@cygnus.com> (xgcc): Set variable to full path of gcc in build tree. Use findfile to verify that gcc exists in build tree, and if so set CC to that gcc and to use B_OPTIONS and TARGET_INCLUDES. - + Tue Nov 12 16:20:13 1996 Fred Fish <fnf@cygnus.com> * gdb.c++/inherit.exp (test_print_anon_union): Reenable @@ -7491,7 +7512,7 @@ Tue Nov 5 10:44:23 1996 Michael Snyder <msnyder@cygnus.com> * gdb.base/[bitfields.exp crossload.exp funcargs.exp interrupt.exp list.exp scope.exp watchpoint.exp] Make all timeout error msgs explicitly say "(timeout)". - + Mon Nov 4 12:03:06 1996 Michael Snyder <msnyder@cygnus.com> * config/monitor.exp: Increase download timeout to 1000 seconds. @@ -7560,7 +7581,7 @@ Fri Oct 11 17:05:22 1996 Fred Fish <fnf@cygnus.com> (distclean maintainer-clean realclean): No need to remove files twice. Nuke the duplicates. * gdb.base/Makefile.in (EXECUTABLES): Add "structs". - * gdb.threads/Makefile.in (distclean maintainer-clean realclean): + * gdb.threads/Makefile.in (distclean maintainer-clean realclean): Remove config.h along with other config files. Mon Sep 30 20:16:22 1996 Fred Fish <fnf@cygnus.com> @@ -7585,7 +7606,7 @@ Mon Sep 30 20:16:22 1996 Fred Fish <fnf@cygnus.com> * lib/gdb.exp (gdb_test): When a gdb aborts, print a more meaningful error message and return -1 so the caller can suppress further tests and avoid a cascade of errors. - + Fri Sep 27 10:34:51 1996 Fred Fish <fnf@cygnus.com> * gdb.base/a1-selftest.exp: Tweak tests to account for new @@ -7593,7 +7614,7 @@ Fri Sep 27 10:34:51 1996 Fred Fish <fnf@cygnus.com> * gdb.base/default.exp: Ditto. * gdb.base/interrupt.exp: Fix problem with cascade of errors if child process dies while calling a function. - + Fri Sep 13 21:43:48 1996 Fred Fish <fnf@cygnus.com> * Makefile.in (VPATH): Add @@ -7625,7 +7646,7 @@ Mon Sep 2 06:36:02 1996 Fred Fish <fnf@cygnus.com> executable, give more meaningful message. * gdb.threads/pthreads.c: Hpux also uses old definition of second arg for pthread_create. - + Mon Aug 19 09:58:59 1996 Fred Fish <fnf@cygnus.com> * gdb.threads/pthreads.c (PTHREAD_CREATE_ARG2, @@ -7644,7 +7665,7 @@ Mon Aug 19 09:58:59 1996 Fred Fish <fnf@cygnus.com> for not compiled with gcc. * gdb.base/mips_pro.exp: Only do setup_xfail hppa*-*-* for backtrace when compiled with gcc. - * lib/gdb.exp (runto_main): Return result of "runto main" rather + * lib/gdb.exp (runto_main): Return result of "runto main" rather than always return success. Sat Aug 17 13:28:00 1996 Fred Fish <fnf@cygnus.com> @@ -7668,7 +7689,7 @@ Mon Aug 12 15:29:08 1996 Fred Fish <fnf@cygnus.com> tests. gdb.c++/virtfunc.exp (do_tests): Add "mips-*-irix5*" setup_xfail for "runto test_calls(void)" test. - + Sun Aug 11 13:11:24 1996 Fred Fish <fnf@cygnus.com> * gdb.base/term.exp: Set 7-bit strings, address off, width to 0, @@ -7707,7 +7728,7 @@ Wed Aug 7 11:05:47 1996 Fred Fish <fnf@cygnus.com> * gdb.threads/{config.in, pthreads.c, pthreads.exp}: New. * gdb.threads/{Makefile.in, configure.in}: Complete rewrites. * gdb.threads/configure: New, generated with autoconf. - + Tue Aug 6 10:23:04 1996 Tom Tromey <tromey@rtl.cygnus.com> * lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n. @@ -7777,9 +7798,9 @@ Tue Jun 25 23:16:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) Tue Jun 25 17:02:39 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * configure.in (AC_PREREQ): autoconf 2.5 or higher. - * gdb.{base,c++,chill,disasm,stabs}/Makefile.in (VPATH): set to + * gdb.{base,c++,chill,disasm,stabs}/Makefile.in (VPATH): set to @srcdir@. - * gdb.{base,c++,chill,disasm,stabs}/configure.in (AC_PREREQ): + * gdb.{base,c++,chill,disasm,stabs}/configure.in (AC_PREREQ): autoconf 2.5 or higher. * gdb.{base,c++,chill,disasm,stabs}/configure: Rebuilt. @@ -7843,7 +7864,7 @@ Wed May 15 08:47:42 1996 Jeffrey A Law (law@cygnus.com) * gdb.base/ptype.exp: Likewise. * gdb.base/setvar.exp: Handle sizeof (int) != 4 for h8300. Add h8300 xfails. - * gdb.base/return.exp: Handle float/double precision problems + * gdb.base/return.exp: Handle float/double precision problems on the h8300. * gdb.base/funcargs.c: Explicitly make last constant argument to call_after_alloca_subr an unsigned long type. @@ -7880,13 +7901,13 @@ Wed Mar 20 08:48:03 1996 Fred Fish <fnf@cygnus.com> gdb.stabs/weird.exp: Remove use of compiler options "-c -o ..." since some compilers don't allow both options to be given on the same command line. Create object file and move it. - + Tue Mar 19 23:49:31 1996 Fred Fish <fnf@cygnus.com> * gdb.base/corefile.exp: Always regenerate the core file, since we always regenerate the coremaker program. Detect special case where registers cannot be read from core file. - + Tue Mar 19 16:52:49 1996 Fred Fish <fnf@cygnus.com> From Peter Schauer <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE> @@ -7899,7 +7920,7 @@ Tue Mar 19 16:52:49 1996 Fred Fish <fnf@cygnus.com> * configure: Regenerate. * gdb.base/Makefile.in (clean): Remove generated file twice-tmp.c here, rather than in distclean. - + Sun Mar 17 13:35:31 1996 Fred Fish <fnf@cygnus.com> * gdb.base/mips_pro.exp: Create mips_pro.ci to get gcc_compiled @@ -7937,10 +7958,10 @@ Fri Mar 15 17:49:57 1996 Fred Fish (fnf@cygnus.com) * gdb.base/ptype.exp: Change "i*86-*-sysv4*" setup_xfail for "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and "ptype t_char_array" to be for native cc only. - + Fri Mar 15 16:17:22 1996 Fred Fish <fnf@cygnus.com> - * gdb.base/corefile.exp: Remove "alpha-dec-osf2*" native compiled + * gdb.base/corefile.exp: Remove "alpha-dec-osf2*" native compiled setup_xfail for "print coremaker_bss", "print coremaker_ro", "print func2::coremaker_local", and "backtrace in corefile.exp". @@ -7983,7 +8004,7 @@ Sun Feb 18 11:39:12 1996 Fred Fish <fnf@cygnus.com> Change "alpha-dec-osf2*" setup_xfail for "bt in signals.exp" to be for gcc only. * lib/gdb.exp: Move verbose statements outside conditionals. - + Sat Feb 17 02:22:14 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.base/sigall.exp: Remove setup_xfail for irix4. Fixed by @@ -8061,7 +8082,7 @@ Mon Jan 15 09:33:00 1996 Fred Fish <fnf@cygnus.com> * gdb.stabs/configure.in (alpha-*-*,mips-*-*): Replace [] tests with "test" and enclose string in quotes. * gdb.stabs/configure: Rebuild - + Thu Jan 11 09:43:14 1996 Tom Tromey <tromey@creche.cygnus.com> Changes in sync with expect: @@ -8085,7 +8106,7 @@ Wed Jan 3 01:30:41 1996 Jeffrey A Law (law@cygnus.com) * gdb.stabs/weird.exp: Use ${target_triplet} to determine which sed script to run. Expect failure for v_comb test on PA targets too. - + Sat Dec 30 16:09:04 1995 Fred Fish <fnf@rtl.cygnus.com> * gdb.base/corefile.exp: Remove "i*86-*-linux" xfail for @@ -8167,7 +8188,7 @@ Sat Nov 25 11:03:42 1995 Fred Fish <fnf@cygnus.com> to returns as necessary, arrange for test to compile own testcase executable. * lib/gdb.exp: Changes for testsuite to compile own test cases. - + Tue Nov 21 16:15:45 1995 Fred Fish <fnf@cygnus.com> * gdb.c++/classes.exp (test_pointers_to_class_members): Add @@ -8232,13 +8253,13 @@ Wed Oct 18 11:27:47 1995 Jeffrey A Law (law@cygnus.com) Tue Oct 17 23:02:12 1995 Jeffrey A Law (law@cygnus.com) - * Many files: When warning about suppressed tests due to a + * Many files: When warning about suppressed tests due to a nonexistant test binary, avoid incrementing the warning count. Tue Oct 10 11:00:41 1995 Fred Fish <fnf@cygnus.com> * Makefile.in (TARGET_FLAGS_TO_PASS): Remove BISON. - + Sun Oct 8 04:23:14 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.base/return.exp: Change xfail from "sparc-*-solaris2.*" to @@ -8344,7 +8365,7 @@ Sat Sep 2 06:41:26 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) Sat Sep 2 00:17:31 1995 Fred Fish <fnf@cygnus.com> - * gdb.base/callfuncs.exp (do_function_calls): Remove + * gdb.base/callfuncs.exp (do_function_calls): Remove mips-sgi-irix* xfail for "call inferior func with struct - returns char *" and fix test so that an optional (unsigned char *) cast is @@ -8360,7 +8381,7 @@ Fri Sep 1 13:42:01 1995 Fred Fish <fnf@cygnus.com> Sun Aug 27 23:35:35 1995 Fred Fish <fnf@cygnus.com> - * gdb.base/callfuncs.exp (do_function_calls): Add alpha-dec-osf2* + * gdb.base/callfuncs.exp (do_function_calls): Add alpha-dec-osf2* clear_xfail for "p t_float_values2(3.14159,float_val2)" for gcc compiled test. * gdb.base/opaque.exp (setup_xfail_on_opaque_pointer): @@ -8400,11 +8421,11 @@ Sun Aug 27 23:35:35 1995 Fred Fish <fnf@cygnus.com> * gdb.base/callfuncs.exp (do_function_calls): Add mips-sgi-irix* xfail, when compiled with native compiler, for "call inferior func with struct - returns char *". - * gdb.base/return.exp (return_tests): Change xfail for + * gdb.base/return.exp (return_tests): Change xfail for "correct value returned double test" to include Solaris 2.4. * gdb.base/funcargs.exp (float_and_integral_args): Add sparc-sun-solaris2* xfail for "print f1 after run to call2a". - + Sat Aug 26 00:26:11 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.base/setvar.c, gdb.base/setvar.exp: Add new tests for @@ -8473,14 +8494,14 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com> "print 'scope1.c'::bar::funclocal" and "print 'scope1.c'::bar::funclocal_bss" to only be xfail'd when not compiled with gcc. - Add rs6000-*-* xfail for + Add rs6000-*-* xfail for "print 'scope0.c'::filelocal_bss before run" when compiled with gcc. (test_at_main): Add rs6000-*-* xfail for "print filelocal_ro in test_at_main" when compiled with gcc. * gdb.base/ptype.exp: Source gdb.base/ptype.ci. - Add rs6000-*-aix* xfail for + Add rs6000-*-aix* xfail for "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and "ptype t_char_array", not compiled with gcc. * gdb.base/list.exp (test_list_function): Add rs6000-*-* @@ -8523,7 +8544,7 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com> * gdb.base/opaque.exp: Source gdb.base/opaque0.ci rather than opaque-info.exp. Setup rs6000-*-* xfail for - "ptype on opaque struct pointer (statically)" and + "ptype on opaque struct pointer (statically)" and "ptype on opaque struct pointer (dynamically)" when not compiled with gcc. * gdb.base/callfuncs.exp: Source gdb.base/callfuncs.ci @@ -8550,7 +8571,7 @@ Tue Aug 15 09:42:44 1995 Fred Fish <fnf@cygnus.com> Add rs6000-*-* xfail for "up to foo in langs.exp" "up to cppsub_ in langs.exp" and "up to fsub in langs.exp" when not gcc compiled. - + Sat Aug 12 15:05:36 1995 Jeffrey A. Law <law@rtl.cygnus.com> * gdb.base/callfuncs.exp: Add xfails for the powerpc. @@ -8581,7 +8602,7 @@ Mon Aug 14 09:01:59 1995 Fred Fish <fnf@cygnus.com> "print 'scope0.c'::filelocal_bss in test_at_foo", "print 'scope0.c'::filelocal at bar", "print 'scope0.c'::filelocal_bss in test_at_bar" - + * gdb.base/list.exp: Remove rs6000-*-* xfail for "list function in source file 1". This bug seems to have been fixed with both gcc and native cc (was native assembler bug?). @@ -8606,7 +8627,7 @@ Wed Aug 9 08:04:12 1995 Fred Fish (fnf@cygnus.com) * gdb.base/callfuncs.exp: Change xfail to "i*86-*-*" for "call inferior function with struct - returns float" and "call inferior function with struct - returns double". - + Mon Aug 7 02:43:28 1995 Jeff Law (law@snake.cs.utah.edu) * gdb.disasm/sh3.s: Source for sh3 disassembler tests. @@ -9711,7 +9732,7 @@ Fri Nov 25 13:37:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) and 'value' method to T5 class for template tests. * gdb.c++/templates.exp: Add testcases for printing of template types, setting breakpoints on template methods and calling a - template method. + template method. Sat Nov 5 00:20:17 1994 Jeff Law (law@snake.cs.utah.edu) @@ -10154,7 +10175,7 @@ Thu Apr 21 12:48:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com) Thu Apr 21 11:54:04 1994 Kung Hsu (kung@mexican.cygnus.com) - * gdb.t24/demangle.exp: change expect pattern of + * gdb.t24/demangle.exp: change expect pattern of __t10ListS_link1ZUiRCUiPT0 Wed Apr 13 15:05:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu) @@ -10221,7 +10242,7 @@ Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) Tue Mar 29 23:55:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - * gdb.t07/watchpoint.exp (test_watchpoint_triggered_in_syscall): + * gdb.t07/watchpoint.exp (test_watchpoint_triggered_in_syscall): Fix typo(s). Sun Mar 27 16:53:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu) @@ -10293,7 +10314,7 @@ Thu Feb 24 19:49:25 1994 Rob Savoye (rob@poseidon.cygnus.com) one from the path. * Makefile.in: Use a fresh expect if there is one, use runtest from the src tree if there is one. - + Thu Feb 24 18:49:37 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * gdb.t06/break.exp (test_next_with_recursion): Remove xfail for @@ -10480,7 +10501,7 @@ Thu Jan 13 17:16:09 1994 Stan Shebs (shebs@andros.cygnus.com) * Makefile.in: Pass LDFLAGS and LIBS to sub-makes. * gdb.t06/configure.in: Don't try to compile signals test program - if doing mips-idt-ecoff. + if doing mips-idt-ecoff. Thu Jan 13 08:25:55 1994 Rob Savoye (rob@darkstar.cygnus.com) @@ -10628,7 +10649,7 @@ Tue Oct 19 14:57:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.t15/funcargs.exp: Don't put comments on same line as setup_xfail (@#$*%& tcl braindamage!). - + Mon Oct 18 21:50:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.disasm/hppa.exp: Use $objdir/$subdir/$binfile not just $binfile. @@ -10919,7 +10940,7 @@ Thu Aug 12 15:24:28 1993 Fred Fish (fnf@deneb.cygnus.com) * Makefile.in (distclean): Remove *.log *.plog *.sum *.psum site.*. * gdb.t17/interrupt.exp: Fix 'missing Continuing' case so pattern - to match does not match the passing case but still matches the + to match does not match the passing case but still matches the failing case. Thu Aug 12 16:58:59 1993 Jim Kingdon (kingdon@lioth.cygnus.com) @@ -11581,7 +11602,7 @@ Thu Mar 25 21:05:16 1993 Fred Fish (fnf@cygnus.com) * gdb.t10/crossload.exp: Disable the i860-elf test until such time as i860 support works. - * gdb.t15/funcargs.exp: Fix expected outputs to include + * gdb.t15/funcargs.exp: Fix expected outputs to include "backtrace 100\r" rather than just "backtrace\r", to match last change. @@ -11760,7 +11781,7 @@ Wed Feb 24 08:03:38 1993 Fred Fish (fnf@cygnus.com) * gdb.t31/chillvars.exp (test_strings): Expect "CHAR" now, rather than "char". * gdb.t31/in-gdbme.ch (simple_struct, nested_struct, struct1, - struct2): New struct definitions and initializations to test + struct2): New struct definitions and initializations to test simple Chill STRUCT types. Tue Feb 23 11:55:06 1993 Fred Fish (fnf@cygnus.com) diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index 0b723e5..d4e78c1 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -703,7 +703,7 @@ proc test_enums {} { } # I'll do this test two different ways, because of a parser bug. - # See PR gdb/826. + # See PR gdb/1588. gdb_test_multiple "print (ClassWithEnum::PrivEnum) 42" "print (ClassWithEnum::PrivEnum) 42" { -re "\\$\[0-9\]+ = yellow$nl$gdb_prompt $" { @@ -712,7 +712,7 @@ proc test_enums {} { -re "A (parse|syntax) error in expression, near `42'.$nl$gdb_prompt $" { # "parse error" is bison 1.35. # "syntax error" is bison 1.875. - kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42" + kfail "gdb/1588" "print (ClassWithEnum::PrivEnum) 42" } } diff --git a/gdb/testsuite/gdb.cp/local.exp b/gdb/testsuite/gdb.cp/local.exp index 5cd2ee9..6bae99f 100644 --- a/gdb/testsuite/gdb.cp/local.exp +++ b/gdb/testsuite/gdb.cp/local.exp @@ -263,10 +263,20 @@ gdb_expect { # # chastain 2002-04-08 +# NOTE (2004-02-24, carlton): This test really is invalid - +# 'NestedInnerLocal' shouldn't be visible, so only the third +# expression should count as a pass. I'm leaving in the earlier +# passes, however, given the current problematic state of our local +# class support, but once we fix PR gdb/482, we should delete this +# test. + send_gdb "ptype NestedInnerLocal\n" gdb_expect { -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" } -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" } + -re "No symbol \"NestedInnerLocal\" in current context\.\r\n$gdb_prompt $" { + pass "ptype NestedInnerLocal" + } -re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" } timeout { fail "(timeout) ptype NestedInnerLocal" } } diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index 8763a93..00a5598 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -455,6 +455,7 @@ send_gdb "ptype quxint\n" gdb_expect { -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } + -re "type = class Qux<int, ?\\(char ?\\*\\)\\(&string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } -re "type = class Qux<int, ?&\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { kfail "gdb/1512" "ptype quxint" } diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c index 8cca619..3b570e1 100644 --- a/gdb/trad-frame.c +++ b/gdb/trad-frame.c @@ -1,6 +1,6 @@ /* Traditional frame unwind support, for GDB the GNU Debugger. - Copyright 2003, 2004 Free Software Foundation, Inc. + Copyright 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -21,125 +21,111 @@ #include "defs.h" #include "frame.h" -#include "frame-unwind.h" #include "trad-frame.h" #include "regcache.h" -#include "frame-base.h" -#include "gdb_assert.h" + +struct trad_frame_cache * +trad_frame_cache_zalloc (struct frame_info *next_frame) +{ + struct trad_frame_cache *this_trad_cache; + + this_trad_cache = FRAME_OBSTACK_ZALLOC (struct trad_frame_cache); + this_trad_cache->prev_regs = trad_frame_alloc_saved_regs (next_frame); + return this_trad_cache; +} /* A traditional frame is unwound by analysing the function prologue and using the information gathered to track registers. For non-optimized frames, the technique is reliable (just need to check for all potential instruction sequences). */ -struct trad_frame_cache * -trad_frame_cache_zalloc (struct frame_info *next_frame) +struct trad_frame_saved_reg * +trad_frame_alloc_saved_regs (struct frame_info *next_frame) { - struct gdbarch *gdbarch = get_frame_arch (next_frame); - const int numregs = NUM_REGS + NUM_PSEUDO_REGS; - struct trad_frame_cache *trad_cache; int regnum; - - trad_cache = FRAME_OBSTACK_ZALLOC (struct trad_frame_cache); - trad_cache->saved_regs = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg); + struct gdbarch *gdbarch = get_frame_arch (next_frame); + int numregs = NUM_REGS + NUM_PSEUDO_REGS; + struct trad_frame_saved_reg *this_saved_regs + = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg); for (regnum = 0; regnum < numregs; regnum++) { - trad_cache->saved_regs[regnum].realreg = regnum; - trad_cache->saved_regs[regnum].addr = -1; + this_saved_regs[regnum].realreg = regnum; + this_saved_regs[regnum].addr = -1; } - return trad_cache; + return this_saved_regs; } enum { REG_VALUE = -1, REG_UNKNOWN = -2 }; int -trad_frame_value_p (struct trad_frame_cache *this_cache, int regnum) +trad_frame_value_p (struct trad_frame_saved_reg this_saved_regs[], int regnum) { - return (this_cache->saved_regs[regnum].realreg == REG_VALUE); + return (this_saved_regs[regnum].realreg == REG_VALUE); } int -trad_frame_addr_p (struct trad_frame_cache *this_cache, int regnum) +trad_frame_addr_p (struct trad_frame_saved_reg this_saved_regs[], int regnum) { - return (this_cache->saved_regs[regnum].realreg >= 0 - && this_cache->saved_regs[regnum].addr != -1); + return (this_saved_regs[regnum].realreg >= 0 + && this_saved_regs[regnum].addr != -1); } int -trad_frame_realreg_p (struct trad_frame_cache *this_cache, +trad_frame_realreg_p (struct trad_frame_saved_reg this_saved_regs[], int regnum) { - return (this_cache->saved_regs[regnum].realreg >= 0 - && this_cache->saved_regs[regnum].addr == -1); -} - -void -trad_frame_set_reg_value (struct trad_frame_cache *this_cache, - int regnum, LONGEST val) -{ - /* Make the REALREG invalid, indicating that the ADDR contains the - register's value. */ - this_cache->saved_regs[regnum].realreg = REG_VALUE; - this_cache->saved_regs[regnum].addr = val; + return (this_saved_regs[regnum].realreg >= 0 + && this_saved_regs[regnum].addr == -1); } void -trad_frame_set_addr (struct trad_frame_cache *this_cache, - int regnum, CORE_ADDR addr) +trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[], + int regnum, LONGEST val) { /* Make the REALREG invalid, indicating that the ADDR contains the register's value. */ - this_cache->saved_regs[regnum].realreg = regnum; - this_cache->saved_regs[regnum].addr = addr; + this_saved_regs[regnum].realreg = REG_VALUE; + this_saved_regs[regnum].addr = val; } void -trad_frame_set_unknown (struct trad_frame_cache *this_cache, +trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[], int regnum) { /* Make the REALREG invalid, indicating that the value is not known. */ - this_cache->saved_regs[regnum].realreg = REG_UNKNOWN; - this_cache->saved_regs[regnum].addr = -1; + this_saved_regs[regnum].realreg = REG_UNKNOWN; + this_saved_regs[regnum].addr = -1; } -struct frame_data -{ - const struct frame_unwind *frame_unwind; - const struct frame_base *frame_base; - const struct trad_frame *trad_frame; -}; - void -trad_frame_prev_register (struct trad_frame_cache *trad_cache, - struct frame_info *next_frame, +trad_frame_prev_register (struct frame_info *next_frame, + struct trad_frame_saved_reg this_saved_regs[], int regnum, int *optimizedp, enum lval_type *lvalp, CORE_ADDR *addrp, int *realregp, void *bufferp) { struct gdbarch *gdbarch = get_frame_arch (next_frame); - - gdb_assert (trad_cache != NULL); - if (trad_frame_addr_p (trad_cache, regnum)) + if (trad_frame_addr_p (this_saved_regs, regnum)) { /* The register was saved in memory. */ *optimizedp = 0; *lvalp = lval_memory; - *addrp = trad_cache->saved_regs[regnum].addr; + *addrp = this_saved_regs[regnum].addr; *realregp = -1; if (bufferp != NULL) { /* Read the value in from memory. */ - get_frame_memory (next_frame, trad_cache->saved_regs[regnum].addr, bufferp, + get_frame_memory (next_frame, this_saved_regs[regnum].addr, bufferp, register_size (gdbarch, regnum)); } } - else if (trad_frame_realreg_p (trad_cache, regnum)) + else if (trad_frame_realreg_p (this_saved_regs, regnum)) { /* Ask the next frame to return the value of the register. */ - frame_register_unwind (next_frame, trad_cache->saved_regs[regnum].realreg, + frame_register_unwind (next_frame, this_saved_regs[regnum].realreg, optimizedp, lvalp, addrp, realregp, bufferp); } - else if (trad_frame_value_p (trad_cache, regnum)) + else if (trad_frame_value_p (this_saved_regs, regnum)) { /* The register's value is available. */ *optimizedp = 0; @@ -148,7 +134,7 @@ trad_frame_prev_register (struct trad_frame_cache *trad_cache, *realregp = -1; if (bufferp != NULL) store_unsigned_integer (bufferp, register_size (gdbarch, regnum), - trad_cache->saved_regs[regnum].addr); + this_saved_regs[regnum].addr); } else { @@ -156,85 +142,3 @@ trad_frame_prev_register (struct trad_frame_cache *trad_cache, gdbarch_register_name (gdbarch, regnum)); } } - -void -trad_frame_this_id (struct trad_frame_cache *trad_cache, - struct frame_info *next_frame, - struct frame_id *this_id) -{ - gdb_assert (trad_cache != NULL); - (*this_id) = trad_cache->this_id; -} - -static void * -trad_frame_sniffer (const struct frame_unwind *self, - struct frame_info *next_frame) -{ - const struct trad_frame *trad_frame = self->unwind_data->trad_frame; - gdb_assert (trad_frame->sniffer != NULL); - return trad_frame->sniffer (trad_frame, next_frame); -} - -static CORE_ADDR -trad_frame_base (const struct frame_base *self, - struct frame_info *next_frame, - void **this_cache) -{ - struct trad_frame_cache *trad_cache = (*this_cache); - - gdb_assert (trad_cache != NULL); - return trad_cache->this_base; -} - -static const struct frame_base * -trad_frame_base_sniffer (const struct frame_base_sniffer *self, - struct frame_info *next_frame) -{ - const struct trad_frame *trad_frame = self->sniffer_data->trad_frame; - gdb_assert (trad_frame->sniffer != NULL); - if (trad_frame->sniffer (trad_frame, next_frame)) - return self->sniffer_data->frame_base; - else - return NULL; -} - -#if 0 -void -trad_frame_append (struct gdbarch *gdbarch, - const struct trad_frame *trad_frame) -{ - struct frame_data *data; - struct frame_unwind *unwind; - struct frame_base *base; - struct frame_base_sniffer *base_sniffer; - - data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_data); - unwind = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_unwind); - - base = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base); - base_sniffer = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_sniffer); - - data->frame_unwind = unwind; - data->frame_base = base; - data->trad_frame = trad_frame; - - unwind->type = trad_frame->type; - unwind->this_id = trad_frame_this_id; - unwind->prev_register = trad_frame_prev_register; - unwind->unwind_data = data; - unwind->sniffer = trad_frame_sniffer; - - frame_unwind_append (gdbarch, unwind); - - base->base_data = data; - base->unwind = unwind; - base->this_base = trad_frame_base; - base->this_locals = trad_frame_base; - base->this_args = trad_frame_base; - - base_sniffer->sniffer = trad_frame_base_sniffer; - base_sniffer->sniffer_data = data; - - frame_base_sniffer_append (gdbarch, base_sniffer); -} -#endif diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h index 6af0df3..0fe1a5d 100644 --- a/gdb/trad-frame.h +++ b/gdb/trad-frame.h @@ -1,6 +1,6 @@ /* Traditional frame unwind support, for GDB the GNU Debugger. - Copyright 2003, 2004 Free Software Foundation, Inc. + Copyright 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -22,10 +22,18 @@ #ifndef TRAD_FRAME_H #define TRAD_FRAME_H +#include "frame.h" /* For "struct frame_id". */ + struct frame_info; -struct trad_frame; -#include "frame.h" /* For frame_id. */ +struct trad_frame_cache +{ + CORE_ADDR this_base; + struct trad_frame_saved_reg *prev_regs; + struct frame_id this_id; +}; + +struct trad_frame_cache *trad_frame_cache_zalloc (struct frame_info *next_frame); /* A traditional saved regs table, indexed by REGNUM, encoding where the value of REGNUM for the previous frame can be found in this @@ -59,70 +67,33 @@ struct trad_frame_saved_reg int realreg; }; -struct trad_frame_cache -{ - struct frame_id this_id; - CORE_ADDR this_base; - struct trad_frame_saved_reg *saved_regs; -}; - -struct trad_frame_cache *trad_frame_cache_zalloc (struct frame_info *next_frame); - +/* Encode REGNUM value in the trad-frame. */ +void trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[], + int regnum, LONGEST val); -/* Encode REGNUM's value in the trad-frame. */ -void trad_frame_set_reg_value (struct trad_frame_cache *this_cache, - int regnum, LONGEST val); -void trad_frame_set_reg_addr (struct trad_frame_cache *this_cache, - int regnum, CORE_ADDR addr); -void trad_frame_set_reg_reg (struct trad_frame_cache *this_cache, - int regnum, int realreg); -void trad_frame_set_reg_unknown (struct trad_frame_cache *this_cache, - int regnum); -void trad_frame_set_this_id (struct trad_frame_cache *this_cache, - struct frame_id *this_id); -void trad_frame_set_this_base (struct trad_frame_cache *this_cache, - CORE_ADDR base); - -/* Set the offset of a register, and then update all offsets. Useful - when the offset of a register is known before its absolute - address. */ -void trad_frame_set_reg_offset (struct trad_frame_cache *this_cache, - int regnum, LONGEST addr); -void trad_frame_add_reg_addr (struct trad_frame_cache *this_cache, - int regnum, CORE_ADDR addr); +/* Mark REGNUM as unknown. */ +void trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[], + int regnum); /* Convenience functions, return non-zero if the register has been encoded as specified. */ -int trad_frame_reg_value_p (struct trad_frame_cache *this_cache, - int regnum); -int trad_frame_reg_addr_p (struct trad_frame_cache *this_cache, - int regnum); -int trad_frame_reg_reg_p (struct trad_frame_cache *this_cache, +int trad_frame_value_p (struct trad_frame_saved_reg this_saved_regs[], + int regnum); +int trad_frame_addr_p (struct trad_frame_saved_reg this_saved_regs[], + int regnum); +int trad_frame_realreg_p (struct trad_frame_saved_reg this_saved_regs[], int regnum); -typedef struct trad_frame_cache *(trad_frame_sniffer_ftype) (const struct trad_frame *self, - struct frame_info *next_frame); - -struct trad_frame -{ - enum frame_type type; - trad_frame_sniffer_ftype *sniffer; - const struct trad_frame_data *trad_data; -}; - -void trad_frame_append (struct gdbarch *gdbarch, - const struct trad_frame *trad_frame); -void trad_frame_this_id (struct trad_frame_cache *trad_cache, - struct frame_info *next_frame, - struct frame_id *this_id); +/* Return a freshly allocated (and initialized) trad_frame array. */ +struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame); -void trad_frame_prev_register (struct trad_frame_cache *trad_cache, - struct frame_info *next_frame, - int prev_regnum, - int *optimizedp, - enum lval_type * lvalp, - CORE_ADDR *addrp, - int *realnump, void *valuep); +/* Given the trad_frame info, return the location of the specified + register. */ +void trad_frame_prev_register (struct frame_info *next_frame, + struct trad_frame_saved_reg this_saved_regs[], + int regnum, int *optimizedp, + enum lval_type *lvalp, CORE_ADDR *addrp, + int *realregp, void *bufferp); #endif diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c index 096beb6..d047659 100644 --- a/gdb/tramp-frame.c +++ b/gdb/tramp-frame.c @@ -27,6 +27,7 @@ #include "objfiles.h" #include "target.h" #include "trad-frame.h" +#include "frame-base.h" struct frame_data { @@ -36,12 +37,12 @@ struct frame_data struct tramp_frame_cache { CORE_ADDR func; + const struct tramp_frame *tramp_frame; struct trad_frame_cache *trad_cache; }; static struct trad_frame_cache * -tramp_frame_cache (const struct frame_unwind *self, - struct frame_info *next_frame, +tramp_frame_cache (struct frame_info *next_frame, void **this_cache) { CORE_ADDR pc = frame_pc_unwind (next_frame); @@ -49,28 +50,26 @@ tramp_frame_cache (const struct frame_unwind *self, if (tramp_cache->trad_cache == NULL) { tramp_cache->trad_cache = trad_frame_cache_zalloc (next_frame); - self->unwind_data->tramp_frame->init (self->unwind_data->tramp_frame, - next_frame, - tramp_cache->trad_cache, - tramp_cache->func); + tramp_cache->tramp_frame->init (tramp_cache->tramp_frame, + next_frame, + tramp_cache->trad_cache, + tramp_cache->func); } return tramp_cache->trad_cache; } static void -tramp_frame_this_id (const struct frame_unwind *self, - struct frame_info *next_frame, +tramp_frame_this_id (struct frame_info *next_frame, void **this_cache, struct frame_id *this_id) { struct trad_frame_cache *trad_cache - = tramp_frame_cache (self, next_frame, this_cache); - trad_frame_this_id (trad_cache, next_frame, this_id); + = tramp_frame_cache (next_frame, this_cache); + (*this_id) = trad_cache->this_id; } static void -tramp_frame_prev_register (const struct frame_unwind *self, - struct frame_info *next_frame, +tramp_frame_prev_register (struct frame_info *next_frame, void **this_cache, int prev_regnum, int *optimizedp, @@ -79,9 +78,9 @@ tramp_frame_prev_register (const struct frame_unwind *self, int *realnump, void *valuep) { struct trad_frame_cache *trad_cache - = tramp_frame_cache (self, next_frame, this_cache); - trad_frame_prev_register (trad_cache, next_frame, prev_regnum, optimizedp, - lvalp, addrp, realnump, valuep); + = tramp_frame_cache (next_frame, this_cache); + trad_frame_prev_register (next_frame, trad_cache->prev_regs, prev_regnum, + optimizedp, lvalp, addrp, realnump, valuep); } static CORE_ADDR @@ -112,9 +111,10 @@ tramp_frame_start (CORE_ADDR pc, const struct tramp_frame *tramp) return 0; } -static void * +static int tramp_frame_sniffer (const struct frame_unwind *self, - struct frame_info *next_frame) + struct frame_info *next_frame, + void **this_cache) { const struct tramp_frame *tramp = self->unwind_data->tramp_frame; CORE_ADDR pc = frame_pc_unwind (next_frame); @@ -126,18 +126,20 @@ tramp_frame_sniffer (const struct frame_unwind *self, trampoline. */ find_pc_partial_function (pc, &name, NULL, NULL); if (name != NULL) - return NULL; + return 0; /* If the function lives in a valid section (even without a starting point) it isn't a trampoline. */ if (find_pc_section (pc) != NULL) - return NULL; + return 0; /* Finally, check that the trampoline matches at PC. */ func = tramp_frame_start (pc, tramp); if (func == 0) - return NULL; + return 0; tramp_cache = FRAME_OBSTACK_ZALLOC (struct tramp_frame_cache); tramp_cache->func = func; - return tramp_cache; + tramp_cache->tramp_frame = tramp; + (*this_cache) = tramp_cache; + return 1; } void @@ -156,6 +158,5 @@ tramp_frame_append (struct gdbarch *gdbarch, unwinder->sniffer = tramp_frame_sniffer; unwinder->this_id = tramp_frame_this_id; unwinder->prev_register = tramp_frame_prev_register; - - frame_unwind_append (gdbarch, unwinder); + frame_unwind_register_unwinder (gdbarch, unwinder); } diff --git a/gdb/tramp-frame.h b/gdb/tramp-frame.h index 03eb35b..44e266e 100644 --- a/gdb/tramp-frame.h +++ b/gdb/tramp-frame.h @@ -26,7 +26,7 @@ struct trad_frame; struct frame_info; struct trad_frame_cache; -/* A trampline consists of a small sequence of instructions placed at +/* A trampoline consists of a small sequence of instructions placed at an unspecified location in the inferior's address space. The only identifying attribute of the trampoline's address is that it does not fall inside an object file's section. @@ -34,7 +34,7 @@ struct trad_frame_cache; The only way to identify a trampoline is to perform a brute force examination of the instructions at and around the PC. - This module provides a convient interface for performing that + This module provides a convent interface for performing that operation. */ /* A trampoline descriptor. */ @@ -43,10 +43,10 @@ struct tramp_frame { /* The trampoline's entire instruction sequence. Search for this in the inferior at or around the frame's PC. It is assumed that the - PC is INSN_SIZE aligned, and that each element of TRAMP containts + PC is INSN_SIZE aligned, and that each element of TRAMP contains one INSN_SIZE instruction. It is also assumed that TRAMP[0] contains the first instruction of the trampoline and hence the - address of the instruction matching TRAMP[0] is the trampolines + address of the instruction matching TRAMP[0] is the trampoline's "func" address. */ int insn_size; ULONGEST insn[8]; diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 2b6faa3..800d72a 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -507,6 +507,7 @@ init_content_element (struct tui_win_element * element, enum tui_win_type type) element->which_element.data.item_no = UNDEFINED_ITEM; element->which_element.data.value = NULL; element->which_element.data.highlight = FALSE; + element->which_element.data.content = (char*) NULL; break; case LOCATOR_WIN: element->which_element.locator.file_name[0] = @@ -548,6 +549,7 @@ init_win_info (struct tui_win_info * win_info) TUI_UNDEFINED_REGS; win_info->detail.data_display_info.regs_column_count = 1; win_info->detail.data_display_info.display_regs = FALSE; + win_info->detail.data_display_info.current_group = 0; break; case CMD_WIN: win_info->detail.command_info.cur_line = 0; @@ -904,6 +906,7 @@ free_content_elements (tui_win_content content, int content_size, enum tui_win_t if (element->which_element.data.type != TUI_REGISTER) xfree ((void *)element->which_element.data.name); xfree (element->which_element.data.value); + xfree (element->which_element.data.content); xfree (element); break; case CMD_WIN: diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index dd8c230..02bebb4 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -180,6 +180,7 @@ struct tui_data_element enum tui_data_type type; void *value; int highlight; + char *content; }; @@ -248,6 +249,7 @@ struct tui_data_info enum tui_register_display_type regs_display_type; int regs_column_count; int display_regs; /* Should regs be displayed at all? */ + struct reggroup *current_group; }; diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 95ed77e..f2d4412 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -248,10 +248,7 @@ tui_set_layout (enum tui_layout_type layout_type, } if (regs_populate) { - layout_def->regs_display_type = - (regs_display_type == TUI_UNDEFINED_REGS ? - TUI_GENERAL_REGS : regs_display_type); - tui_show_registers (layout_def->regs_display_type); + tui_show_registers (TUI_DATA_WIN->detail.data_display_info.current_group); } } } diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 3813db0..c0eab97 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -38,59 +38,27 @@ #include "tui/tui-windata.h" #include "tui/tui-wingeneral.h" #include "tui/tui-file.h" +#include "reggroups.h" #include "gdb_curses.h" -/***************************************** -** LOCAL DEFINITIONS ** -******************************************/ -#define DOUBLE_FLOAT_LABEL_WIDTH 6 -#define DOUBLE_FLOAT_LABEL_FMT "%6.6s: " -#define DOUBLE_FLOAT_VALUE_WIDTH 30 /*min of 16 but may be in sci notation */ - -#define SINGLE_FLOAT_LABEL_WIDTH 6 -#define SINGLE_FLOAT_LABEL_FMT "%6.6s: " -#define SINGLE_FLOAT_VALUE_WIDTH 25 /* min of 8 but may be in sci notation */ - -#define SINGLE_LABEL_WIDTH 16 -#define SINGLE_LABEL_FMT "%10.10s: " -#define SINGLE_VALUE_WIDTH 20 /* minimum of 8 but may be in sci notation */ - -/* In the code HP gave Cygnus, this was actually a function call to a - PA-specific function, which was supposed to determine whether the - target was a 64-bit or 32-bit processor. However, the 64-bit - support wasn't complete, so we didn't merge that in, so we leave - this here as a stub. */ -#define IS_64BIT 0 /***************************************** -** STATIC DATA ** +** STATIC LOCAL FUNCTIONS FORWARD DECLS ** ******************************************/ +static void +tui_display_register (struct tui_data_element *data, + struct tui_gen_win_info *win_info); +static enum tui_status +tui_show_register_group (struct gdbarch *gdbarch, struct reggroup *group, + struct frame_info *frame, int refresh_values_only); -/***************************************** -** STATIC LOCAL FUNCTIONS FORWARD DECLS ** -******************************************/ -static enum tui_status tui_set_regs_content - (int, int, struct frame_info *, enum tui_register_display_type, int); -static const char *tui_register_name (int); -static enum tui_status tui_get_register_raw_value (int, char *, struct frame_info *); -static void tui_set_register_element - (int, struct frame_info *, struct tui_data_element *, int); -static void tui_display_register (int, struct tui_gen_win_info *, enum precision_type); +static enum tui_status +tui_get_register (struct gdbarch *gdbarch, struct frame_info *frame, + struct tui_data_element *data, int regnum, int *changedp); static void tui_register_format - (char *, int, int, struct tui_data_element *, enum precision_type); -static enum tui_status tui_set_general_regs_content (int); -static enum tui_status tui_set_special_regs_content (int); -static enum tui_status tui_set_general_and_special_regs_content (int); -static enum tui_status tui_set_float_regs_content (enum tui_register_display_type, int); -static int tui_reg_value_has_changed - (struct tui_data_element *, struct frame_info *, char *); -static void tui_show_float_command (char *, int); -static void tui_show_general_command (char *, int); -static void tui_show_special_command (char *, int); -static void tui_v_show_registers_command_support (enum tui_register_display_type); -static void _tui_toggle_float_regs_command (char *, int); + (struct gdbarch *, struct frame_info *, struct tui_data_element*, int); static void tui_scroll_regs_forward_command (char *, int); static void tui_scroll_regs_backward_command (char *, int); @@ -174,73 +142,29 @@ tui_last_reg_element_no_in_line (int line_no) return (-1); } - -/* Calculate the number of columns that should be used to display the - registers. */ -int -tui_calculate_regs_column_count (enum tui_register_display_type dpy_type) -{ - int col_count, col_width; - - if (IS_64BIT || dpy_type == TUI_DFLOAT_REGS) - col_width = DOUBLE_FLOAT_VALUE_WIDTH + DOUBLE_FLOAT_LABEL_WIDTH; - else - { - if (dpy_type == TUI_SFLOAT_REGS) - col_width = SINGLE_FLOAT_VALUE_WIDTH + SINGLE_FLOAT_LABEL_WIDTH; - else - col_width = SINGLE_VALUE_WIDTH + SINGLE_LABEL_WIDTH; - } - col_count = (TUI_DATA_WIN->generic.width - 2) / col_width; - - return col_count; -} - - -/* Show the registers int the data window as indicated by dpy_type. If - there is any other registers being displayed, then they are - cleared. What registers are displayed is dependent upon dpy_type. */ +/* Show the registers of the given group in the data window + and refresh the window. */ void -tui_show_registers (enum tui_register_display_type dpy_type) +tui_show_registers (struct reggroup *group) { enum tui_status ret = TUI_FAILURE; - int refresh_values_only = FALSE; + struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info; - /* Say that registers should be displayed, even if there is a problem */ - TUI_DATA_WIN->detail.data_display_info.display_regs = TRUE; + if (group == 0) + group = general_reggroup; - if (target_has_registers) + /* Say that registers should be displayed, even if there is a problem. */ + display_info->display_regs = TRUE; + + if (target_has_registers && target_has_stack && target_has_memory) { - refresh_values_only = - (dpy_type == TUI_DATA_WIN->detail.data_display_info.regs_display_type); - switch (dpy_type) - { - case TUI_GENERAL_REGS: - ret = tui_set_general_regs_content (refresh_values_only); - break; - case TUI_SFLOAT_REGS: - case TUI_DFLOAT_REGS: - ret = tui_set_float_regs_content (dpy_type, refresh_values_only); - break; - -/* could ifdef out */ - - case TUI_SPECIAL_REGS: - ret = tui_set_special_regs_content (refresh_values_only); - break; - case TUI_GENERAL_AND_SPECIAL_REGS: - ret = tui_set_general_and_special_regs_content (refresh_values_only); - break; - -/* end of potential if def */ - - default: - break; - } + ret = tui_show_register_group (current_gdbarch, group, + get_current_frame (), + group == display_info->current_group); } if (ret == TUI_FAILURE) { - TUI_DATA_WIN->detail.data_display_info.regs_display_type = TUI_UNDEFINED_REGS; + display_info->current_group = 0; tui_erase_data_content (NO_REGS_STRING); } else @@ -248,24 +172,122 @@ tui_show_registers (enum tui_register_display_type dpy_type) int i; /* Clear all notation of changed values */ - for (i = 0; (i < TUI_DATA_WIN->detail.data_display_info.regs_content_count); i++) + for (i = 0; i < display_info->regs_content_count; i++) { - struct tui_gen_win_info * data_item_win; + struct tui_gen_win_info *data_item_win; + struct tui_win_element *win; - data_item_win = &TUI_DATA_WIN->detail.data_display_info. - regs_content[i]->which_element.data_window; - (&((struct tui_win_element *) - data_item_win->content[0])->which_element.data)->highlight = FALSE; + data_item_win = &display_info->regs_content[i] + ->which_element.data_window; + win = (struct tui_win_element *) data_item_win->content[0]; + win->which_element.data.highlight = FALSE; } - TUI_DATA_WIN->detail.data_display_info.regs_display_type = dpy_type; + display_info->current_group = group; tui_display_all_data (); } - (tui_layout_def ())->regs_display_type = dpy_type; - - return; } +/* Set the data window to display the registers of the register group + using the given frame. Values are refreshed only when refresh_values_only + is TRUE. */ + +static enum tui_status +tui_show_register_group (struct gdbarch *gdbarch, struct reggroup *group, + struct frame_info *frame, int refresh_values_only) +{ + enum tui_status ret = TUI_FAILURE; + int nr_regs; + int allocated_here = FALSE; + int regnum, pos; + char title[80]; + struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info; + + /* Make a new title showing which group we display. */ + snprintf (title, sizeof (title) - 1, "Register group: %s", + reggroup_name (group)); + xfree (TUI_DATA_WIN->generic.title); + TUI_DATA_WIN->generic.title = xstrdup (title); + + /* See how many registers must be displayed. */ + nr_regs = 0; + for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) + { + /* Must be in the group and have a name. */ + if (gdbarch_register_reggroup_p (gdbarch, regnum, group) + && gdbarch_register_name (gdbarch, regnum) != 0) + nr_regs++; + } + + if (display_info->regs_content_count > 0 && !refresh_values_only) + { + tui_free_data_content (display_info->regs_content, + display_info->regs_content_count); + display_info->regs_content_count = 0; + } + + if (display_info->regs_content_count <= 0) + { + display_info->regs_content = tui_alloc_content (nr_regs, DATA_WIN); + allocated_here = TRUE; + refresh_values_only = FALSE; + } + + if (display_info->regs_content != (tui_win_content) NULL) + { + if (!refresh_values_only || allocated_here) + { + TUI_DATA_WIN->generic.content = (void*) NULL; + TUI_DATA_WIN->generic.content_size = 0; + tui_add_content_elements (&TUI_DATA_WIN->generic, nr_regs); + display_info->regs_content + = (tui_win_content) TUI_DATA_WIN->generic.content; + display_info->regs_content_count = nr_regs; + } + + /* Now set the register names and values */ + pos = 0; + for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++) + { + struct tui_gen_win_info *data_item_win; + struct tui_data_element *data; + const char *name; + + if (!gdbarch_register_reggroup_p (gdbarch, regnum, group)) + continue; + + name = gdbarch_register_name (gdbarch, regnum); + if (name == 0) + continue; + + data_item_win = + &display_info->regs_content[pos]->which_element.data_window; + data = + &((struct tui_win_element *) data_item_win->content[0])->which_element.data; + if (data) + { + if (!refresh_values_only) + { + data->item_no = regnum; + data->name = name; + data->highlight = FALSE; + } + if (data->value == (void*) NULL) + data->value = (void*) xmalloc (MAX_REGISTER_SIZE); + + tui_get_register (gdbarch, frame, data, regnum, 0); + } + pos++; + } + + TUI_DATA_WIN->generic.content_size = + display_info->regs_content_count + display_info->data_content_count; + ret = TUI_SUCCESS; + } + + return ret; +} + /* Function to display the registers in the content from 'start_element_no' until the end of the register content or the end of the display height. No checking for displaying past the end of @@ -273,67 +295,82 @@ tui_show_registers (enum tui_register_display_type dpy_type) void tui_display_registers_from (int start_element_no) { - if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL && - TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0) + struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info; + + if (display_info->regs_content != (tui_win_content) NULL && + display_info->regs_content_count > 0) { int i = start_element_no; int j, value_chars_wide, item_win_width, cur_y; - enum precision_type precision; - - /* Do not rename the following variable into "label_width". - Unfortunately, term.h on AiX systems defines a macro with - the same name, which causes a build failure if we use the - same name for this variable. */ - int tui_label_width; - - precision = (TUI_DATA_WIN->detail.data_display_info.regs_display_type - == TUI_DFLOAT_REGS) ? - double_precision : unspecified_precision; - if (IS_64BIT || - TUI_DATA_WIN->detail.data_display_info.regs_display_type == TUI_DFLOAT_REGS) - { - value_chars_wide = DOUBLE_FLOAT_VALUE_WIDTH; - tui_label_width = DOUBLE_FLOAT_LABEL_WIDTH; - } - else - { - if (TUI_DATA_WIN->detail.data_display_info.regs_display_type == - TUI_SFLOAT_REGS) - { - value_chars_wide = SINGLE_FLOAT_VALUE_WIDTH; - tui_label_width = SINGLE_FLOAT_LABEL_WIDTH; - } - else - { - value_chars_wide = SINGLE_VALUE_WIDTH; - tui_label_width = SINGLE_LABEL_WIDTH; - } - } - item_win_width = value_chars_wide + tui_label_width; + + int max_len = 0; + for (i = 0; i < display_info->regs_content_count; i++) + { + struct tui_data_element *data; + struct tui_gen_win_info *data_item_win; + char *p; + int len; + + data_item_win = &display_info->regs_content[i]->which_element.data_window; + data = &((struct tui_win_element *) + data_item_win->content[0])->which_element.data; + len = 0; + p = data->content; + if (p != 0) + while (*p) + { + if (*p++ == '\t') + len = 8 * ((len / 8) + 1); + else + len++; + } + + if (len > max_len) + max_len = len; + } + item_win_width = max_len + 1; + i = start_element_no; + + display_info->regs_column_count = + (TUI_DATA_WIN->generic.width - 2) / item_win_width; + if (display_info->regs_column_count == 0) + display_info->regs_column_count = 1; + item_win_width = + (TUI_DATA_WIN->generic.width - 2) / display_info->regs_column_count; + /* ** Now create each data "sub" window, and write the display into it. */ cur_y = 1; - while (i < TUI_DATA_WIN->detail.data_display_info.regs_content_count && + while (i < display_info->regs_content_count && cur_y <= TUI_DATA_WIN->generic.viewport_height) { for (j = 0; - (j < TUI_DATA_WIN->detail.data_display_info.regs_column_count && - i < TUI_DATA_WIN->detail.data_display_info.regs_content_count); j++) + (j < display_info->regs_column_count && + i < display_info->regs_content_count); j++) { struct tui_gen_win_info * data_item_win; struct tui_data_element * data_element_ptr; /* create the window if necessary */ - data_item_win = &TUI_DATA_WIN->detail.data_display_info. - regs_content[i]->which_element.data_window; + data_item_win = &display_info->regs_content[i] + ->which_element.data_window; data_element_ptr = &((struct tui_win_element *) data_item_win->content[0])->which_element.data; + if (data_item_win->handle != (WINDOW*) NULL + && (data_item_win->height != 1 + || data_item_win->width != item_win_width + || data_item_win->origin.x != (item_win_width * j) + 1 + || data_item_win->origin.y != cur_y)) + { + tui_delete_win (data_item_win->handle); + data_item_win->handle = 0; + } + if (data_item_win->handle == (WINDOW *) NULL) { data_item_win->height = 1; - data_item_win->width = (precision == double_precision) ? - item_win_width + 2 : item_win_width + 1; + data_item_win->width = item_win_width; data_item_win->origin.x = (item_win_width * j) + 1; data_item_win->origin.y = cur_y; tui_make_window (data_item_win, DONT_BOX_WINDOW); @@ -341,19 +378,14 @@ tui_display_registers_from (int start_element_no) } touchwin (data_item_win->handle); - /* - ** Get the printable representation of the register - ** and display it - */ - tui_display_register ( - data_element_ptr->item_no, data_item_win, precision); + /* Get the printable representation of the register + and display it. */ + tui_display_register (data_element_ptr, data_item_win); i++; /* next register */ } cur_y++; /* next row; */ } } - - return; } @@ -442,104 +474,147 @@ tui_check_register_values (struct frame_info *frame) { if (TUI_DATA_WIN != NULL && TUI_DATA_WIN->generic.is_visible) { - if (TUI_DATA_WIN->detail.data_display_info.regs_content_count <= 0 && - TUI_DATA_WIN->detail.data_display_info.display_regs) - tui_show_registers ((tui_layout_def ())->regs_display_type); + struct tui_data_info *display_info + = &TUI_DATA_WIN->detail.data_display_info; + + if (display_info->regs_content_count <= 0 && display_info->display_regs) + tui_show_registers (display_info->current_group); else { int i, j; - char raw_buf[MAX_REGISTER_SIZE]; - for (i = 0; - (i < TUI_DATA_WIN->detail.data_display_info.regs_content_count); i++) + for (i = 0; (i < display_info->regs_content_count); i++) { - struct tui_data_element * data_element_ptr; - struct tui_gen_win_info * data_item_win_ptr; + struct tui_data_element *data; + struct tui_gen_win_info *data_item_win_ptr; int was_hilighted; - data_item_win_ptr = &TUI_DATA_WIN->detail.data_display_info. - regs_content[i]->which_element.data_window; - data_element_ptr = &((struct tui_win_element *) - data_item_win_ptr->content[0])->which_element.data; - was_hilighted = data_element_ptr->highlight; - data_element_ptr->highlight = - tui_reg_value_has_changed (data_element_ptr, frame, &raw_buf[0]); - if (data_element_ptr->highlight) - { - int size; - - size = DEPRECATED_REGISTER_RAW_SIZE (data_element_ptr->item_no); - for (j = 0; j < size; j++) - ((char *) data_element_ptr->value)[j] = raw_buf[j]; - tui_display_register ( - data_element_ptr->item_no, - data_item_win_ptr, - ((TUI_DATA_WIN->detail.data_display_info.regs_display_type == - TUI_DFLOAT_REGS) ? - double_precision : unspecified_precision)); - } - else if (was_hilighted) + data_item_win_ptr = &display_info->regs_content[i]-> + which_element.data_window; + data = &((struct tui_win_element *) + data_item_win_ptr->content[0])->which_element.data; + was_hilighted = data->highlight; + + tui_get_register (current_gdbarch, frame, data, + data->item_no, &data->highlight); + + if (data->highlight || was_hilighted) { - data_element_ptr->highlight = FALSE; - tui_display_register ( - data_element_ptr->item_no, - data_item_win_ptr, - ((TUI_DATA_WIN->detail.data_display_info.regs_display_type == - TUI_DFLOAT_REGS) ? - double_precision : unspecified_precision)); + tui_display_register (data, data_item_win_ptr); } } } } - return; } +/* Display a register in a window. If hilite is TRUE, + then the value will be displayed in reverse video */ +static void +tui_display_register (struct tui_data_element *data, + struct tui_gen_win_info *win_info) +{ + if (win_info->handle != (WINDOW *) NULL) + { + int i; -/* - ** tui_toggle_float_regs(). - */ -void -tui_toggle_float_regs (void) + if (data->highlight) + wstandout (win_info->handle); + + wmove (win_info->handle, 0, 0); + for (i = 1; i < win_info->width; i++) + waddch (win_info->handle, ' '); + wmove (win_info->handle, 0, 0); + if (data->content) + waddstr (win_info->handle, data->content); + + if (data->highlight) + wstandend (win_info->handle); + tui_refresh_win (win_info); + } +} + +static void +tui_reg_next_command (char *arg, int from_tty) { - struct tui_layout_def * layout_def = tui_layout_def (); + if (TUI_DATA_WIN != 0) + { + struct reggroup *group + = TUI_DATA_WIN->detail.data_display_info.current_group; - if (layout_def->float_regs_display_type == TUI_SFLOAT_REGS) - layout_def->float_regs_display_type = TUI_DFLOAT_REGS; - else - layout_def->float_regs_display_type = TUI_SFLOAT_REGS; + group = reggroup_next (current_gdbarch, group); + if (group == 0) + group = reggroup_next (current_gdbarch, 0); + + if (group) + tui_show_registers (group); + } +} + +static void +tui_reg_float_command (char *arg, int from_tty) +{ + tui_show_registers (float_reggroup); +} - if (TUI_DATA_WIN != NULL && TUI_DATA_WIN->generic.is_visible && - (TUI_DATA_WIN->detail.data_display_info.regs_display_type == TUI_SFLOAT_REGS || - TUI_DATA_WIN->detail.data_display_info.regs_display_type == TUI_DFLOAT_REGS)) - tui_show_registers (layout_def->float_regs_display_type); +static void +tui_reg_general_command (char *arg, int from_tty) +{ + tui_show_registers (general_reggroup); +} - return; -} /* tui_toggle_float_regs */ +static void +tui_reg_system_command (char *arg, int from_tty) +{ + tui_show_registers (system_reggroup); +} + +static struct cmd_list_element *tuireglist; +static void +tui_reg_command (char *args, int from_tty) +{ + printf_unfiltered ("\"tui reg\" must be followed by the name of a " + "tui reg command.\n"); + help_list (tuireglist, "tui reg ", -1, gdb_stdout); +} void _initialize_tui_regs (void) { + struct cmd_list_element **tuicmd; + + tuicmd = tui_get_cmd_list (); + + add_prefix_cmd ("reg", class_tui, tui_reg_command, + "TUI commands to control the register window.", + &tuireglist, "tui reg ", 0, + tuicmd); + + add_cmd ("float", class_tui, tui_reg_float_command, + "Display only floating point registers\n", + &tuireglist); + add_cmd ("general", class_tui, tui_reg_general_command, + "Display only general registers\n", + &tuireglist); + add_cmd ("system", class_tui, tui_reg_system_command, + "Display only system registers\n", + &tuireglist); + add_cmd ("next", class_tui, tui_reg_next_command, + "Display next register group\n", + &tuireglist); + if (xdb_commands) { - add_com ("fr", class_tui, tui_show_float_command, + add_com ("fr", class_tui, tui_reg_float_command, "Display only floating point registers\n"); - add_com ("gr", class_tui, tui_show_general_command, + add_com ("gr", class_tui, tui_reg_general_command, "Display only general registers\n"); - add_com ("sr", class_tui, tui_show_special_command, + add_com ("sr", class_tui, tui_reg_system_command, "Display only special registers\n"); add_com ("+r", class_tui, tui_scroll_regs_forward_command, "Scroll the registers window forward\n"); add_com ("-r", class_tui, tui_scroll_regs_backward_command, "Scroll the register window backward\n"); - add_com ("tf", class_tui, _tui_toggle_float_regs_command, - "Toggle between single and double precision floating point registers.\n"); - add_cmd (TUI_FLOAT_REGS_NAME_LOWER, - class_tui, - _tui_toggle_float_regs_command, - "Toggle between single and double precision floating point \ -registers.\n", - &togglelist); } } @@ -548,16 +623,6 @@ registers.\n", ** STATIC LOCAL FUNCTIONS ** ******************************************/ - -/* - ** tui_register_name(). - ** Return the register name. - */ -static const char * -tui_register_name (int reg_num) -{ - return REGISTER_NAME (reg_num); -} extern int pagination_enabled; static void @@ -568,414 +633,104 @@ tui_restore_gdbout (void *ui) pagination_enabled = 1; } -/* - ** tui_register_format - ** Function to format the register name and value into a buffer, - ** suitable for printing or display - */ +/* Get the register from the frame and make a printable representation + of it in the data element. */ static void -tui_register_format (char *buf, int buf_len, int reg_num, - struct tui_data_element * data_element, - enum precision_type precision) +tui_register_format (struct gdbarch *gdbarch, struct frame_info *frame, + struct tui_data_element *data_element, int regnum) { struct ui_file *stream; struct ui_file *old_stdout; const char *name; struct cleanup *cleanups; - char *p; + char *p, *s; int pos; + struct type *type = gdbarch_register_type (gdbarch, regnum); - name = REGISTER_NAME (reg_num); + name = gdbarch_register_name (gdbarch, regnum); if (name == 0) { - strcpy (buf, ""); return; } pagination_enabled = 0; old_stdout = gdb_stdout; - stream = tui_sfileopen (buf_len); + stream = tui_sfileopen (256); gdb_stdout = stream; cleanups = make_cleanup (tui_restore_gdbout, (void*) old_stdout); - gdbarch_print_registers_info (current_gdbarch, stream, deprecated_selected_frame, - reg_num, 1); - - /* Save formatted output in the buffer. */ - p = tui_file_get_strbuf (stream); - pos = 0; - while (*p && *p == *name++ && buf_len) + if (TYPE_VECTOR (type) != 0 && 0) { - *buf++ = *p++; - buf_len--; - pos++; + char buf[MAX_REGISTER_SIZE]; + int len; + + len = register_size (current_gdbarch, regnum); + fprintf_filtered (stream, "%-14s ", name); + get_frame_register (frame, regnum, buf); + print_scalar_formatted (buf, type, 'f', len, stream); } - while (*p == ' ') - p++; - while (pos < 8 && buf_len) + else { - *buf++ = ' '; - buf_len--; - pos++; + gdbarch_print_registers_info (current_gdbarch, stream, + frame, regnum, 1); } - strncpy (buf, p, buf_len); + + /* Save formatted output in the buffer. */ + p = tui_file_get_strbuf (stream); /* Remove the possible \n. */ - p = strchr (buf, '\n'); - if (p) - *p = 0; + s = strrchr (p, '\n'); + if (s && s[1] == 0) + *s = 0; + xfree (data_element->content); + data_element->content = xstrdup (p); do_cleanups (cleanups); } - -#define NUM_GENERAL_REGS 32 -/* Set the content of the data window to consist of the general - registers. */ -static enum tui_status -tui_set_general_regs_content (int refresh_values_only) -{ - return (tui_set_regs_content (0, - NUM_GENERAL_REGS - 1, - deprecated_selected_frame, - TUI_GENERAL_REGS, - refresh_values_only)); - -} - - -#ifndef PCOQ_HEAD_REGNUM -#define START_SPECIAL_REGS 0 -#else -#define START_SPECIAL_REGS PCOQ_HEAD_REGNUM -#endif - -/* Set the content of the data window to consist of the special - registers. */ +/* Get the register value from the given frame and format it for + the display. When changep is set, check if the new register value + has changed with respect to the previous call. */ static enum tui_status -tui_set_special_regs_content (int refresh_values_only) -{ - enum tui_status ret = TUI_FAILURE; - int end_reg_num; - - end_reg_num = FP0_REGNUM - 1; - ret = tui_set_regs_content (START_SPECIAL_REGS, - end_reg_num, - deprecated_selected_frame, - TUI_SPECIAL_REGS, - refresh_values_only); - - return ret; -} - - -/* Set the content of the data window to consist of the special - registers. */ -static enum tui_status -tui_set_general_and_special_regs_content (int refresh_values_only) -{ - enum tui_status ret = TUI_FAILURE; - int end_reg_num = (-1); - - end_reg_num = FP0_REGNUM - 1; - ret = tui_set_regs_content ( - 0, end_reg_num, deprecated_selected_frame, TUI_SPECIAL_REGS, refresh_values_only); - - return ret; -} - -/* Set the content of the data window to consist of the float - registers. */ -static enum tui_status -tui_set_float_regs_content (enum tui_register_display_type dpy_type, - int refresh_values_only) -{ - enum tui_status ret = TUI_FAILURE; - int start_reg_num; - - start_reg_num = FP0_REGNUM; - ret = tui_set_regs_content (start_reg_num, - NUM_REGS - 1, - deprecated_selected_frame, - dpy_type, - refresh_values_only); - - return ret; -} - - -/* Answer TRUE if the register's value has changed, FALSE otherwise. - If TRUE, new_value is filled in with the new value. */ -static int -tui_reg_value_has_changed (struct tui_data_element * data_element, - struct frame_info *frame, char *new_value) -{ - int has_changed = FALSE; - - if (data_element->item_no != UNDEFINED_ITEM && - tui_register_name (data_element->item_no) != (char *) NULL) - { - char raw_buf[MAX_REGISTER_SIZE]; - int i; - - if (tui_get_register_raw_value (data_element->item_no, raw_buf, frame) == TUI_SUCCESS) - { - int size = DEPRECATED_REGISTER_RAW_SIZE (data_element->item_no); - - for (i = 0; (i < size && !has_changed); i++) - has_changed = (((char *) data_element->value)[i] != raw_buf[i]); - if (has_changed && new_value != (char *) NULL) - { - for (i = 0; i < size; i++) - new_value[i] = raw_buf[i]; - } - } - } - return has_changed; -} - - - -/* Get the register raw value. The raw value is returned in reg_value. */ -static enum tui_status -tui_get_register_raw_value (int reg_num, char *reg_value, struct frame_info *frame) +tui_get_register (struct gdbarch *gdbarch, struct frame_info *frame, + struct tui_data_element *data, int regnum, int *changedp) { enum tui_status ret = TUI_FAILURE; + if (changedp) + *changedp = FALSE; if (target_has_registers) { - get_frame_register (frame, reg_num, reg_value); + char buf[MAX_REGISTER_SIZE]; + + get_frame_register (frame, regnum, buf); /* NOTE: cagney/2003-03-13: This is bogus. It is refering to the register cache and not the frame which could have pulled the register value off the stack. */ - if (register_cached (reg_num) >= 0) - ret = TUI_SUCCESS; - } - return ret; -} - - - -/* Function to initialize a data element with the input and the - register value. */ -static void -tui_set_register_element (int reg_num, struct frame_info *frame, - struct tui_data_element * data_element, - int refresh_value_only) -{ - if (data_element != (struct tui_data_element *) NULL) - { - if (!refresh_value_only) - { - data_element->item_no = reg_num; - data_element->name = tui_register_name (reg_num); - data_element->highlight = FALSE; - } - if (data_element->value == NULL) - data_element->value = xmalloc (MAX_REGISTER_SIZE); - if (data_element->value != NULL) - tui_get_register_raw_value (reg_num, data_element->value, frame); - } -} - - -/* Set the content of the data window to consist of the registers - numbered from start_reg_num to end_reg_num. Note that if - refresh_values_only is TRUE, start_reg_num and end_reg_num are - ignored. */ -static enum tui_status -tui_set_regs_content (int start_reg_num, int end_reg_num, - struct frame_info *frame, - enum tui_register_display_type dpy_type, - int refresh_values_only) -{ - enum tui_status ret = TUI_FAILURE; - int num_regs = end_reg_num - start_reg_num + 1; - int allocated_here = FALSE; - - if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0 && - !refresh_values_only) - { - tui_free_data_content (TUI_DATA_WIN->detail.data_display_info.regs_content, - TUI_DATA_WIN->detail.data_display_info.regs_content_count); - TUI_DATA_WIN->detail.data_display_info.regs_content_count = 0; - } - if (TUI_DATA_WIN->detail.data_display_info.regs_content_count <= 0) - { - TUI_DATA_WIN->detail.data_display_info.regs_content = - tui_alloc_content (num_regs, DATA_WIN); - allocated_here = TRUE; - } - - if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL) - { - int i; - - if (!refresh_values_only || allocated_here) - { - TUI_DATA_WIN->generic.content = NULL; - TUI_DATA_WIN->generic.content_size = 0; - tui_add_content_elements (&TUI_DATA_WIN->generic, num_regs); - TUI_DATA_WIN->detail.data_display_info.regs_content = - (tui_win_content) TUI_DATA_WIN->generic.content; - TUI_DATA_WIN->detail.data_display_info.regs_content_count = num_regs; - } - /* - ** Now set the register names and values - */ - for (i = start_reg_num; (i <= end_reg_num); i++) - { - struct tui_gen_win_info * data_item_win; - - data_item_win = &TUI_DATA_WIN->detail.data_display_info. - regs_content[i - start_reg_num]->which_element.data_window; - tui_set_register_element ( - i, - frame, - &((struct tui_win_element *) data_item_win->content[0])->which_element.data, - !allocated_here && refresh_values_only); - } - TUI_DATA_WIN->detail.data_display_info.regs_column_count = - tui_calculate_regs_column_count (dpy_type); -#ifdef LATER - if (TUI_DATA_WIN->detail.data_display_info.data_content_count > 0) - { - /* delete all the windows? */ - /* realloc content equal to data_content_count + regs_content_count */ - /* append TUI_DATA_WIN->detail.data_display_info.data_content to content */ - } -#endif - TUI_DATA_WIN->generic.content_size = - TUI_DATA_WIN->detail.data_display_info.regs_content_count + - TUI_DATA_WIN->detail.data_display_info.data_content_count; - ret = TUI_SUCCESS; + if (register_cached (regnum) >= 0) + { + if (changedp) + { + int size = register_size (gdbarch, regnum); + char *old = (char*) data->value; + int i; + + for (i = 0; i < size; i++) + if (buf[i] != old[i]) + { + *changedp = TRUE; + old[i] = buf[i]; + } + } + + /* Reformat the data content if the value changed. */ + if (changedp == 0 || *changedp == TRUE) + tui_register_format (gdbarch, frame, data, regnum); + ret = TUI_SUCCESS; + } } - return ret; } - -/* Function to display a register in a window. If hilite is TRUE, - than the value will be displayed in reverse video. */ -static void -tui_display_register (int reg_num, - struct tui_gen_win_info * win_info, /* the data item window */ - enum precision_type precision) -{ - if (win_info->handle != (WINDOW *) NULL) - { - int i; - char buf[40]; - int value_chars_wide; - struct tui_data_element * data_element_ptr = &((tui_win_content) - win_info->content)[0]->which_element.data; - - /* Do not rename the following variable into "label_width". - Unfortunately, term.h on AiX systems defines a macro with - the same name, which causes a build failure if we use the - same name for this variable. */ - int tui_label_width; - - if (IS_64BIT || - TUI_DATA_WIN->detail.data_display_info.regs_display_type == TUI_DFLOAT_REGS) - { - value_chars_wide = DOUBLE_FLOAT_VALUE_WIDTH; - tui_label_width = DOUBLE_FLOAT_LABEL_WIDTH; - } - else - { - if (TUI_DATA_WIN->detail.data_display_info.regs_display_type == - TUI_SFLOAT_REGS) - { - value_chars_wide = SINGLE_FLOAT_VALUE_WIDTH; - tui_label_width = SINGLE_FLOAT_LABEL_WIDTH; - } - else - { - value_chars_wide = SINGLE_VALUE_WIDTH; - tui_label_width = SINGLE_LABEL_WIDTH; - } - } - - buf[0] = (char) 0; - tui_register_format (buf, - value_chars_wide + tui_label_width, - reg_num, - data_element_ptr, - precision); - - if (data_element_ptr->highlight) - wstandout (win_info->handle); - - wmove (win_info->handle, 0, 0); - for (i = 1; i < win_info->width; i++) - waddch (win_info->handle, ' '); - wmove (win_info->handle, 0, 0); - waddstr (win_info->handle, buf); - - if (data_element_ptr->highlight) - wstandend (win_info->handle); - tui_refresh_win (win_info); - } -} - - -static void -tui_v_show_registers_command_support (enum tui_register_display_type dpy_type) -{ - - if (TUI_DATA_WIN != NULL && TUI_DATA_WIN->generic.is_visible) - { /* Data window already displayed, show the registers */ - if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != dpy_type) - tui_show_registers (dpy_type); - } - else - (tui_layout_def ())->regs_display_type = dpy_type; - - return; -} - - -static void -tui_show_float_command (char *arg, int from_tty) -{ - if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->generic.is_visible || - (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS && - TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS)) - tui_v_show_registers_command_support ((tui_layout_def ())->float_regs_display_type); -} - - -static void -tui_show_general_command (char *arg, int from_tty) -{ - tui_v_show_registers_command_support (TUI_GENERAL_REGS); -} - - -static void -tui_show_special_command (char *arg, int from_tty) -{ - tui_v_show_registers_command_support (TUI_SPECIAL_REGS); -} - - -static void -_tui_toggle_float_regs_command (char *arg, int from_tty) -{ - if (TUI_DATA_WIN != NULL && TUI_DATA_WIN->generic.is_visible) - tui_toggle_float_regs (); - else - { - struct tui_layout_def * layout_def = tui_layout_def (); - - if (layout_def->float_regs_display_type == TUI_SFLOAT_REGS) - layout_def->float_regs_display_type = TUI_DFLOAT_REGS; - else - layout_def->float_regs_display_type = TUI_SFLOAT_REGS; - } -} - - static void tui_scroll_regs_forward_command (char *arg, int from_tty) { diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index c4de123..01e2fba 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -28,14 +28,12 @@ #include "tui/tui-data.h" /* For struct tui_register_display_type. */ extern void tui_check_register_values (struct frame_info *); -extern void tui_show_registers (enum tui_register_display_type); +extern void tui_show_registers (struct reggroup *group); extern void tui_display_registers_from (int); extern int tui_display_registers_from_line (int, int); extern int tui_last_regs_line_no (void); extern int tui_first_reg_element_inline (int); extern int tui_line_from_reg_element_no (int); -extern void tui_toggle_float_regs (void); -extern int tui_calculate_regs_column_count (enum tui_register_display_type); extern int tui_first_reg_element_no_inline (int lineno); #endif diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 846e0b4..1c67baa 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -290,6 +290,26 @@ show_tui_cmd (char *args, int from_tty) { } +static struct cmd_list_element *tuilist; + +static void +tui_command (char *args, int from_tty) +{ + printf_unfiltered ("\"tui\" must be followed by the name of a " + "tui command.\n"); + help_list (tuilist, "tui ", -1, gdb_stdout); +} + +struct cmd_list_element ** +tui_get_cmd_list () +{ + if (tuilist == 0) + add_prefix_cmd ("tui", class_tui, tui_command, + "Text User Interface commands.", + &tuilist, "tui ", 0, &cmdlist); + return &tuilist; +} + /* Function to initialize gdb commands, for tui window manipulation. */ void _initialize_tui_win (void) @@ -300,10 +320,6 @@ _initialize_tui_win (void) /* Define the classes of commands. They will appear in the help list in the reverse of this order. */ - add_cmd ("tui", class_tui, NULL, - "Text User Interface commands.", - &cmdlist); - add_prefix_cmd ("tui", class_tui, set_tui_cmd, "TUI configuration variables", &tui_setlist, "set tui ", @@ -602,6 +618,9 @@ tui_resize_all (void) enum tui_win_type win_type; int new_height, split_diff, cmd_split_diff, num_wins_displayed = 2; +#ifdef HAVE_RESIZE_TERM + resize_term (screenheight, screenwidth); +#endif /* turn keypad off while we resize */ if (win_with_focus != TUI_CMD_WIN) keypad (TUI_CMD_WIN->generic.handle, FALSE); @@ -680,10 +699,6 @@ tui_resize_all (void) new_height = first_win->generic.height + split_diff; make_invisible_and_set_new_height (first_win, new_height); - if (first_win == TUI_DATA_WIN && width_diff != 0) - first_win->detail.data_display_info.regs_column_count = - tui_calculate_regs_column_count ( - first_win->detail.data_display_info.regs_display_type); locator->width += width_diff; /* Change the second window's height/width */ diff --git a/gdb/tui/tui-win.h b/gdb/tui/tui-win.h index b76998c..1e9b86f 100644 --- a/gdb/tui/tui-win.h +++ b/gdb/tui/tui-win.h @@ -53,4 +53,7 @@ extern int tui_update_variables (void); /* Update gdb's knowledge of the terminal size. */ extern void tui_update_gdb_sizes (void); +/* Create or get the TUI command list. */ +struct cmd_list_element **tui_get_cmd_list (); + #endif diff --git a/gdb/version.in b/gdb/version.in index 909e279..3f6a804 100644 --- a/gdb/version.in +++ b/gdb/version.in @@ -1 +1 @@ -2004-03-09-cvs +2004-03-21-cvs diff --git a/include/ChangeLog b/include/ChangeLog index 37c6cfd..e018e9b 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2004-03-20 H.J. Lu <hongjiu.lu@intel.com> + + * bfdlink.h (bfd_link_info): Correct comments for the + unresolved_syms_in_objects field. + 2004-02-24 Ian Lance Taylor <ian@wasabisystems.com> * dyn-string.h: Update copyright date. diff --git a/include/bfdlink.h b/include/bfdlink.h index a989f64..96c9886 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -303,9 +303,9 @@ struct bfd_link_info unsigned int noexecstack: 1; /* What to do with unresolved symbols in an object file. - When producing static binaries the default is GENERATE_ERROR. - When producing dynamic binaries the default is IGNORE. The - assumption with dynamic binaries is that the reference will be + When producing executables the default is GENERATE_ERROR. + When producing shared libraries the default is IGNORE. The + assumption with shared libraries is that the reference will be resolved at load/execution time. */ enum report_method unresolved_syms_in_objects; diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 438c6d8..ebde6b6 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,9 +1,25 @@ +2004-03-16 Alan Modra <amodra@bigpond.net.au> + + * ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines. + +2004-03-12 Jakub Jelinek <jakub@redhat.com> + + * i386.h (i386_optab): Remove CpuNo64 from sysenter and sysexit. + +2004-03-12 Michal Ludvig <mludvig@suse.cz> + + * i386.h (i386_optab): Added xstore as an alias for xstorerng. + +2004-03-12 Michal Ludvig <mludvig@suse.cz> + + * i386.h (i386_optab): Added xstore/xcrypt insns. + 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com> * h8300.h (32bit ldc/stc): Add relaxing support. 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com> - + * h8300.h (BITOP): Pass MEMRELAX flag. 2004-01-09 Anil Paranjpe <anilp1@KPITCummins.com> diff --git a/include/opcode/i386.h b/include/opcode/i386.h index cb3a99a..5e3673e 100644 --- a/include/opcode/i386.h +++ b/include/opcode/i386.h @@ -1,6 +1,6 @@ /* opcode/i386.h -- Intel 80386 opcode table Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger. @@ -896,8 +896,8 @@ static const template i386_optab[] = { {"cmpxchg8b",1,0x0fc7, 1, Cpu586, NoSuf|Modrm, { LLongMem, 0, 0} }, /* Pentium II/Pentium Pro extensions. */ -{"sysenter",0, 0x0f34, X, Cpu686|CpuNo64, NoSuf, { 0, 0, 0} }, -{"sysexit", 0, 0x0f35, X, Cpu686|CpuNo64, NoSuf, { 0, 0, 0} }, +{"sysenter",0, 0x0f34, X, Cpu686, NoSuf, { 0, 0, 0} }, +{"sysexit", 0, 0x0f35, X, Cpu686, NoSuf, { 0, 0, 0} }, {"fxsave", 1, 0x0fae, 0, Cpu686, FP|Modrm, { LLongMem, 0, 0} }, {"fxrstor", 1, 0x0fae, 1, Cpu686, FP|Modrm, { LLongMem, 0, 0} }, {"rdpmc", 0, 0x0f33, X, Cpu686, NoSuf, { 0, 0, 0} }, @@ -1361,6 +1361,15 @@ static const template i386_optab[] = { {"sysret", 0, 0x0f07, X, CpuK6, lq_Suf|DefaultSize, { 0, 0, 0} }, {"swapgs", 0, 0x0f01, 0xf8, Cpu64, NoSuf|ImmExt, { 0, 0, 0} }, +/* VIA PadLock extensions. */ +{"xstorerng", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, +{"xcryptecb", 0, 0xf30fa7c8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, +{"xcryptcbc", 0, 0xf30fa7d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, +{"xcryptcfb", 0, 0xf30fa7e0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, +{"xcryptofb", 0, 0xf30fa7e8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, +/* alias for xstorerng */ +{"xstore", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} }, + /* sentinel */ {NULL, 0, 0, 0, 0, 0, { 0, 0, 0} } }; diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index 342237e..d55caa7 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -1,5 +1,5 @@ /* ppc.h -- Header file for PowerPC opcode table - Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003 + Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support @@ -151,7 +151,7 @@ struct powerpc_operand operand value into an instruction, check this field. If it is NULL, execute - i |= (op & ((1 << o->bits) - 1)) << o->shift; + i |= (op & ((1 << o->bits) - 1)) << o->shift; (i is the instruction which we are filling in, o is a pointer to this structure, and op is the opcode value; this assumes twos complement arithmetic). @@ -170,7 +170,7 @@ struct powerpc_operand extract this operand type from an instruction, check this field. If it is NULL, compute - op = ((i) >> o->shift) & ((1 << o->bits) - 1); + op = ((i) >> o->shift) & ((1 << o->bits) - 1); if ((o->flags & PPC_OPERAND_SIGNED) != 0 && (op & (1 << (o->bits - 1))) != 0) op -= 1 << o->bits; @@ -233,17 +233,20 @@ extern const struct powerpc_operand powerpc_operands[]; register names with a leading 'r'. */ #define PPC_OPERAND_GPR (040) +/* Like PPC_OPERAND_GPR, but don't print a leading 'r' for r0. */ +#define PPC_OPERAND_GPR_0 (0100) + /* This operand names a floating point register. The disassembler prints these with a leading 'f'. */ -#define PPC_OPERAND_FPR (0100) +#define PPC_OPERAND_FPR (0200) /* This operand is a relative branch displacement. The disassembler prints these symbolically if possible. */ -#define PPC_OPERAND_RELATIVE (0200) +#define PPC_OPERAND_RELATIVE (0400) /* This operand is an absolute branch address. The disassembler prints these symbolically if possible. */ -#define PPC_OPERAND_ABSOLUTE (0400) +#define PPC_OPERAND_ABSOLUTE (01000) /* This operand is optional, and is zero if omitted. This is used for the optional BF and L fields in the comparison instructions. The @@ -251,7 +254,7 @@ extern const struct powerpc_operand powerpc_operands[]; and the number of operands remaining for the opcode, and decide whether this operand is present or not. The disassembler should print this operand out only if it is not zero. */ -#define PPC_OPERAND_OPTIONAL (01000) +#define PPC_OPERAND_OPTIONAL (02000) /* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand is omitted, then for the next operand use this operand value plus @@ -259,24 +262,24 @@ extern const struct powerpc_operand powerpc_operands[]; hack is needed because the Power rotate instructions can take either 4 or 5 operands. The disassembler should print this operand out regardless of the PPC_OPERAND_OPTIONAL field. */ -#define PPC_OPERAND_NEXT (02000) +#define PPC_OPERAND_NEXT (04000) /* This operand should be regarded as a negative number for the purposes of overflow checking (i.e., the normal most negative number is disallowed and one more than the normal most positive number is allowed). This flag will only be set for a signed operand. */ -#define PPC_OPERAND_NEGATIVE (04000) +#define PPC_OPERAND_NEGATIVE (010000) /* This operand names a vector unit register. The disassembler prints these with a leading 'v'. */ -#define PPC_OPERAND_VR (010000) +#define PPC_OPERAND_VR (020000) /* This operand is for the DS field in a DS form instruction. */ -#define PPC_OPERAND_DS (020000) +#define PPC_OPERAND_DS (040000) /* This operand is for the DQ field in a DQ form instruction. */ -#define PPC_OPERAND_DQ (040000) +#define PPC_OPERAND_DQ (0100000) /* The POWER and PowerPC assemblers use a few macros. We keep them with the operands table for simplicity. The macro table is an diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index a3de6c2..2dce4d8 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,19 @@ +2004-03-17 Ian Lance Taylor <ian@wasabisystems.com> + + * pex-unix.c (pexecute): Use vfork instead of fork, with + appropriate changes to make this safe. + * pex-common.h (STDERR_FILE_NO): Define. + + * Makefile.in: Clean up REQUIRED_OFILES and CONFIGURED_OFILES for + an 80 column screen. Run maint-deps. + +2004-03-09 Kelley Cook <kcook@gcc.gnu.org> + + * configure.ac: Bump version to 2.59. Apply suggested autoupdates. + * acconfig.h: Delete redundant file. + * config.in: Regenerate. + * configure: Regenerate. + 2004-03-09 Hans-Peter Nilsson <hp@axis.com> * configure: Regenerate for config/accross.m4 correction. diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index bbb5c2a..78cc4bc 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -157,44 +157,46 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \ # These are always included in the library. The first four are listed # first and by compile time to optimize parallel builds. -REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./cp-demint.o ./md5.o \ - ./alloca.o ./argv.o \ - ./choose-temp.o ./concat.o \ +REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \ + ./alloca.o ./argv.o \ + ./choose-temp.o ./concat.o ./cp-demint.o \ ./dyn-string.o \ - ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o \ - ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o \ - ./hashtab.o ./hex.o \ - ./lbasename.o \ - ./lrealpath.o \ - ./make-relative-prefix.o \ - ./make-temp-file.o \ - ./objalloc.o ./obstack.o \ - ./partition.o ./physmem.o @pexecute@ \ - ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o \ + ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o \ + ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o \ + ./hashtab.o ./hex.o \ + ./lbasename.o ./lrealpath.o \ + ./make-relative-prefix.o ./make-temp-file.o \ + ./objalloc.o ./obstack.o \ + ./partition.o ./physmem.o @pexecute@ \ + ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o \ ./strsignal.o \ ./ternary.o \ - ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o + ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o \ + ./xstrerror.o # These are all the objects that configure may add to the library via # $funcs or EXTRA_OFILES. This list exists here only for "make # maint-missing" and "make check". -CONFIGURED_OFILES = ./asprintf.o ./atexit.o \ - ./basename.o ./bcmp.o ./bcopy.o ./bsearch.o ./bzero.o \ - ./calloc.o ./clock.o ./copysign.o \ +CONFIGURED_OFILES = ./asprintf.o ./atexit.o \ + ./basename.o ./bcmp.o ./bcopy.o ./bsearch.o ./bzero.o \ + ./calloc.o ./clock.o ./copysign.o \ ./_doprnt.o \ ./ffs.o \ - ./getcwd.o ./getpagesize.o \ + ./getcwd.o ./getpagesize.o \ ./index.o ./insque.o \ - ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o ./memset.o ./mkstemps.o \ - ./pex-djgpp.o ./pex-mpw.o ./pex-msdos.o ./pex-os2.o \ - ./pex-unix.o ./pex-win32.o \ + ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o \ + ./memset.o ./mkstemps.o \ + ./pex-djgpp.o ./pex-mpw.o ./pex-msdos.o ./pex-os2.o \ + ./pex-unix.o ./pex-win32.o \ ./putenv.o \ - ./random.o ./rename.o ./rindex.o \ - ./setenv.o ./sigsetmask.o ./snprintf.o ./stpcpy.o ./stpncpy.o ./strcasecmp.o \ - ./strchr.o ./strdup.o ./strncasecmp.o ./strncmp.o ./strrchr.o ./strstr.o \ - ./strtod.o ./strtol.o ./strtoul.o \ + ./random.o ./rename.o ./rindex.o \ + ./setenv.o ./sigsetmask.o ./snprintf.o ./stpcpy.o ./stpncpy.o \ + ./strcasecmp.o ./strchr.o ./strdup.o ./strncasecmp.o \ + ./strncmp.o ./strrchr.o ./strstr.o \ + ./strtod.o ./strtol.o ./strtoul.o \ ./tmpnam.o \ - ./vasprintf.o ./vfork.o ./vfprintf.o ./vprintf.o ./vsnprintf.o ./vsprintf.o \ + ./vasprintf.o ./vfork.o ./vfprintf.o ./vprintf.o ./vsnprintf.o \ + ./vsprintf.o \ ./waitpid.o # These files are installed if the library has been configured to do so. @@ -807,7 +809,8 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/random.c $(OUTPUT_OPTION) -./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h +./regex.o: $(srcdir)/regex.c config.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \ + $(INCDIR)/xregex2.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/regex.c -o pic/$@; \ else true; fi diff --git a/libiberty/acconfig.h b/libiberty/acconfig.h deleted file mode 100644 index 364cb41..0000000 --- a/libiberty/acconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Define to `unsigned long' if <sys/types.h> doesn't define. */ -#undef uintptr_t - diff --git a/libiberty/config.in b/libiberty/config.in index 8e5071a..99ee082 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -1,7 +1,4 @@ /* config.in. Generated from configure.ac by autoheader. */ -/* Define to `unsigned long' if <sys/types.h> doesn't define. */ -#undef uintptr_t - /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ #undef BYTEORDER @@ -362,9 +359,11 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus #undef inline +#endif /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t diff --git a/libiberty/configure b/libiberty/configure index 78d3013..374d11b 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.58. +# Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -902,40 +902,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -974,7 +977,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -6962,7 +6965,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7025,7 +7028,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.58, +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. @@ -7395,40 +7398,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -7803,40 +7809,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac diff --git a/libiberty/configure.ac b/libiberty/configure.ac index e8907e7..39bfb51 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -1,7 +1,8 @@ dnl Process this file with autoconf to produce a configure script -AC_PREREQ(2.57) -AC_INIT(xmalloc.c) +AC_PREREQ(2.59) +AC_INIT +AC_CONFIG_SRCDIR([xmalloc.c]) # This works around the fact that libtool configuration may change LD # for this particular configuration, but some shells, instead of @@ -433,7 +434,7 @@ if test -z "${setobjs}"; then AC_ISC_POSIX AC_REPLACE_FUNCS($funcs) libiberty_AC_FUNC_C_ALLOCA - AC_FUNC_VFORK + AC_FUNC_FORK if test $ac_cv_func_vfork_works = no; then AC_LIBOBJ([vfork]) fi @@ -449,9 +450,9 @@ if test -z "${setobjs}"; 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;], - [eval "libiberty_cv_var_$v=yes"], - [eval "libiberty_cv_var_$v=no"])]) + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[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 AC_MSG_RESULT(yes) n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -464,11 +465,11 @@ if test -z "${setobjs}"; then # special check for _system_configuration because AIX <4.3.2 do not # contain the `physmem' member. AC_MSG_CHECKING([for external symbol _system_configuration]) - AC_TRY_COMPILE([#include <sys/systemcfg.h>], - [double x = _system_configuration.physmem;], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/systemcfg.h>]], + [[double x = _system_configuration.physmem;]])], [AC_MSG_RESULT([yes]) AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, - [Define if you have the _system_configuration variable.])], + [Define if you have the _system_configuration variable.])], [AC_MSG_RESULT([no])]) AC_CHECK_FUNCS($checkfuncs) @@ -507,8 +508,9 @@ done LIBOBJS="$L" # We need multilib support, but only if configuring for the target. -AC_OUTPUT(Makefile testsuite/Makefile, -[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h +AC_CONFIG_FILES([Makefile testsuite/Makefile]) +AC_CONFIG_COMMANDS([default], + [[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h if test -n "$CONFIG_FILES"; then if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then # FIXME: We shouldn't need to set ac_file @@ -516,8 +518,8 @@ if test -n "$CONFIG_FILES"; then LD="${ORIGINAL_LD_FOR_MULTILIBS}" . ${libiberty_topdir}/config-ml.in fi -fi], -srcdir=${srcdir} +fi]], +[[srcdir=${srcdir} host=${host} target=${target} with_target_subdir=${with_target_subdir} @@ -527,4 +529,5 @@ ac_configure_args="--enable-multilib ${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" libiberty_topdir=${libiberty_topdir} -) +]]) +AC_OUTPUT diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h index da2f71e..df3c0f6 100644 --- a/libiberty/pex-common.h +++ b/libiberty/pex-common.h @@ -1,6 +1,6 @@ /* Utilities to execute a program in a subprocess (possibly linked by pipes with other subprocesses), and wait for it. Shared logic. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the libiberty library. @@ -33,6 +33,9 @@ Boston, MA 02111-1307, USA. */ /* stdout file number. */ #define STDOUT_FILE_NO 1 +/* stderr file number. */ +#define STDERR_FILE_NO 2 + /* value of `pipe': port index for reading. */ #define READ_PORT 0 diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c index 14fe71e..ddbed8f 100644 --- a/libiberty/pex-unix.c +++ b/libiberty/pex-unix.c @@ -1,7 +1,7 @@ /* Utilities to execute a program in a subprocess (possibly linked by pipes with other subprocesses), and wait for it. Generic Unix version (also used for UWIN and VMS). - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the libiberty library. @@ -44,28 +44,66 @@ extern int errno; #define waitpid(pid, status, flags) wait(status) #endif -extern int execv (); -extern int execvp (); +#ifdef vfork /* Autoconf may define this to fork for us. */ +# define VFORK_STRING "fork" +#else +# define VFORK_STRING "vfork" +#endif +#ifdef HAVE_VFORK_H +#include <vfork.h> +#endif +#ifdef VMS +#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \ + lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1) +#endif /* VMS */ + +/* Execute a program, possibly setting up pipes to programs executed + via other calls to this function. + + This version of the function uses vfork. In general vfork is + similar to setjmp/longmp, in that any variable which is modified by + the child process has an indeterminate value in the parent process. + We follow a safe approach here by not modifying any variables at + all in the child process (with the possible exception of variables + modified by xstrerror if exec fails, but this is unlikely to be + detectable). + + We work a little bit harder to avoid gcc warnings. gcc will warn + about any automatic variable which is live at the time of the + vfork, which is non-volatile, and which is either set more than + once or is an argument to the function. This warning isn't quite + right, since what we really care about is whether the variable is + live at the time of the vfork and set afterward by the child + process, but gcc only checks whether the variable is set more than + once. To avoid this warning, we ensure that any variable which is + live at the time of the vfork (i.e., used after the vfork) is set + exactly once and is not an argument, or is marked volatile. */ int -pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) +pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, + flagsarg) const char *program; char * const *argv; const char *this_pname; const char *temp_base ATTRIBUTE_UNUSED; char **errmsg_fmt, **errmsg_arg; - int flags; + int flagsarg; { - int (*func)() = (flags & PEXECUTE_SEARCH ? execvp : execv); int pid; int pdes[2]; + int out; int input_desc, output_desc; - int retries, sleep_interval; + int flags; + /* We declare these to be volatile to avoid warnings from gcc about + them being clobbered by vfork. */ + volatile int retries, sleep_interval; /* Pipe waiting from last process, to be used as input for the next one. Value is STDIN_FILE_NO if no pipe is waiting (i.e. the next command is the first of a group). */ static int last_pipe_input; + flags = flagsarg; + /* If this is the first process, initialize. */ if (flags & PEXECUTE_FIRST) last_pipe_input = STDIN_FILE_NO; @@ -82,22 +120,24 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) *errmsg_arg = NULL; return -1; } - output_desc = pdes[WRITE_PORT]; + out = pdes[WRITE_PORT]; last_pipe_input = pdes[READ_PORT]; } else { /* Last process. */ - output_desc = STDOUT_FILE_NO; + out = STDOUT_FILE_NO; last_pipe_input = STDIN_FILE_NO; } + output_desc = out; + /* Fork a subprocess; wait and retry if it fails. */ sleep_interval = 1; pid = -1; for (retries = 0; retries < 4; retries++) { - pid = fork (); + pid = vfork (); if (pid >= 0) break; sleep (sleep_interval); @@ -131,12 +171,21 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags) close (last_pipe_input); /* Exec the program. */ - (*func) (program, argv); - - fprintf (stderr, "%s: ", this_pname); - fprintf (stderr, install_error_msg, program); - fprintf (stderr, ": %s\n", xstrerror (errno)); - exit (-1); + if (flags & PEXECUTE_SEARCH) + execvp (program, argv); + else + execv (program, argv); + + /* We don't want to call fprintf after vfork. */ +#define writeerr(s) write (STDERR_FILE_NO, s, strlen (s)) + writeerr (this_pname); + writeerr (": "); + writeerr ("installation problem, cannot exec '"); + writeerr (program); + writeerr ("': "); + writeerr (xstrerror (errno)); + writeerr ("\n"); + _exit (-1); /* NOTREACHED */ return 0; diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 47790f3..947ee4f 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,66 @@ +2004-03-19 Alan Modra <amodra@bigpond.net.au> + + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + * po/POTFILES.in: Regenerate. + * po/opcodes.pot: Regenerate. + +2004-03-16 Alan Modra <amodra@bigpond.net.au> + + * ppc-dis.c (print_insn_powerpc): Don't print tabs. Handle + PPC_OPERANDS_GPR_0. + * ppc-opc.c (RA0): Define. + (RAQ, RAL, RAM, RAS, RSQ, RTQ, RSO): Use PPC_OPERAND_GPR_0. + (RAOPT): Rename from RAO. Update all uses. + (powerpc_opcodes): Use RA0 as appropriate. + +2004-03-15 Aldy Hernandez <aldyh@redhat.com> + + * ppc-opc.c (powerpc_opcodes): Add BOOKE versions of mfsprg. + +2004-03-15 Alan Modra <amodra@bigpond.net.au> + + * sparc-dis.c (print_insn_sparc): Update getword prototype. + +2004-03-12 Michal Ludvig <mludvig@suse.cz> + + * i386-dis.c (GRPPLOCK): Delete. + (grps): Delete GRPPLOCK entry. + +2004-03-12 Alan Modra <amodra@bigpond.net.au> + + * i386-dis.c (OP_M, OP_0f0e, OP_0fae, NOP_Fixup): New functions. + (M, Mp): Use OP_M. + (None, PADLOCK_SPECIAL, PADLOCK_0): Delete. + (GRPPADLCK): Define. + (dis386): Use NOP_Fixup on "nop". + (dis386_twobyte): Use GRPPADLCK on opcode 0xa7. + (twobyte_has_modrm): Set for 0xa7. + (padlock_table): Delete. Move to.. + (grps): ..here, using OP_0f07. Use OP_Ofae on lfence, mfence + and clflush. + (print_insn): Revert PADLOCK_SPECIAL code. + (OP_E): Delete sfence, lfence, mfence checks. + +2004-03-12 Jakub Jelinek <jakub@redhat.com> + + * i386-dis.c (grps): Use INVLPG_Fixup instead of OP_E for invlpg. + (INVLPG_Fixup): New function. + (PNI_Fixup): Remove ATTRIBUTE_UNUSED from sizeflag. + +2004-03-12 Michal Ludvig <mludvig@suse.cz> + + * i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines. + (dis386_twobyte): Opcode 0xa7 is PADLOCK_0. + (padlock_table): New struct with PadLock instructions. + (print_insn): Handle PADLOCK_SPECIAL. + +2004-03-12 Alan Modra <amodra@bigpond.net.au> + + * i386-dis.c (grps): Use clflush by default for 0x0fae/7. + (OP_E): Twiddle clflush to sfence here. + 2004-03-08 Nick Clifton <nickc@redhat.com> * po/de.po: Updated German translation. @@ -46,8 +109,8 @@ Adjust the bit patterns in a few comments. 2004-02-25 Aldy Hernandez <aldyh@redhat.com> - - * ppc-opc.c (powerpc_opcodes): Change mask for dcbt and dcbtst. + + * ppc-opc.c (powerpc_opcodes): Change mask for dcbt and dcbtst. 2004-02-20 Aldy Hernandez <aldyh@redhat.com> @@ -58,13 +121,13 @@ * ppc-opc.c (powerpc_opcodes): Add m*ivor35. 2004-02-20 Aldy Hernandez <aldyh@redhat.com> - - * ppc-opc.c (powerpc_opcodes): Add mfivor32, mfivor33, mfivor34, - mtivor32, mtivor33, mtivor34. + + * ppc-opc.c (powerpc_opcodes): Add mfivor32, mfivor33, mfivor34, + mtivor32, mtivor33, mtivor34. 2004-02-19 Aldy Hernandez <aldyh@redhat.com> - - * ppc-opc.c (powerpc_opcodes): Add mfmcar. + + * ppc-opc.c (powerpc_opcodes): Add mfmcar. 2004-02-10 Petko Manolov <petkan@nucleusys.com> diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4 index 92732d3..a9b0b29 100644 --- a/opcodes/aclocal.m4 +++ b/opcodes/aclocal.m4 @@ -1,4 +1,4 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p5 +dnl aclocal.m4 generated automatically by aclocal 1.4-p6 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -35,7 +35,16 @@ AC_SUBST(bfdlibdir) AC_SUBST(bfdincludedir) ]) -#serial 1 +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) @@ -63,7 +72,8 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AC_PROG_INSTALL]) +[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] @@ -79,13 +89,42 @@ AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` -AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) +# Copyright 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 +# 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 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.4-p6])]) + # # Check to make sure that the build environment is sane. # diff --git a/opcodes/config.in b/opcodes/config.in index 5caef55..1185e89 100644 --- a/opcodes/config.in +++ b/opcodes/config.in @@ -106,6 +106,12 @@ /* Define if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H diff --git a/opcodes/configure b/opcodes/configure index 4a95a9a..6cff4e7 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -57,7 +57,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -172,7 +171,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -343,11 +341,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -513,16 +506,12 @@ 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 +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 -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -561,12 +550,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:565: checking for Cygwin environment" >&5 +echo "configure:554: 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 570 "configure" +#line 559 "configure" #include "confdefs.h" int main() { @@ -577,7 +566,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -594,19 +583,19 @@ 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:598: checking for mingw32 environment" >&5 +echo "configure:587: 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 603 "configure" +#line 592 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -671,7 +660,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:675: checking host system type" >&5 +echo "configure:664: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -692,7 +681,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:696: checking target system type" >&5 +echo "configure:685: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -710,7 +699,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:714: checking build system type" >&5 +echo "configure:703: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -734,7 +723,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:738: checking for strerror in -lcposix" >&5 +echo "configure:727: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -742,7 +731,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 746 "configure" +#line 735 "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 @@ -753,7 +742,7 @@ int main() { strerror() ; return 0; } EOF -if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:746: \"$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 @@ -781,6 +770,7 @@ fi # number that BFD is using. BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` +am__api_version="1.4" # 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: @@ -793,7 +783,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${ # 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:797: checking for a BSD compatible install" >&5 +echo "configure:787: 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 @@ -846,7 +836,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:850: checking whether build environment is sane" >&5 +echo "configure:840: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -903,7 +893,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:907: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:897: 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 @@ -948,21 +938,21 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:953: checking for working aclocal" >&5 +echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 +echo "configure:943: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. -if (aclocal --version) < /dev/null > /dev/null 2>&1; then - ACLOCAL=aclocal +if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal-${am__api_version} echo "$ac_t""found" 1>&6 else - ACLOCAL="$missing_dir/missing aclocal" + ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:966: checking for working autoconf" >&5 +echo "configure:956: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -974,21 +964,21 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:979: checking for working automake" >&5 +echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 +echo "configure:969: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. -if (automake --version) < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake +if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake-${am__api_version} echo "$ac_t""found" 1>&6 else - AUTOMAKE="$missing_dir/missing automake" + AUTOMAKE="$missing_dir/missing automake-${am__api_version}" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:992: checking for working autoheader" >&5 +echo "configure:982: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1001,7 +991,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1005: checking for working makeinfo" >&5 +echo "configure:995: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1024,7 +1014,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1028: checking for $ac_word" >&5 +echo "configure:1018: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1056,7 +1046,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1060: checking for $ac_word" >&5 +echo "configure:1050: 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 @@ -1088,7 +1078,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1092: checking for $ac_word" >&5 +echo "configure:1082: 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 @@ -1194,7 +1184,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1198: checking for $ac_word" >&5 +echo "configure:1188: 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 @@ -1224,7 +1214,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1228: checking for $ac_word" >&5 +echo "configure:1218: 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 @@ -1275,7 +1265,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1279: checking for $ac_word" >&5 +echo "configure:1269: 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 @@ -1307,7 +1297,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1311: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1301: 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. @@ -1318,12 +1308,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1322 "configure" +#line 1312 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1317: \"$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 @@ -1349,12 +1339,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1343: 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:1358: checking whether we are using GNU C" >&5 +echo "configure:1348: 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 @@ -1363,7 +1353,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1367: \"$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:1357: \"$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 @@ -1382,7 +1372,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1386: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1376: 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 @@ -1425,7 +1415,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1429: checking for ld used by GCC" >&5 +echo "configure:1419: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1455,10 +1445,10 @@ echo "configure:1429: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1459: checking for GNU ld" >&5 +echo "configure:1449: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1462: checking for non-GNU ld" >&5 +echo "configure:1452: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1493,7 +1483,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1497: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1487: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1510,7 +1500,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1514: checking for $LD option to reload object files" >&5 +echo "configure:1504: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1522,7 +1512,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1526: checking for BSD-compatible nm" >&5 +echo "configure:1516: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1560,7 +1550,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1564: checking whether ln -s works" >&5 +echo "configure:1554: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1581,7 +1571,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1585: checking how to recognise dependant libraries" >&5 +echo "configure:1575: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1754,13 +1744,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1758: checking for object suffix" >&5 +echo "configure:1748: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1780,7 +1770,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1784: checking for executable suffix" >&5 +echo "configure:1774: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1790,10 +1780,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1817,7 +1807,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1821: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1811: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1879,7 +1869,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1883: checking for file" >&5 +echo "configure:1873: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1950,7 +1940,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1954: checking for $ac_word" >&5 +echo "configure:1944: 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 @@ -1982,7 +1972,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1986: checking for $ac_word" >&5 +echo "configure:1976: 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 @@ -2017,7 +2007,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2021: checking for $ac_word" >&5 +echo "configure:2011: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2049,7 +2039,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2053: checking for $ac_word" >&5 +echo "configure:2043: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2116,8 +2106,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2120 "configure"' > conftest.$ac_ext - if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2110 "configure"' > conftest.$ac_ext + if { (eval echo configure:2111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -2150,7 +2140,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2168,7 +2158,7 @@ ia64-*-hpux*) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2172: checking whether the C compiler needs -belf" >&5 +echo "configure:2162: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2181,14 +2171,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2185 "configure" +#line 2175 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2356,7 +2346,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2360: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2350: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2379,7 +2369,7 @@ fi echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6 -echo "configure:2383: checking whether to install libbfd" >&5 +echo "configure:2373: checking whether to install libbfd" >&5 # Check whether --enable-install-libbfd or --disable-install-libbfd was given. if test "${enable_install_libbfd+set}" = set; then enableval="$enable_install_libbfd" @@ -2416,7 +2406,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2420: checking for executable suffix" >&5 +echo "configure:2410: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2426,10 +2416,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2452,7 +2442,7 @@ ac_exeext=$EXEEXT # 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:2456: checking for $ac_word" >&5 +echo "configure:2446: 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 @@ -2482,7 +2472,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2486: checking for $ac_word" >&5 +echo "configure:2476: 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 @@ -2533,7 +2523,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2537: checking for $ac_word" >&5 +echo "configure:2527: 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 @@ -2565,7 +2555,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2569: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2559: 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. @@ -2576,12 +2566,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2580 "configure" +#line 2570 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2575: \"$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 @@ -2607,12 +2597,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2601: 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:2616: checking whether we are using GNU C" >&5 +echo "configure:2606: 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 @@ -2621,7 +2611,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2625: \"$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:2615: \"$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 @@ -2640,7 +2630,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2644: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2634: 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 @@ -2674,7 +2664,7 @@ fi ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2678: checking how to run the C preprocessor" >&5 +echo "configure:2668: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2689,13 +2679,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2693 "configure" +#line 2683 "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:2699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2689: \"$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 : @@ -2706,13 +2696,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2710 "configure" +#line 2700 "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:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2706: \"$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 : @@ -2723,13 +2713,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2727 "configure" +#line 2717 "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:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2723: \"$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 : @@ -2756,7 +2746,7 @@ echo "$ac_t""$CPP" 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:2760: checking for $ac_word" >&5 +echo "configure:2750: 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 @@ -2784,12 +2774,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2788: checking for ANSI C header files" >&5 +echo "configure:2778: 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 2793 "configure" +#line 2783 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2797,7 +2787,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2791: \"$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* @@ -2814,7 +2804,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2818 "configure" +#line 2808 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2832,7 +2822,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2836 "configure" +#line 2826 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2853,7 +2843,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2857 "configure" +#line 2847 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2864,7 +2854,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2888,12 +2878,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2892: checking for working const" >&5 +echo "configure:2882: 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 2897 "configure" +#line 2887 "configure" #include "confdefs.h" int main() { @@ -2942,7 +2932,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2963,21 +2953,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2967: checking for inline" >&5 +echo "configure:2957: 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 2974 "configure" +#line 2964 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3003,12 +2993,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3007: checking for off_t" >&5 +echo "configure:2997: 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 3012 "configure" +#line 3002 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3036,12 +3026,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3040: checking for size_t" >&5 +echo "configure:3030: 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 3045 "configure" +#line 3035 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3071,19 +3061,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3075: checking for working alloca.h" >&5 +echo "configure:3065: 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 3080 "configure" +#line 3070 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3077: \"$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 @@ -3104,12 +3094,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3108: checking for alloca" >&5 +echo "configure:3098: 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 3113 "configure" +#line 3103 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3137,7 +3127,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3131: \"$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 @@ -3169,12 +3159,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3173: checking whether alloca needs Cray hooks" >&5 +echo "configure:3163: 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 3178 "configure" +#line 3168 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3199,12 +3189,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3203: checking for $ac_func" >&5 +echo "configure:3193: 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 3208 "configure" +#line 3198 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3227,7 +3217,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3221: \"$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 @@ -3254,7 +3244,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3258: checking stack direction for C alloca" >&5 +echo "configure:3248: 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 @@ -3262,7 +3252,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3266 "configure" +#line 3256 "configure" #include "confdefs.h" find_stack_direction () { @@ -3281,7 +3271,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3275: \"$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 @@ -3302,21 +3292,21 @@ EOF fi -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3310: checking for $ac_hdr" >&5 +echo "configure:3300: 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 3315 "configure" +#line 3305 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3310: \"$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* @@ -3345,12 +3335,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3349: checking for $ac_func" >&5 +echo "configure:3339: 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 3354 "configure" +#line 3344 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3373,7 +3363,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3367: \"$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 @@ -3398,7 +3388,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3402: checking for working mmap" >&5 +echo "configure:3392: 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 @@ -3406,7 +3396,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3410 "configure" +#line 3400 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3434,11 +3424,24 @@ else #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 @@ -3546,7 +3549,7 @@ main() } EOF -if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3553: \"$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 @@ -3574,17 +3577,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3578: checking for $ac_hdr" >&5 +echo "configure:3581: 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 3583 "configure" +#line 3586 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3591: \"$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* @@ -3614,12 +3617,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3618: checking for $ac_func" >&5 +echo "configure:3621: 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 3623 "configure" +#line 3626 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3642,7 +3645,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3649: \"$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 @@ -3671,12 +3674,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3675: checking for $ac_func" >&5 +echo "configure:3678: 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 3680 "configure" +#line 3683 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3699,7 +3702,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3706: \"$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 @@ -3733,19 +3736,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3737: checking for LC_MESSAGES" >&5 +echo "configure:3740: 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 3742 "configure" +#line 3745 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3752: \"$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 @@ -3766,7 +3769,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3770: checking whether NLS is requested" >&5 +echo "configure:3773: 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" @@ -3786,7 +3789,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3790: checking whether included gettext is requested" >&5 +echo "configure:3793: 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" @@ -3805,17 +3808,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3809: checking for libintl.h" >&5 +echo "configure:3812: 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 3814 "configure" +#line 3817 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3822: \"$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* @@ -3832,19 +3835,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3836: checking for gettext in libc" >&5 +echo "configure:3839: 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 3841 "configure" +#line 3844 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3851: \"$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 @@ -3860,7 +3863,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3864: checking for bindtextdomain in -lintl" >&5 +echo "configure:3867: 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 @@ -3868,7 +3871,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3872 "configure" +#line 3875 "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 @@ -3879,7 +3882,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3886: \"$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 @@ -3895,19 +3898,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3899: checking for gettext in libintl" >&5 +echo "configure:3902: 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 3904 "configure" +#line 3907 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3914: \"$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 @@ -3935,7 +3938,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3939: checking for $ac_word" >&5 +echo "configure:3942: 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 @@ -3969,12 +3972,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3973: checking for $ac_func" >&5 +echo "configure:3976: 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 3978 "configure" +#line 3981 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3997,7 +4000,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4004: \"$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 @@ -4024,7 +4027,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4028: checking for $ac_word" >&5 +echo "configure:4031: 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 @@ -4060,7 +4063,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4064: checking for $ac_word" >&5 +echo "configure:4067: 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 @@ -4092,7 +4095,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4096 "configure" +#line 4099 "configure" #include "confdefs.h" int main() { @@ -4100,7 +4103,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4132,7 +4135,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4136: checking for $ac_word" >&5 +echo "configure:4139: 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 @@ -4166,7 +4169,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4170: checking for $ac_word" >&5 +echo "configure:4173: 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 @@ -4202,7 +4205,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4206: checking for $ac_word" >&5 +echo "configure:4209: 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 @@ -4292,7 +4295,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4296: checking for catalogs to be installed" >&5 +echo "configure:4299: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4320,17 +4323,17 @@ echo "configure:4296: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4324: checking for linux/version.h" >&5 +echo "configure:4327: 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 4329 "configure" +#line 4332 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4337: \"$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* @@ -4408,7 +4411,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4412: checking for build system executable suffix" >&5 +echo "configure:4415: 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 @@ -4445,7 +4448,7 @@ fi # 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:4449: checking for a BSD compatible install" >&5 +echo "configure:4452: 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 @@ -4502,17 +4505,17 @@ for ac_hdr in string.h strings.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4506: checking for $ac_hdr" >&5 +echo "configure:4509: 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 4511 "configure" +#line 4514 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4519: \"$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* diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index f9a0a9b..a71eb0c 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1,6 +1,6 @@ /* Print i386 instructions for GDB, the GNU debugger. Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2001, 2002, 2003 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ * July 1988 * modified by John Hassey (hassey@dg-rtp.dg.com) * x86-64 support added by Jan Hubicka (jh@suse.cz) + * VIA PadLock support by Michal Ludvig (mludvig@suse.cz) */ /* @@ -90,10 +91,15 @@ static void OP_EM (int, int); static void OP_EX (int, int); static void OP_MS (int, int); static void OP_XS (int, int); +static void OP_M (int, int); +static void OP_0fae (int, int); +static void OP_0f07 (int, int); +static void NOP_Fixup (int, int); static void OP_3DNowSuffix (int, int); static void OP_SIMD_Suffix (int, int); static void SIMD_Fixup (int, int); static void PNI_Fixup (int, int); +static void INVLPG_Fixup (int, int); static void BadOp (void); struct dis_private { @@ -196,8 +202,8 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define indirEv OP_indirE, v_mode #define Ew OP_E, w_mode #define Ma OP_E, v_mode -#define M OP_E, 0 /* lea, lgdt, etc. */ -#define Mp OP_E, 0 /* 32 or 48 bit memory operand for LDS, LES etc */ +#define M OP_M, 0 /* lea, lgdt, etc. */ +#define Mp OP_M, 0 /* 32 or 48 bit memory operand for LDS, LES etc */ #define Gb OP_G, b_mode #define Gv OP_G, v_mode #define Gd OP_G, d_mode @@ -290,7 +296,6 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define EX OP_EX, v_mode #define MS OP_MS, v_mode #define XS OP_XS, v_mode -#define None OP_E, 0 #define OPSUF OP_3DNowSuffix, 0 #define OPSIMD OP_SIMD_Suffix, 0 @@ -388,6 +393,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define GRP13 NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0 #define GRP14 NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0 #define GRPAMD NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0 +#define GRPPADLCK NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0 #define PREGRP0 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0 #define PREGRP1 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0 @@ -631,8 +637,7 @@ static const struct dis386 dis386[] = { { "movQ", Sw, Ev, XX }, { "popU", Ev, XX, XX }, /* 90 */ - { "nop", XX, XX, XX }, - /* FIXME: NOP with REPz prefix is called PAUSE. */ + { "nop", NOP_Fixup, 0, XX, XX }, { "xchgS", RMeCX, eAX, XX }, { "xchgS", RMeDX, eAX, XX }, { "xchgS", RMeBX, eAX, XX }, @@ -948,7 +953,7 @@ static const struct dis386 dis386_twobyte[] = { { "shldS", Ev, Gv, Ib }, { "shldS", Ev, Gv, CL }, { "(bad)", XX, XX, XX }, - { "(bad)", XX, XX, XX }, + { GRPPADLCK }, /* a8 */ { "pushT", gs, XX, XX }, { "popT", gs, XX, XX }, @@ -1086,7 +1091,7 @@ static const unsigned char twobyte_has_modrm[256] = { /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1, /* 7f */ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */ /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */ - /* a0 */ 0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1, /* af */ + /* a0 */ 0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,1, /* af */ /* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */ /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */ /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */ @@ -1360,7 +1365,7 @@ static const struct dis386 grps[][8] = { { "smswQ", Ev, XX, XX }, { "(bad)", XX, XX, XX }, { "lmsw", Ew, XX, XX }, - { "invlpg", Ew, XX, XX }, + { "invlpg", INVLPG_Fixup, w_mode, XX, XX }, }, /* GRP8 */ { @@ -1424,10 +1429,9 @@ static const struct dis386 grps[][8] = { { "ldmxcsr", Ev, XX, XX }, { "stmxcsr", Ev, XX, XX }, { "(bad)", XX, XX, XX }, - { "lfence", None, XX, XX }, - { "mfence", None, XX, XX }, - { "sfence", None, XX, XX }, - /* FIXME: the sfence with memory operand is clflush! */ + { "lfence", OP_0fae, 0, XX, XX }, + { "mfence", OP_0fae, 0, XX, XX }, + { "clflush", OP_0fae, 0, XX, XX }, }, /* GRP14 */ { @@ -1450,6 +1454,17 @@ static const struct dis386 grps[][8] = { { "(bad)", XX, XX, XX }, { "(bad)", XX, XX, XX }, { "(bad)", XX, XX, XX }, + }, + /* GRPPADLCK */ + { + { "xstorerng", OP_0f07, 0, XX, XX }, + { "xcryptecb", OP_0f07, 0, XX, XX }, + { "xcryptcbc", OP_0f07, 0, XX, XX }, + { "(bad)", OP_0f07, 0, XX, XX }, + { "xcryptcfb", OP_0f07, 0, XX, XX }, + { "xcryptofb", OP_0f07, 0, XX, XX }, + { "(bad)", OP_0f07, 0, XX, XX }, + { "(bad)", OP_0f07, 0, XX, XX }, } }; @@ -3034,10 +3049,6 @@ OP_E (int bytemode, int sizeflag) used_prefixes |= (prefixes & PREFIX_DATA); break; case 0: - if (!(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */) - && !(codep[-2] == 0xAE && codep[-1] == 0xF0 /* mfence */) - && !(codep[-2] == 0xAE && codep[-1] == 0xe8 /* lfence */)) - BadOp (); /* bad sfence,lea,lds,les,lfs,lgs,lss modrm */ break; default: oappend (INTERNAL_DISASSEMBLER_ERROR); @@ -3940,6 +3951,55 @@ OP_XS (int bytemode, int sizeflag) BadOp (); } +static void +OP_M (int bytemode, int sizeflag) +{ + if (mod == 3) + BadOp (); /* bad lea,lds,les,lfs,lgs,lss modrm */ + else + OP_E (bytemode, sizeflag); +} + +static void +OP_0f07 (int bytemode, int sizeflag) +{ + if (mod != 3 || rm != 0) + BadOp (); + else + OP_E (bytemode, sizeflag); +} + +static void +OP_0fae (int bytemode, int sizeflag) +{ + if (mod == 3) + { + if (reg == 7) + strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence"); + + if (reg < 5 || rm != 0) + { + BadOp (); /* bad sfence, mfence, or lfence */ + return; + } + } + else if (reg != 7) + { + BadOp (); /* bad clflush */ + return; + } + + OP_E (bytemode, sizeflag); +} + +static void +NOP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) +{ + /* NOP with REPZ prefix is called PAUSE. */ + if (prefixes == PREFIX_REPZ) + strcpy (obuf, "pause"); +} + static const char *const Suffix3DNow[] = { /* 00 */ NULL, NULL, NULL, NULL, /* 04 */ NULL, NULL, NULL, NULL, @@ -4100,7 +4160,7 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED) } static void -PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) +PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag) { if (mod == 3 && reg == 1) { @@ -4125,6 +4185,21 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) } static void +INVLPG_Fixup (int bytemode, int sizeflag) +{ + if (*codep == 0xf8) + { + char *p = obuf + strlen (obuf); + + /* Override "invlpg". */ + strcpy (p - 6, "swapgs"); + codep++; + } + else + OP_E (bytemode, sizeflag); +} + +static void BadOp (void) { /* Throw away prefixes and 1st. opcode byte. */ diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in index f16a87b..333c612 100644 --- a/opcodes/po/POTFILES.in +++ b/opcodes/po/POTFILES.in @@ -18,6 +18,7 @@ d30v-dis.c d30v-opc.c disassemble.c dis-buf.c +dis-init.c dlx-dis.c fr30-asm.c fr30-desc.c diff --git a/opcodes/po/opcodes.pot b/opcodes/po/opcodes.pot index 15fdff0..9ab8790 100644 --- a/opcodes/po/opcodes.pot +++ b/opcodes/po/opcodes.pot @@ -1,12 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-07-17 14:54+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-03-19 14:59+1030\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -14,11 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: alpha-opc.c:335 +#: alpha-opc.c:330 msgid "branch operand unaligned" msgstr "" -#: alpha-opc.c:358 alpha-opc.c:380 +#: alpha-opc.c:352 alpha-opc.c:373 msgid "jump hint unaligned" msgstr "" @@ -26,21 +28,24 @@ msgstr "" msgid "Illegal limm reference in last instruction!\n" msgstr "" -#: arm-dis.c:554 +#: arm-dis.c:563 msgid "<illegal precision>" msgstr "" -#: arm-dis.c:1162 +#. XXX - should break 'option' at following delimiter. +#: arm-dis.c:1199 #, c-format msgid "Unrecognised register name set: %s\n" msgstr "" -#: arm-dis.c:1169 +#. XXX - should break 'option' at following delimiter. +#: arm-dis.c:1207 #, c-format msgid "Unrecognised disassembler option: %s\n" msgstr "" -#: arm-dis.c:1343 +#: arm-dis.c:1376 +#, c-format msgid "" "\n" "The following ARM specific disassembler options are supported for use with\n" @@ -48,10 +53,12 @@ msgid "" msgstr "" #: avr-dis.c:117 avr-dis.c:127 +#, c-format msgid "undefined" msgstr "" #: avr-dis.c:179 +#, c-format msgid "Internal disassembler error" msgstr "" @@ -60,13 +67,13 @@ msgstr "" msgid "unknown constraint `%c'" msgstr "" -#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195 -#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195 +#: cgen-asm.c:335 fr30-ibld.c:197 frv-ibld.c:197 ip2k-ibld.c:197 +#: iq2000-ibld.c:197 m32r-ibld.c:197 openrisc-ibld.c:197 xstormy16-ibld.c:197 #, c-format msgid "operand out of range (%ld not between %ld and %ld)" msgstr "" -#: cgen-asm.c:369 +#: cgen-asm.c:357 #, c-format msgid "operand out of range (%lu not between %lu and %lu)" msgstr "" @@ -87,58 +94,58 @@ msgstr "" msgid "Address 0x%x is out of bounds.\n" msgstr "" -#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325 -#: openrisc-asm.c:244 xstormy16-asm.c:284 +#: fr30-asm.c:323 frv-asm.c:967 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:335 +#: openrisc-asm.c:261 xstormy16-asm.c:284 #, c-format msgid "Unrecognized field %d while parsing.\n" msgstr "" -#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375 -#: openrisc-asm.c:294 xstormy16-asm.c:334 +#: fr30-asm.c:372 frv-asm.c:1016 ip2k-asm.c:623 iq2000-asm.c:509 +#: m32r-asm.c:384 openrisc-asm.c:310 xstormy16-asm.c:333 msgid "missing mnemonic in syntax string" msgstr "" #. We couldn't parse it. -#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812 -#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764 -#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650 -#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515 -#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434 -#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:470 -#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663 +#: fr30-asm.c:507 fr30-asm.c:511 fr30-asm.c:598 fr30-asm.c:699 frv-asm.c:1151 +#: frv-asm.c:1155 frv-asm.c:1242 frv-asm.c:1343 ip2k-asm.c:758 ip2k-asm.c:762 +#: ip2k-asm.c:849 ip2k-asm.c:950 iq2000-asm.c:644 iq2000-asm.c:648 +#: iq2000-asm.c:735 iq2000-asm.c:836 m32r-asm.c:519 m32r-asm.c:523 +#: m32r-asm.c:610 m32r-asm.c:711 openrisc-asm.c:445 openrisc-asm.c:449 +#: openrisc-asm.c:536 openrisc-asm.c:637 xstormy16-asm.c:468 +#: xstormy16-asm.c:472 xstormy16-asm.c:559 xstormy16-asm.c:660 msgid "unrecognized instruction" msgstr "" -#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558 -#: openrisc-asm.c:477 xstormy16-asm.c:517 +#: fr30-asm.c:554 frv-asm.c:1198 ip2k-asm.c:805 iq2000-asm.c:691 +#: m32r-asm.c:566 openrisc-asm.c:492 xstormy16-asm.c:515 #, c-format msgid "syntax error (expected char `%c', found `%c')" msgstr "" -#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568 -#: openrisc-asm.c:487 xstormy16-asm.c:527 +#: fr30-asm.c:564 frv-asm.c:1208 ip2k-asm.c:815 iq2000-asm.c:701 +#: m32r-asm.c:576 openrisc-asm.c:502 xstormy16-asm.c:525 #, c-format msgid "syntax error (expected char `%c', found end of instruction)" msgstr "" -#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596 -#: openrisc-asm.c:515 xstormy16-asm.c:555 +#: fr30-asm.c:592 frv-asm.c:1236 ip2k-asm.c:843 iq2000-asm.c:729 +#: m32r-asm.c:604 openrisc-asm.c:530 xstormy16-asm.c:553 msgid "junk at end of line" msgstr "" -#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838 -#: m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:662 +#: fr30-asm.c:698 frv-asm.c:1342 ip2k-asm.c:949 iq2000-asm.c:835 +#: m32r-asm.c:710 openrisc-asm.c:636 xstormy16-asm.c:659 msgid "unrecognized form of instruction" msgstr "" -#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850 -#: m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:674 +#: fr30-asm.c:710 frv-asm.c:1354 ip2k-asm.c:961 iq2000-asm.c:847 +#: m32r-asm.c:722 openrisc-asm.c:648 xstormy16-asm.c:671 #, c-format msgid "bad instruction `%.50s...'" msgstr "" -#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853 -#: m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:677 +#: fr30-asm.c:713 frv-asm.c:1357 ip2k-asm.c:964 iq2000-asm.c:850 +#: m32r-asm.c:725 openrisc-asm.c:651 xstormy16-asm.c:674 #, c-format msgid "bad instruction `%.50s'" msgstr "" @@ -149,70 +156,70 @@ msgstr "" msgid "*unknown*" msgstr "" -#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251 -#: openrisc-dis.c:138 xstormy16-dis.c:171 +#: fr30-dis.c:319 frv-dis.c:388 ip2k-dis.c:328 iq2000-dis.c:191 m32r-dis.c:262 +#: openrisc-dis.c:137 xstormy16-dis.c:170 #, c-format msgid "Unrecognized field %d while printing insn.\n" msgstr "" -#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166 -#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166 +#: fr30-ibld.c:168 frv-ibld.c:168 ip2k-ibld.c:168 iq2000-ibld.c:168 +#: m32r-ibld.c:168 openrisc-ibld.c:168 xstormy16-ibld.c:168 #, c-format msgid "operand out of range (%ld not between %ld and %lu)" msgstr "" -#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179 -#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179 +#: fr30-ibld.c:181 frv-ibld.c:181 ip2k-ibld.c:181 iq2000-ibld.c:181 +#: m32r-ibld.c:181 openrisc-ibld.c:181 xstormy16-ibld.c:181 #, c-format msgid "operand out of range (%lu not between 0 and %lu)" msgstr "" -#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713 -#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678 +#: fr30-ibld.c:732 frv-ibld.c:849 ip2k-ibld.c:609 iq2000-ibld.c:715 +#: m32r-ibld.c:667 openrisc-ibld.c:635 xstormy16-ibld.c:680 #, c-format msgid "Unrecognized field %d while building insn.\n" msgstr "" -#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890 -#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826 +#: fr30-ibld.c:939 frv-ibld.c:1159 ip2k-ibld.c:686 iq2000-ibld.c:892 +#: m32r-ibld.c:806 openrisc-ibld.c:737 xstormy16-ibld.c:828 #, c-format msgid "Unrecognized field %d while decoding insn.\n" msgstr "" -#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024 -#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939 +#: fr30-ibld.c:1088 frv-ibld.c:1431 ip2k-ibld.c:763 iq2000-ibld.c:1026 +#: m32r-ibld.c:922 openrisc-ibld.c:817 xstormy16-ibld.c:941 #, c-format msgid "Unrecognized field %d while getting int operand.\n" msgstr "" -#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138 -#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032 +#: fr30-ibld.c:1217 frv-ibld.c:1683 ip2k-ibld.c:820 iq2000-ibld.c:1140 +#: m32r-ibld.c:1018 openrisc-ibld.c:877 xstormy16-ibld.c:1034 #, c-format msgid "Unrecognized field %d while getting vma operand.\n" msgstr "" -#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261 -#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134 +#: fr30-ibld.c:1351 frv-ibld.c:1944 ip2k-ibld.c:882 iq2000-ibld.c:1263 +#: m32r-ibld.c:1122 openrisc-ibld.c:946 xstormy16-ibld.c:1136 #, c-format msgid "Unrecognized field %d while setting int operand.\n" msgstr "" -#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372 -#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224 +#: fr30-ibld.c:1473 frv-ibld.c:2193 ip2k-ibld.c:932 iq2000-ibld.c:1374 +#: m32r-ibld.c:1214 openrisc-ibld.c:1003 xstormy16-ibld.c:1226 #, c-format msgid "Unrecognized field %d while setting vma operand.\n" msgstr "" -#: frv-asm.c:365 +#: frv-asm.c:688 msgid "register number must be even" msgstr "" -#: h8300-dis.c:377 +#: h8300-dis.c:358 #, c-format msgid "Hmmmm 0x%x" msgstr "" -#: h8300-dis.c:760 +#: h8300-dis.c:741 #, c-format msgid "Don't understand 0x%x \n" msgstr "" @@ -228,7 +235,7 @@ msgstr "" msgid "%02x\t\t*unknown*" msgstr "" -#: i386-dis.c:1699 +#: i386-dis.c:1712 msgid "<internal disassembler error>" msgstr "" @@ -404,6 +411,7 @@ msgid "21-bit offset out of range" msgstr "" #: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305 +#: openrisc-asm.c:96 openrisc-asm.c:155 msgid "missing `)'" msgstr "" @@ -422,12 +430,12 @@ msgstr "" msgid "unknown\t0x%04x" msgstr "" -#: m68k-dis.c:429 +#: m68k-dis.c:432 #, c-format msgid "<internal error in opcode table: %s %s>\n" msgstr "" -#: m68k-dis.c:1007 +#: m68k-dis.c:1025 #, c-format msgid "<function code %d>" msgstr "" @@ -437,47 +445,51 @@ msgstr "" msgid "# <dis error: %08x>" msgstr "" -#: mips-dis.c:703 +#: mips-dis.c:709 msgid "# internal error, incomplete extension sequence (+)" msgstr "" -#: mips-dis.c:746 +#: mips-dis.c:768 #, c-format msgid "# internal error, undefined extension sequence (+%c)" msgstr "" -#: mips-dis.c:1004 +#: mips-dis.c:1026 #, c-format msgid "# internal error, undefined modifier(%c)" msgstr "" -#: mips-dis.c:1755 +#: mips-dis.c:1777 #, c-format msgid "# internal disassembler error, unrecognised modifier (%c)" msgstr "" -#: mips-dis.c:1767 +#: mips-dis.c:1789 +#, c-format msgid "" "\n" "The following MIPS specific disassembler options are supported for use\n" "with the -M switch (multiple options should be separated by commas):\n" msgstr "" -#: mips-dis.c:1771 +#: mips-dis.c:1793 +#, c-format msgid "" "\n" " gpr-names=ABI Print GPR names according to specified ABI.\n" " Default: based on binary being disassembled.\n" msgstr "" -#: mips-dis.c:1775 +#: mips-dis.c:1797 +#, c-format msgid "" "\n" " fpr-names=ABI Print FPR names according to specified ABI.\n" " Default: numeric.\n" msgstr "" -#: mips-dis.c:1779 +#: mips-dis.c:1801 +#, c-format msgid "" "\n" " cp0-names=ARCH Print CP0 register names according to\n" @@ -485,7 +497,8 @@ msgid "" " Default: based on binary being disassembled.\n" msgstr "" -#: mips-dis.c:1784 +#: mips-dis.c:1806 +#, c-format msgid "" "\n" " hwr-names=ARCH Print HWR names according to specified \n" @@ -493,32 +506,37 @@ msgid "" " Default: based on binary being disassembled.\n" msgstr "" -#: mips-dis.c:1789 +#: mips-dis.c:1811 +#, c-format msgid "" "\n" " reg-names=ABI Print GPR and FPR names according to\n" " specified ABI.\n" msgstr "" -#: mips-dis.c:1793 +#: mips-dis.c:1815 +#, c-format msgid "" "\n" " reg-names=ARCH Print CP0 register and HWR names according to\n" " specified architecture.\n" msgstr "" -#: mips-dis.c:1797 +#: mips-dis.c:1819 +#, c-format msgid "" "\n" " For the options above, the following values are supported for \"ABI\":\n" " " msgstr "" -#: mips-dis.c:1802 mips-dis.c:1810 mips-dis.c:1812 +#: mips-dis.c:1824 mips-dis.c:1832 mips-dis.c:1834 +#, c-format msgid "\n" msgstr "" -#: mips-dis.c:1804 +#: mips-dis.c:1826 +#, c-format msgid "" "\n" " For the options above, The following values are supported for \"ARCH\":\n" @@ -551,86 +569,87 @@ msgstr "" #. * anyway! #. #: ns32k-dis.c:631 +#, c-format msgid "$<undefined>" msgstr "" -#: ppc-opc.c:781 ppc-opc.c:809 +#: ppc-opc.c:791 ppc-opc.c:819 msgid "invalid conditional option" msgstr "" -#: ppc-opc.c:811 +#: ppc-opc.c:821 msgid "attempt to set y bit when using + or - modifier" msgstr "" -#: ppc-opc.c:840 +#: ppc-opc.c:849 msgid "offset not a multiple of 16" msgstr "" -#: ppc-opc.c:860 +#: ppc-opc.c:868 msgid "offset not a multiple of 2" msgstr "" -#: ppc-opc.c:862 +#: ppc-opc.c:870 msgid "offset greater than 62" msgstr "" -#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975 +#: ppc-opc.c:889 ppc-opc.c:934 ppc-opc.c:978 msgid "offset not a multiple of 4" msgstr "" -#: ppc-opc.c:883 +#: ppc-opc.c:891 msgid "offset greater than 124" msgstr "" -#: ppc-opc.c:902 +#: ppc-opc.c:910 msgid "offset not a multiple of 8" msgstr "" -#: ppc-opc.c:904 +#: ppc-opc.c:912 msgid "offset greater than 248" msgstr "" -#: ppc-opc.c:950 +#: ppc-opc.c:955 msgid "offset not between -2048 and 2047" msgstr "" -#: ppc-opc.c:973 +#: ppc-opc.c:976 msgid "offset not between -8192 and 8191" msgstr "" -#: ppc-opc.c:1011 +#: ppc-opc.c:1014 msgid "ignoring invalid mfcr mask" msgstr "" -#: ppc-opc.c:1059 +#: ppc-opc.c:1061 msgid "ignoring least significant bits in branch offset" msgstr "" -#: ppc-opc.c:1090 ppc-opc.c:1125 +#: ppc-opc.c:1091 ppc-opc.c:1126 msgid "illegal bitmask" msgstr "" -#: ppc-opc.c:1192 +#: ppc-opc.c:1191 msgid "value out of range" msgstr "" -#: ppc-opc.c:1262 +#: ppc-opc.c:1259 msgid "index register in load range" msgstr "" -#: ppc-opc.c:1279 +#: ppc-opc.c:1275 msgid "source and target register operands must be different" msgstr "" -#: ppc-opc.c:1294 +#: ppc-opc.c:1290 msgid "invalid register operand when updating" msgstr "" -#: ppc-opc.c:1335 +#: ppc-opc.c:1329 msgid "target register operand must be even" msgstr "" -#: ppc-opc.c:1350 +#: ppc-opc.c:1343 msgid "source register operand must be even" msgstr "" @@ -654,12 +673,12 @@ msgstr "" msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n" msgstr "" -#: v850-dis.c:221 +#: v850-dis.c:225 #, c-format msgid "unknown operand shift: %x\n" msgstr "" -#: v850-dis.c:233 +#: v850-dis.c:237 #, c-format msgid "unknown pop reg: %d\n" msgstr "" diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index 76af4e7..4d48b9d 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -1,5 +1,5 @@ /* ppc-dis.c -- Disassemble PowerPC instructions - Copyright 1994, 1995, 2000, 2001, 2002, 2003 + Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support @@ -191,9 +191,10 @@ print_insn_powerpc (bfd_vma memaddr, continue; /* The instruction is valid. */ - (*info->fprintf_func) (info->stream, "%s", opcode->name); if (opcode->operands[0] != 0) - (*info->fprintf_func) (info->stream, "\t"); + (*info->fprintf_func) (info->stream, "%-7s ", opcode->name); + else + (*info->fprintf_func) (info->stream, "%s", opcode->name); /* Now extract and print the operands. */ need_comma = 0; @@ -235,7 +236,8 @@ print_insn_powerpc (bfd_vma memaddr, } /* Print the operand as directed by the flags. */ - if ((operand->flags & PPC_OPERAND_GPR) != 0) + if ((operand->flags & PPC_OPERAND_GPR) != 0 + || ((operand->flags & PPC_OPERAND_GPR_0) != 0 && value != 0)) (*info->fprintf_func) (info->stream, "r%ld", value); else if ((operand->flags & PPC_OPERAND_FPR) != 0) (*info->fprintf_func) (info->stream, "f%ld", value); diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index 9c65ff3..36fe454 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -1,5 +1,5 @@ /* ppc-opc.c -- PowerPC opcode list - Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003 + Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support @@ -362,34 +362,38 @@ const struct powerpc_operand powerpc_operands[] = #define RA_MASK (0x1f << 16) { 5, 16, 0, 0, PPC_OPERAND_GPR }, - /* The RA field in the DQ form lq instruction, which has special + /* As above, but 0 in the RA field means zero, not r0. */ +#define RA0 RA + 1 + { 5, 16, 0, 0, PPC_OPERAND_GPR_0 }, + + /* The RA field in the DQ form lq instruction, which has special value restrictions. */ -#define RAQ RA + 1 - { 5, 16, insert_raq, 0, PPC_OPERAND_GPR }, +#define RAQ RA0 + 1 + { 5, 16, insert_raq, 0, PPC_OPERAND_GPR_0 }, /* The RA field in a D or X form instruction which is an updating load, which means that the RA field may not be zero and may not equal the RT field. */ #define RAL RAQ + 1 - { 5, 16, insert_ral, 0, PPC_OPERAND_GPR }, + { 5, 16, insert_ral, 0, PPC_OPERAND_GPR_0 }, /* The RA field in an lmw instruction, which has special value restrictions. */ #define RAM RAL + 1 - { 5, 16, insert_ram, 0, PPC_OPERAND_GPR }, + { 5, 16, insert_ram, 0, PPC_OPERAND_GPR_0 }, /* The RA field in a D or X form instruction which is an updating store or an updating floating point load, which means that the RA field may not be zero. */ #define RAS RAM + 1 - { 5, 16, insert_ras, 0, PPC_OPERAND_GPR }, + { 5, 16, insert_ras, 0, PPC_OPERAND_GPR_0 }, /* The RA field of the tlbwe instruction, which is optional. */ -#define RAO RAS + 1 - { 5, 16, 0, 0, PPC_OPERAND_GPR|PPC_OPERAND_OPTIONAL }, +#define RAOPT RAS + 1 + { 5, 16, 0, 0, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL }, /* The RB field in an X, XO, M, or MDS form instruction. */ -#define RB RAO + 1 +#define RB RAOPT + 1 #define RB_MASK (0x1f << 11) { 5, 11, 0, 0, PPC_OPERAND_GPR }, @@ -407,19 +411,19 @@ const struct powerpc_operand powerpc_operands[] = #define RT_MASK (0x1f << 21) { 5, 21, 0, 0, PPC_OPERAND_GPR }, - /* The RS field of the DS form stq instruction, which has special + /* The RS field of the DS form stq instruction, which has special value restrictions. */ #define RSQ RS + 1 - { 5, 21, insert_rsq, 0, PPC_OPERAND_GPR }, + { 5, 21, insert_rsq, 0, PPC_OPERAND_GPR_0 }, /* The RT field of the DQ form lq instruction, which has special value restrictions. */ #define RTQ RSQ + 1 - { 5, 21, insert_rtq, 0, PPC_OPERAND_GPR }, + { 5, 21, insert_rtq, 0, PPC_OPERAND_GPR_0 }, /* The RS field of the tlbwe instruction, which is optional. */ #define RSO RTQ + 1 - { 5, 21, 0, 0, PPC_OPERAND_GPR|PPC_OPERAND_OPTIONAL }, + { 5, 21, 0, 0, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL }, /* The SH field in an X or M form instruction. */ #define SH RSO + 1 @@ -1256,7 +1260,7 @@ insert_ram (unsigned long insn, return insn | ((value & 0x1f) << 16); } -/* The RA field in the DQ form lq instruction, which has special +/* The RA field in the DQ form lq instruction, which has special value restrictions. */ static unsigned long @@ -1326,7 +1330,7 @@ insert_rtq (unsigned long insn, return insn | ((value & 0x1f) << 21); } -/* The RS field of the DS form stq instruction, which has special +/* The RS field of the DS form stq instruction, which has special value restrictions. */ static unsigned long @@ -1478,11 +1482,11 @@ extract_tbr (unsigned long insn, /* An Context form instruction. */ #define CTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7)) -#define CTX_MASK CTX(0x3f, 0x7) +#define CTX_MASK CTX(0x3f, 0x7) /* An User Context form instruction. */ #define UCTX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x1f)) -#define UCTX_MASK UCTX(0x3f, 0x1f) +#define UCTX_MASK UCTX(0x3f, 0x1f) /* The main opcode mask with the RA field clear. */ #define DRA_MASK (OP_MASK | RA_MASK) @@ -2373,16 +2377,16 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "li", OP(14), DRA_MASK, PPCCOM, { RT, SI } }, { "lil", OP(14), DRA_MASK, PWRCOM, { RT, SI } }, -{ "addi", OP(14), OP_MASK, PPCCOM, { RT, RA, SI } }, -{ "cal", OP(14), OP_MASK, PWRCOM, { RT, D, RA } }, -{ "subi", OP(14), OP_MASK, PPCCOM, { RT, RA, NSI } }, -{ "la", OP(14), OP_MASK, PPCCOM, { RT, D, RA } }, +{ "addi", OP(14), OP_MASK, PPCCOM, { RT, RA0, SI } }, +{ "cal", OP(14), OP_MASK, PWRCOM, { RT, D, RA0 } }, +{ "subi", OP(14), OP_MASK, PPCCOM, { RT, RA0, NSI } }, +{ "la", OP(14), OP_MASK, PPCCOM, { RT, D, RA0 } }, { "lis", OP(15), DRA_MASK, PPCCOM, { RT, SISIGNOPT } }, { "liu", OP(15), DRA_MASK, PWRCOM, { RT, SISIGNOPT } }, -{ "addis", OP(15), OP_MASK, PPCCOM, { RT,RA,SISIGNOPT } }, -{ "cau", OP(15), OP_MASK, PWRCOM, { RT,RA,SISIGNOPT } }, -{ "subis", OP(15), OP_MASK, PPCCOM, { RT, RA, NSI } }, +{ "addis", OP(15), OP_MASK, PPCCOM, { RT,RA0,SISIGNOPT } }, +{ "cau", OP(15), OP_MASK, PWRCOM, { RT,RA0,SISIGNOPT } }, +{ "subis", OP(15), OP_MASK, PPCCOM, { RT, RA0, NSI } }, { "bdnz-", BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM, { BDM } }, { "bdnz+", BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM, { BDP } }, @@ -3215,14 +3219,14 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfcr", X(31,19), XRARB_MASK, NOPOWER4, { RT } }, { "mfcr", X(31,19), XFXFXM_MASK, POWER4, { RT, FXM4 } }, -{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA, RB } }, +{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA0, RB } }, -{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA, RB } }, +{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA0, RB } }, { "icbt", X(31,22), X_MASK, BOOKE, { CT, RA, RB } }, { "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } }, -{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA, RB } }, +{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA0, RB } }, { "lx", X(31,23), X_MASK, PWRCOM, { RT, RA, RB } }, { "slw", XRC(31,24,0), X_MASK, PPCCOM, { RA, RS, RB } }, @@ -3246,7 +3250,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "icbte", X(31,30), X_MASK, BOOKE64, { CT, RA, RB } }, -{ "lwzxe", X(31,31), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lwzxe", X(31,31), X_MASK, BOOKE64, { RT, RA0, RB } }, { "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } }, { "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } }, @@ -3308,15 +3312,15 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfmsr", X(31,83), XRARB_MASK, COM, { RT } }, -{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA, RB } }, +{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA0, RB } }, { "dcbf", X(31,86), XRT_MASK, PPC, { RA, RB } }, -{ "lbzx", X(31,87), X_MASK, COM, { RT, RA, RB } }, +{ "lbzx", X(31,87), X_MASK, COM, { RT, RA0, RB } }, { "dcbfe", X(31,94), XRT_MASK, BOOKE64, { RA, RB } }, -{ "lbzxe", X(31,95), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lbzxe", X(31,95), X_MASK, BOOKE64, { RT, RA0, RB } }, { "neg", XO(31,104,0,0), XORB_MASK, COM, { RT, RA } }, { "neg.", XO(31,104,0,1), XORB_MASK, COM, { RT, RA } }, @@ -3339,7 +3343,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "not.", XRC(31,124,1), X_MASK, COM, { RA, RS, RBS } }, { "nor.", XRC(31,124,1), X_MASK, COM, { RA, RS, RB } }, -{ "lwarxe", X(31,126), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lwarxe", X(31,126), X_MASK, BOOKE64, { RT, RA0, RB } }, { "lbzuxe", X(31,127), X_MASK, BOOKE64, { RT, RAL, RB } }, @@ -3372,16 +3376,16 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mtmsr", X(31,146), XRARB_MASK, COM, { RS } }, -{ "stdx", X(31,149), X_MASK, PPC64, { RS, RA, RB } }, +{ "stdx", X(31,149), X_MASK, PPC64, { RS, RA0, RB } }, -{ "stwcx.", XRC(31,150,1), X_MASK, PPC, { RS, RA, RB } }, +{ "stwcx.", XRC(31,150,1), X_MASK, PPC, { RS, RA0, RB } }, -{ "stwx", X(31,151), X_MASK, PPCCOM, { RS, RA, RB } }, +{ "stwx", X(31,151), X_MASK, PPCCOM, { RS, RA0, RB } }, { "stx", X(31,151), X_MASK, PWRCOM, { RS, RA, RB } }, -{ "stwcxe.", XRC(31,158,1), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "stwcxe.", XRC(31,158,1), X_MASK, BOOKE64, { RS, RA0, RB } }, -{ "stwxe", X(31,159), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "stwxe", X(31,159), X_MASK, BOOKE64, { RS, RA0, RB } }, { "slq", XRC(31,152,0), X_MASK, M601, { RA, RS, RB } }, { "slq.", XRC(31,152,1), X_MASK, M601, { RA, RS, RB } }, @@ -3399,7 +3403,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "stdux", X(31,181), X_MASK, PPC64, { RS, RAS, RB } }, { "stwux", X(31,183), X_MASK, PPCCOM, { RS, RAS, RB } }, -{ "stux", X(31,183), X_MASK, PWRCOM, { RS, RA, RB } }, +{ "stux", X(31,183), X_MASK, PWRCOM, { RS, RA0, RB } }, { "sliq", XRC(31,184,0), X_MASK, M601, { RA, RS, SH } }, { "sliq.", XRC(31,184,1), X_MASK, M601, { RA, RS, SH } }, @@ -3426,9 +3430,9 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mtsr", X(31,210), XRB_MASK|(1<<20), COM32, { SR, RS } }, -{ "stdcx.", XRC(31,214,1), X_MASK, PPC64, { RS, RA, RB } }, +{ "stdcx.", XRC(31,214,1), X_MASK, PPC64, { RS, RA0, RB } }, -{ "stbx", X(31,215), X_MASK, COM, { RS, RA, RB } }, +{ "stbx", X(31,215), X_MASK, COM, { RS, RA0, RB } }, { "sllq", XRC(31,216,0), X_MASK, M601, { RA, RS, RB } }, { "sllq.", XRC(31,216,1), X_MASK, M601, { RA, RS, RB } }, @@ -3436,7 +3440,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "sleq", XRC(31,217,0), X_MASK, M601, { RA, RS, RB } }, { "sleq.", XRC(31,217,1), X_MASK, M601, { RA, RS, RB } }, -{ "stbxe", X(31,223), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "stbxe", X(31,223), X_MASK, BOOKE64, { RS, RA0, RB } }, { "icblc", X(31,230), X_MASK, PPCCHLK, { CT, RA, RB }}, @@ -3512,17 +3516,17 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "dcbt", X(31,278), X_MASK, PPC, { CT, RA, RB } }, -{ "lhzx", X(31,279), X_MASK, COM, { RT, RA, RB } }, +{ "lhzx", X(31,279), X_MASK, COM, { RT, RA0, RB } }, { "eqv", XRC(31,284,0), X_MASK, COM, { RA, RS, RB } }, { "eqv.", XRC(31,284,1), X_MASK, COM, { RA, RS, RB } }, { "dcbte", X(31,286), X_MASK, BOOKE64, { CT, RA, RB } }, -{ "lhzxe", X(31,287), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lhzxe", X(31,287), X_MASK, BOOKE64, { RT, RA0, RB } }, { "tlbie", X(31,306), XRTLRA_MASK, PPC, { RB, L } }, -{ "tlbi", X(31,306), XRT_MASK, POWER, { RA, RB } }, +{ "tlbi", X(31,306), XRT_MASK, POWER, { RA0, RB } }, { "eciwx", X(31,310), X_MASK, PPC, { RT, RA, RB } }, @@ -3619,9 +3623,13 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfvrsave", XSPR(31,339,256), XSPR_MASK, PPCVEC, { RT } }, { "mfusprg0", XSPR(31,339,256), XSPR_MASK, BOOKE, { RT } }, { "mfsprg4", XSPR(31,339,260), XSPR_MASK, PPC405, { RT } }, +{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, BOOKE, { RT } }, { "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405, { RT } }, +{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, BOOKE, { RT } }, { "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405, { RT } }, +{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, BOOKE, { RT } }, { "mfsprg7", XSPR(31,339,263), XSPR_MASK, PPC405, { RT } }, +{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, BOOKE, { RT } }, { "mftb", X(31,371), X_MASK, CLASSIC, { RT, TBR } }, { "mftb", XSPR(31,339,268), XSPR_MASK, BOOKE, { RT } }, { "mftbl", XSPR(31,371,268), XSPR_MASK, CLASSIC, { RT } }, @@ -3764,14 +3772,14 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfpbu2", XSPR(31,339,1023), XSPR_MASK, PPC403, { RT } }, { "mfspr", X(31,339), X_MASK, COM, { RT, SPR } }, -{ "lwax", X(31,341), X_MASK, PPC64, { RT, RA, RB } }, +{ "lwax", X(31,341), X_MASK, PPC64, { RT, RA0, RB } }, { "dst", XDSS(31,342,0), XDSS_MASK, PPCVEC, { RA, RB, STRM } }, { "dstt", XDSS(31,342,1), XDSS_MASK, PPCVEC, { RA, RB, STRM } }, -{ "lhax", X(31,343), X_MASK, COM, { RT, RA, RB } }, +{ "lhax", X(31,343), X_MASK, COM, { RT, RA0, RB } }, -{ "lhaxe", X(31,351), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lhaxe", X(31,351), X_MASK, BOOKE64, { RT, RA0, RB } }, { "dstst", XDSS(31,374,0), XDSS_MASK, PPCVEC, { RA, RB, STRM } }, { "dststt", XDSS(31,374,1), XDSS_MASK, PPCVEC, { RA, RB, STRM } }, @@ -3810,7 +3818,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "slbmte", X(31,402), XRA_MASK, PPC64, { RS, RB } }, -{ "sthx", X(31,407), X_MASK, COM, { RS, RA, RB } }, +{ "sthx", X(31,407), X_MASK, COM, { RS, RA0, RB } }, { "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } }, @@ -3826,7 +3834,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "sradi", XS(31,413,0), XS_MASK, PPC64, { RA, RS, SH6 } }, { "sradi.", XS(31,413,1), XS_MASK, PPC64, { RA, RS, SH6 } }, -{ "sthxe", X(31,415), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "sthxe", X(31,415), X_MASK, BOOKE64, { RS, RA0, RB } }, { "slbie", X(31,434), XRTRA_MASK, PPC64, { RB } }, @@ -4094,13 +4102,13 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "clcs", X(31,531), XRB_MASK, M601, { RT, RA } }, -{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA, RB } }, +{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA0, RB } }, { "lsx", X(31,533), X_MASK, PWRCOM, { RT, RA, RB } }, -{ "lwbrx", X(31,534), X_MASK, PPCCOM, { RT, RA, RB } }, +{ "lwbrx", X(31,534), X_MASK, PPCCOM, { RT, RA0, RB } }, { "lbrx", X(31,534), X_MASK, PWRCOM, { RT, RA, RB } }, -{ "lfsx", X(31,535), X_MASK, COM, { FRT, RA, RB } }, +{ "lfsx", X(31,535), X_MASK, COM, { FRT, RA0, RB } }, { "srw", XRC(31,536,0), X_MASK, PPCCOM, { RA, RS, RB } }, { "sr", XRC(31,536,0), X_MASK, PWRCOM, { RA, RS, RB } }, @@ -4116,11 +4124,12 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "maskir", XRC(31,541,0), X_MASK, M601, { RA, RS, RB } }, { "maskir.", XRC(31,541,1), X_MASK, M601, { RA, RS, RB } }, -{ "lwbrxe", X(31,542), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lwbrxe", X(31,542), X_MASK, BOOKE64, { RT, RA0, RB } }, -{ "lfsxe", X(31,543), X_MASK, BOOKE64, { FRT, RA, RB } }, +{ "lfsxe", X(31,543), X_MASK, BOOKE64, { FRT, RA0, RB } }, { "bbelr", X(31,550), X_MASK, PPCBRLK, { 0 }}, + { "tlbsync", X(31,566), 0xffffffff, PPC, { 0 } }, { "lfsux", X(31,567), X_MASK, COM, { FRT, RAS, RB } }, @@ -4129,8 +4138,8 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfsr", X(31,595), XRB_MASK|(1<<20), COM32, { RT, SR } }, -{ "lswi", X(31,597), X_MASK, PPCCOM, { RT, RA, NB } }, -{ "lsi", X(31,597), X_MASK, PWRCOM, { RT, RA, NB } }, +{ "lswi", X(31,597), X_MASK, PPCCOM, { RT, RA0, NB } }, +{ "lsi", X(31,597), X_MASK, PWRCOM, { RT, RA0, NB } }, { "lwsync", XSYNC(31,598,1), 0xffffffff, PPC, { 0 } }, { "ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, { 0 } }, @@ -4138,9 +4147,9 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "sync", X(31,598), XSYNC_MASK, PPCCOM, { LS } }, { "dcs", X(31,598), 0xffffffff, PWRCOM, { 0 } }, -{ "lfdx", X(31,599), X_MASK, COM, { FRT, RA, RB } }, +{ "lfdx", X(31,599), X_MASK, COM, { FRT, RA0, RB } }, -{ "lfdxe", X(31,607), X_MASK, BOOKE64, { FRT, RA, RB } }, +{ "lfdxe", X(31,607), X_MASK, BOOKE64, { FRT, RA0, RB } }, { "mfsri", X(31,627), X_MASK, PWRCOM, { RT, RA, RB } }, @@ -4152,13 +4161,13 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "mfsrin", X(31,659), XRA_MASK, PPC32, { RT, RB } }, -{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA, RB } }, -{ "stsx", X(31,661), X_MASK, PWRCOM, { RS, RA, RB } }, +{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA0, RB } }, +{ "stsx", X(31,661), X_MASK, PWRCOM, { RS, RA0, RB } }, -{ "stwbrx", X(31,662), X_MASK, PPCCOM, { RS, RA, RB } }, -{ "stbrx", X(31,662), X_MASK, PWRCOM, { RS, RA, RB } }, +{ "stwbrx", X(31,662), X_MASK, PPCCOM, { RS, RA0, RB } }, +{ "stbrx", X(31,662), X_MASK, PWRCOM, { RS, RA0, RB } }, -{ "stfsx", X(31,663), X_MASK, COM, { FRS, RA, RB } }, +{ "stfsx", X(31,663), X_MASK, COM, { FRS, RA0, RB } }, { "srq", XRC(31,664,0), X_MASK, M601, { RA, RS, RB } }, { "srq.", XRC(31,664,1), X_MASK, M601, { RA, RS, RB } }, @@ -4166,9 +4175,9 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "sre", XRC(31,665,0), X_MASK, M601, { RA, RS, RB } }, { "sre.", XRC(31,665,1), X_MASK, M601, { RA, RS, RB } }, -{ "stwbrxe", X(31,670), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "stwbrxe", X(31,670), X_MASK, BOOKE64, { RS, RA0, RB } }, -{ "stfsxe", X(31,671), X_MASK, BOOKE64, { FRS, RA, RB } }, +{ "stfsxe", X(31,671), X_MASK, BOOKE64, { FRS, RA0, RB } }, { "stfsux", X(31,695), X_MASK, COM, { FRS, RAS, RB } }, @@ -4177,10 +4186,10 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "stfsuxe", X(31,703), X_MASK, BOOKE64, { FRS, RAS, RB } }, -{ "stswi", X(31,725), X_MASK, PPCCOM, { RS, RA, NB } }, -{ "stsi", X(31,725), X_MASK, PWRCOM, { RS, RA, NB } }, +{ "stswi", X(31,725), X_MASK, PPCCOM, { RS, RA0, NB } }, +{ "stsi", X(31,725), X_MASK, PWRCOM, { RS, RA0, NB } }, -{ "stfdx", X(31,727), X_MASK, COM, { FRS, RA, RB } }, +{ "stfdx", X(31,727), X_MASK, COM, { FRS, RA0, RB } }, { "srlq", XRC(31,728,0), X_MASK, M601, { RA, RS, RB } }, { "srlq.", XRC(31,728,1), X_MASK, M601, { RA, RS, RB } }, @@ -4188,7 +4197,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "sreq", XRC(31,729,0), X_MASK, M601, { RA, RS, RB } }, { "sreq.", XRC(31,729,1), X_MASK, M601, { RA, RS, RB } }, -{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA, RB } }, +{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA0, RB } }, { "dcba", X(31,758), XRT_MASK, PPC405 | BOOKE, { RA, RB } }, @@ -4204,7 +4213,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "tlbivax", X(31,786), XRT_MASK, BOOKE, { RA, RB } }, { "tlbivaxe",X(31,787), XRT_MASK, BOOKE64, { RA, RB } }, -{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA, RB } }, +{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA0, RB } }, { "sraw", XRC(31,792,0), X_MASK, PPCCOM, { RA, RS, RB } }, { "sra", XRC(31,792,0), X_MASK, PWRCOM, { RA, RS, RB } }, @@ -4214,10 +4223,10 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "srad", XRC(31,794,0), X_MASK, PPC64, { RA, RS, RB } }, { "srad.", XRC(31,794,1), X_MASK, PPC64, { RA, RS, RB } }, -{ "lhbrxe", X(31,798), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "lhbrxe", X(31,798), X_MASK, BOOKE64, { RT, RA0, RB } }, -{ "ldxe", X(31,799), X_MASK, BOOKE64, { RT, RA, RB } }, -{ "lduxe", X(31,831), X_MASK, BOOKE64, { RT, RA, RB } }, +{ "ldxe", X(31,799), X_MASK, BOOKE64, { RT, RA0, RB } }, +{ "lduxe", X(31,831), X_MASK, BOOKE64, { RT, RA0, RB } }, { "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } }, @@ -4243,7 +4252,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "slbmfee", X(31,915), XRA_MASK, PPC64, { RT, RB } }, -{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA, RB } }, +{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA0, RB } }, { "sraq", XRC(31,920,0), X_MASK, M601, { RA, RS, RB } }, { "sraq.", XRC(31,920,1), X_MASK, M601, { RA, RS, RB } }, @@ -4256,9 +4265,9 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "extsh.", XRC(31,922,1), XRB_MASK, PPCCOM, { RA, RS } }, { "exts.", XRC(31,922,1), XRB_MASK, PWRCOM, { RA, RS } }, -{ "sthbrxe", X(31,926), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "sthbrxe", X(31,926), X_MASK, BOOKE64, { RS, RA0, RB } }, -{ "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA, RB } }, +{ "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA0, RB } }, { "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } }, { "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } }, @@ -4277,12 +4286,12 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "tlbwehi", XTLB(31,978,0), XTLB_MASK, PPC403, { RT, RA } }, { "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } }, -{ "tlbwe", X(31,978), X_MASK, PPC403|BOOKE, { RSO, RAO, SHO } }, +{ "tlbwe", X(31,978), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } }, { "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } }, { "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } }, -{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA, RB } }, +{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA0, RB } }, { "extsw", XRC(31,986,0), XRB_MASK, PPC64 | BOOKE64,{ RA, RS } }, { "extsw.", XRC(31,986,1), XRB_MASK, PPC64, { RA, RS } }, @@ -4290,7 +4299,7 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "icread", X(31,998), XRT_MASK, PPC403|PPC440, { RA, RB } }, { "icbie", X(31,990), XRT_MASK, BOOKE64, { RA, RB } }, -{ "stfiwxe", X(31,991), X_MASK, BOOKE64, { FRS, RA, RB } }, +{ "stfiwxe", X(31,991), X_MASK, BOOKE64, { FRS, RA0, RB } }, { "tlbli", X(31,1010), XRTRA_MASK, PPC, { RB } }, @@ -4312,86 +4321,86 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "stvx", X(31, 231), X_MASK, PPCVEC, { VS, RA, RB } }, { "stvxl", X(31, 487), X_MASK, PPCVEC, { VS, RA, RB } }, -{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA } }, -{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA } }, +{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA0 } }, +{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA0 } }, { "lwzu", OP(33), OP_MASK, PPCCOM, { RT, D, RAL } }, -{ "lu", OP(33), OP_MASK, PWRCOM, { RT, D, RA } }, +{ "lu", OP(33), OP_MASK, PWRCOM, { RT, D, RA0 } }, -{ "lbz", OP(34), OP_MASK, COM, { RT, D, RA } }, +{ "lbz", OP(34), OP_MASK, COM, { RT, D, RA0 } }, { "lbzu", OP(35), OP_MASK, COM, { RT, D, RAL } }, -{ "stw", OP(36), OP_MASK, PPCCOM, { RS, D, RA } }, -{ "st", OP(36), OP_MASK, PWRCOM, { RS, D, RA } }, +{ "stw", OP(36), OP_MASK, PPCCOM, { RS, D, RA0 } }, +{ "st", OP(36), OP_MASK, PWRCOM, { RS, D, RA0 } }, { "stwu", OP(37), OP_MASK, PPCCOM, { RS, D, RAS } }, -{ "stu", OP(37), OP_MASK, PWRCOM, { RS, D, RA } }, +{ "stu", OP(37), OP_MASK, PWRCOM, { RS, D, RA0 } }, -{ "stb", OP(38), OP_MASK, COM, { RS, D, RA } }, +{ "stb", OP(38), OP_MASK, COM, { RS, D, RA0 } }, { "stbu", OP(39), OP_MASK, COM, { RS, D, RAS } }, -{ "lhz", OP(40), OP_MASK, COM, { RT, D, RA } }, +{ "lhz", OP(40), OP_MASK, COM, { RT, D, RA0 } }, { "lhzu", OP(41), OP_MASK, COM, { RT, D, RAL } }, -{ "lha", OP(42), OP_MASK, COM, { RT, D, RA } }, +{ "lha", OP(42), OP_MASK, COM, { RT, D, RA0 } }, { "lhau", OP(43), OP_MASK, COM, { RT, D, RAL } }, -{ "sth", OP(44), OP_MASK, COM, { RS, D, RA } }, +{ "sth", OP(44), OP_MASK, COM, { RS, D, RA0 } }, { "sthu", OP(45), OP_MASK, COM, { RS, D, RAS } }, { "lmw", OP(46), OP_MASK, PPCCOM, { RT, D, RAM } }, -{ "lm", OP(46), OP_MASK, PWRCOM, { RT, D, RA } }, +{ "lm", OP(46), OP_MASK, PWRCOM, { RT, D, RA0 } }, -{ "stmw", OP(47), OP_MASK, PPCCOM, { RS, D, RA } }, -{ "stm", OP(47), OP_MASK, PWRCOM, { RS, D, RA } }, +{ "stmw", OP(47), OP_MASK, PPCCOM, { RS, D, RA0 } }, +{ "stm", OP(47), OP_MASK, PWRCOM, { RS, D, RA0 } }, -{ "lfs", OP(48), OP_MASK, COM, { FRT, D, RA } }, +{ "lfs", OP(48), OP_MASK, COM, { FRT, D, RA0 } }, { "lfsu", OP(49), OP_MASK, COM, { FRT, D, RAS } }, -{ "lfd", OP(50), OP_MASK, COM, { FRT, D, RA } }, +{ "lfd", OP(50), OP_MASK, COM, { FRT, D, RA0 } }, { "lfdu", OP(51), OP_MASK, COM, { FRT, D, RAS } }, -{ "stfs", OP(52), OP_MASK, COM, { FRS, D, RA } }, +{ "stfs", OP(52), OP_MASK, COM, { FRS, D, RA0 } }, { "stfsu", OP(53), OP_MASK, COM, { FRS, D, RAS } }, -{ "stfd", OP(54), OP_MASK, COM, { FRS, D, RA } }, +{ "stfd", OP(54), OP_MASK, COM, { FRS, D, RA0 } }, { "stfdu", OP(55), OP_MASK, COM, { FRS, D, RAS } }, { "lq", OP(56), OP_MASK, POWER4, { RTQ, DQ, RAQ } }, -{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA } }, +{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA0 } }, -{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } }, +{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA0 } }, -{ "lbze", DEO(58,0), DE_MASK, BOOKE64, { RT, DE, RA } }, +{ "lbze", DEO(58,0), DE_MASK, BOOKE64, { RT, DE, RA0 } }, { "lbzue", DEO(58,1), DE_MASK, BOOKE64, { RT, DE, RAL } }, -{ "lhze", DEO(58,2), DE_MASK, BOOKE64, { RT, DE, RA } }, +{ "lhze", DEO(58,2), DE_MASK, BOOKE64, { RT, DE, RA0 } }, { "lhzue", DEO(58,3), DE_MASK, BOOKE64, { RT, DE, RAL } }, -{ "lhae", DEO(58,4), DE_MASK, BOOKE64, { RT, DE, RA } }, +{ "lhae", DEO(58,4), DE_MASK, BOOKE64, { RT, DE, RA0 } }, { "lhaue", DEO(58,5), DE_MASK, BOOKE64, { RT, DE, RAL } }, -{ "lwze", DEO(58,6), DE_MASK, BOOKE64, { RT, DE, RA } }, +{ "lwze", DEO(58,6), DE_MASK, BOOKE64, { RT, DE, RA0 } }, { "lwzue", DEO(58,7), DE_MASK, BOOKE64, { RT, DE, RAL } }, -{ "stbe", DEO(58,8), DE_MASK, BOOKE64, { RS, DE, RA } }, +{ "stbe", DEO(58,8), DE_MASK, BOOKE64, { RS, DE, RA0 } }, { "stbue", DEO(58,9), DE_MASK, BOOKE64, { RS, DE, RAS } }, -{ "sthe", DEO(58,10), DE_MASK, BOOKE64, { RS, DE, RA } }, +{ "sthe", DEO(58,10), DE_MASK, BOOKE64, { RS, DE, RA0 } }, { "sthue", DEO(58,11), DE_MASK, BOOKE64, { RS, DE, RAS } }, -{ "stwe", DEO(58,14), DE_MASK, BOOKE64, { RS, DE, RA } }, +{ "stwe", DEO(58,14), DE_MASK, BOOKE64, { RS, DE, RA0 } }, { "stwue", DEO(58,15), DE_MASK, BOOKE64, { RS, DE, RAS } }, -{ "ld", DSO(58,0), DS_MASK, PPC64, { RT, DS, RA } }, +{ "ld", DSO(58,0), DS_MASK, PPC64, { RT, DS, RA0 } }, { "ldu", DSO(58,1), DS_MASK, PPC64, { RT, DS, RAL } }, -{ "lwa", DSO(58,2), DS_MASK, PPC64, { RT, DS, RA } }, +{ "lwa", DSO(58,2), DS_MASK, PPC64, { RT, DS, RA0 } }, { "fdivs", A(59,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } }, { "fdivs.", A(59,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } }, @@ -4427,24 +4436,24 @@ const struct powerpc_opcode powerpc_opcodes[] = { { "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } }, -{ "lde", DEO(62,0), DE_MASK, BOOKE64, { RT, DES, RA } }, -{ "ldue", DEO(62,1), DE_MASK, BOOKE64, { RT, DES, RA } }, -{ "lfse", DEO(62,4), DE_MASK, BOOKE64, { FRT, DES, RA } }, +{ "lde", DEO(62,0), DE_MASK, BOOKE64, { RT, DES, RA0 } }, +{ "ldue", DEO(62,1), DE_MASK, BOOKE64, { RT, DES, RA0 } }, +{ "lfse", DEO(62,4), DE_MASK, BOOKE64, { FRT, DES, RA0 } }, { "lfsue", DEO(62,5), DE_MASK, BOOKE64, { FRT, DES, RAS } }, -{ "lfde", DEO(62,6), DE_MASK, BOOKE64, { FRT, DES, RA } }, +{ "lfde", DEO(62,6), DE_MASK, BOOKE64, { FRT, DES, RA0 } }, { "lfdue", DEO(62,7), DE_MASK, BOOKE64, { FRT, DES, RAS } }, -{ "stde", DEO(62,8), DE_MASK, BOOKE64, { RS, DES, RA } }, +{ "stde", DEO(62,8), DE_MASK, BOOKE64, { RS, DES, RA0 } }, { "stdue", DEO(62,9), DE_MASK, BOOKE64, { RS, DES, RAS } }, -{ "stfse", DEO(62,12), DE_MASK, BOOKE64, { FRS, DES, RA } }, +{ "stfse", DEO(62,12), DE_MASK, BOOKE64, { FRS, DES, RA0 } }, { "stfsue", DEO(62,13), DE_MASK, BOOKE64, { FRS, DES, RAS } }, -{ "stfde", DEO(62,14), DE_MASK, BOOKE64, { FRS, DES, RA } }, +{ "stfde", DEO(62,14), DE_MASK, BOOKE64, { FRS, DES, RA0 } }, { "stfdue", DEO(62,15), DE_MASK, BOOKE64, { FRS, DES, RAS } }, -{ "std", DSO(62,0), DS_MASK, PPC64, { RS, DS, RA } }, +{ "std", DSO(62,0), DS_MASK, PPC64, { RS, DS, RA0 } }, { "stdu", DSO(62,1), DS_MASK, PPC64, { RS, DS, RAS } }, -{ "stq", DSO(62,2), DS_MASK, POWER4, { RSQ, DS, RA } }, +{ "stq", DSO(62,2), DS_MASK, POWER4, { RSQ, DS, RA0 } }, { "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } }, diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c index c68df38..6f360c6 100644 --- a/opcodes/sparc-dis.c +++ b/opcodes/sparc-dis.c @@ -1,6 +1,6 @@ /* Print SPARC instructions. Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2002, 2003 Free Software Foundation, Inc. + 2000, 2002, 2003, 2004 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 @@ -224,7 +224,7 @@ print_insn_sparc (memaddr, info) static int opcodes_initialized = 0; /* bfd mach number of last call. */ static unsigned long current_mach = 0; - bfd_vma (*getword) PARAMS ((const unsigned char *)); + bfd_vma (*getword) (const void *); if (!opcodes_initialized || info->mach != current_mach) diff --git a/sim/ChangeLog b/sim/ChangeLog index dec01da..27aba57 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2004-03-10 Ben Elliston <bje@gnu.org> + + * MAINTAINERS: Update my mail address. + 2004-01-26 Chris Demetriou <cgd@broadcom.com> * configure.in (mips*-*-*): Configure in testsuite. diff --git a/sim/MAINTAINERS b/sim/MAINTAINERS index 6e05721..1980b0d 100644 --- a/sim/MAINTAINERS +++ b/sim/MAINTAINERS @@ -16,7 +16,7 @@ ppc Andrew Cagney <ac131313@redhat.com> m68hc11 Stephane Carrez <stcarrez@nerim.fr> mips Chris Demetriou <cgd@broadcom.com> sh (global maintainers) -common Ben Elliston <bje@wasabisystems.com> +common Ben Elliston <bje@gnu.org> common Frank Ch. Eigler <fche@redhat.com> * (target, then global maintainers) diff --git a/sim/testsuite/sim/sh64/ChangeLog b/sim/testsuite/sim/sh64/ChangeLog deleted file mode 100644 index 8bb2f76..0000000 --- a/sim/testsuite/sim/sh64/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ -2001-01-06 Ben Elliston <bje@redhat.com> - - * misc/fr-dr.s: New test. - -2001-01-03 Ben Elliston <bje@redhat.com> - - * interwork.exp: Match .s files only. - -2000-12-06 Ben Elliston <bje@redhat.com> - - * interwork.exp: New test case. - -2000-11-16 Ben Elliston <bje@redhat.com> - - * allinsn.exp: Rename from this .. - * compact.exp: .. to this. - * media.exp: New test case. - -2000-11-13 Ben Elliston <bje@redhat.com> - - * allinsn.exp: New test case. diff --git a/sim/testsuite/sim/sh64/compact.exp b/sim/testsuite/sim/sh64/compact.exp deleted file mode 100644 index d3d482a..0000000 --- a/sim/testsuite/sim/sh64/compact.exp +++ /dev/null @@ -1,19 +0,0 @@ -# SHcompact testsuite. - -if [istarget sh64-*-*] { - # load support procs (none yet) - # load_lib cgen.exp - - # all machines - set all_machs "sh5" - - # The .cgs suffix is for "cgen .s". - foreach src [lsort [glob -nocomplain $srcdir/$subdir/compact/*.cgs]] { - # If we're only testing specific files and this isn't one of them, - # skip it. - if ![runtest_file_p $runtests $src] { - continue - } - run_sim_test $src $all_machs - } -} diff --git a/sim/testsuite/sim/sh64/compact/ChangeLog b/sim/testsuite/sim/sh64/compact/ChangeLog deleted file mode 100644 index 99aaec1..0000000 --- a/sim/testsuite/sim/sh64/compact/ChangeLog +++ /dev/null @@ -1,26 +0,0 @@ -2002-01-09 Ben Elliston <bje@redhat.com> - - * macl.cgs: For good measure, clear the S bit at startup. - -2001-01-11 Ben Elliston <bje@redhat.com> - - * fmov.cgs (f13b): Compare R0 with R1, not R2, when testing that - the source register was correctly post-incremented. - -2000-12-01 Ben Elliston <bje@redhat.com> - - * *.cgs (ld): Link tests with -m shelf32. - -2000-11-24 Ben Elliston <bje@redhat.com> - - * fmov.cgs: New test case. - * ftrv.cgs: Populate the matrix with meaningful values. - -2000-11-22 Ben Elliston <bje@redhat.com> - - * *.cgs (as): Assemble tests with -isa=shcompact. - -2000-11-16 Ben Elliston <bje@redhat.com> - - * *.cgs: New test cases. - diff --git a/sim/testsuite/sim/sh64/compact/add.cgs b/sim/testsuite/sim/sh64/compact/add.cgs deleted file mode 100644 index 105e484..0000000 --- a/sim/testsuite/sim/sh64/compact/add.cgs +++ /dev/null @@ -1,55 +0,0 @@ -# sh testcase for add $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -init: - # Initialise some registers with values which help us to verify - # that the correct source registers are used by the ADD instruction. - mov #0, r0 - mov #1, r1 - mov #2, r2 - mov #3, r3 - mov #5, r5 - mov #15, r15 - -add: - # 0 + 0 = 0. - add r0, r0 - assert r0, #0 - - # 0 + 1 = 1. - add r0, r1 - assert r1, #1 - - # 1 + 2 = 3. - add r1, r2 - assert r2, #3 - - # 3 + 5 = 8. - add r3, r5 - assert r5, #8 - - # 8 + 8 = 16. - add r5, r5 - assert r5, #16 - - # 15 + 1 = 16. - add r15, r1 - assert r1, #16 - -neg: - mov #1, r0 - neg r0, r0 - mov #2, r1 - add r0, r1 - assert r1, #1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/addc.cgs b/sim/testsuite/sim/sh64/compact/addc.cgs deleted file mode 100644 index f6e46e1..0000000 --- a/sim/testsuite/sim/sh64/compact/addc.cgs +++ /dev/null @@ -1,90 +0,0 @@ -# sh testcase for addc $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - # Initialise some registers with values which help us to verify - # that the correct source registers are used by the ADDC instruction. - - .macro init - mov #0, r0 - mov #1, r1 - mov #2, r2 - mov #3, r3 - mov #5, r5 - mov #15, r15 - .endm - - start - - init -add: - clrt - addc r0, r0 - assert r0, #0 - clrt - addc r0, r1 - assert r1, #1 - clrt - addc r1, r2 - assert r2, #3 - clrt - addc r3, r5 - assert r5, #8 - clrt - addc r5, r5 - assert r5, #16 - clrt - addc r15, r1 - assert r1, #16 - - init -addt: - sett - addc r0, r0 - assert r0, #1 - sett - addc r0, r1 - assert r1, #3 - sett - addc r1, r2 - assert r2, #6 - sett - addc r3, r5 - assert r5, #9 - sett - addc r5, r5 - assert r5, #19 - sett - addc r15, r1 - assert r1, #19 - - bra next - nop - -wrong: - fail - -next: - init -large: - clrt - mov #1, r0 - neg r0, r0 - mov #2, r1 - addc r0, r1 - assert r1, #1 - - init -larget: - sett - mov #1, r0 - neg r0, r0 - mov #2, r1 - addc r0, r1 - assert r1, #2 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/addi.cgs b/sim/testsuite/sim/sh64/compact/addi.cgs deleted file mode 100644 index 7c96ddf..0000000 --- a/sim/testsuite/sim/sh64/compact/addi.cgs +++ /dev/null @@ -1,46 +0,0 @@ -# sh testcase for add #$imm8, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -init: - # Initialise some registers with values which help us to verify - # that the correct source registers are used by the ADD instruction. - mov #0, r0 - mov #1, r1 - mov #2, r2 - mov #3, r3 - mov #5, r5 - mov #15, r15 - -addi: - # 0 + 0 = 0. - add #0, r0 - assert r0, #0 - - # 0 + 1 = 1. - add #0, r1 - assert r1, #1 - - # 2 + 2 = 4. - add #2, r2 - assert r2, #4 - - # 120 + 5 = 125. - add #120, r5 - assert r5, #125 - -large: - mov #1, r0 - neg r0, r0 - add #2, r0 - assert r0, #1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/addv.cgs b/sim/testsuite/sim/sh64/compact/addv.cgs deleted file mode 100644 index 0267e5d..0000000 --- a/sim/testsuite/sim/sh64/compact/addv.cgs +++ /dev/null @@ -1,48 +0,0 @@ -# sh testcase for addv $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -zero: - mov #0, r0 - mov #0, r1 - addv r0, r1 - # Assert !T and #0. - bt wrong - assert r1, #0 - -one: - mov #0, r0 - mov #1, r1 - addv r0, r1 - # Assert !T and #1. - bt wrong - assert r1, #1 - -large: - # Produce MAXINT in R0. - mov #0, r0 - not r0, r0 - shlr r0 - - # Put #3 into R1. - mov #3, r1 - - # Add them and overflow. - addv r0, r1 - - # Assert T and overflowed value. - bf wrong - mov #1, r7 - rotr r7 - add #2, r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/and.cgs b/sim/testsuite/sim/sh64/compact/and.cgs deleted file mode 100644 index e145275..0000000 --- a/sim/testsuite/sim/sh64/compact/and.cgs +++ /dev/null @@ -1,33 +0,0 @@ -# sh testcase for and $rm64, $rn64 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global and -and: - mov #1, r1 - mov #7, r2 - rotr r2 - rotr r2 - and r1, r2 - - # R1 & R2 = 1. - assert r2, #1 - -another: - mov #192, r1 - mov #0, r2 - and r1, r2 - - # R1 & R2 = 0. - assert r2, #0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/andb.cgs b/sim/testsuite/sim/sh64/compact/andb.cgs deleted file mode 100644 index 77e6285..0000000 --- a/sim/testsuite/sim/sh64/compact/andb.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for and.b #$imm8, @(r0, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global orb -init: - # Init GBR and R0. - mov #30, r0 - ldc r0, gbr - mov #40, r0 - -orb: - and.b #255, @(r0, gbr) - and.b #170, @(r0, gbr) - and.b #255, @(r0, gbr) - and.b #0, @(r0, gbr) - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/andi.cgs b/sim/testsuite/sim/sh64/compact/andi.cgs deleted file mode 100644 index 32d71c5..0000000 --- a/sim/testsuite/sim/sh64/compact/andi.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for and #$imm8, r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global andi -andi: - mov #0, r0 - or #255, r0 - and #0, r0 - assert r0, #0 - -large: - mov #0, r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #255, r0 - -mask: - and #255, r0 - mov r0, r1 - mov #0, r0 - or #255, r0 - cmp/eq r0, r1 - bf wrong - -mask0: - and #0, r0 - assert r0, #0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/bf.cgs b/sim/testsuite/sim/sh64/compact/bf.cgs deleted file mode 100644 index 5c361f9..0000000 --- a/sim/testsuite/sim/sh64/compact/bf.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for bf $disp8 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global taken -taken: - clrt - bf ntaken - fail - .global ntaken -ntaken: - sett - bf bad - pass -bad: - fail - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/bfs.cgs b/sim/testsuite/sim/sh64/compact/bfs.cgs deleted file mode 100644 index 3cad5f6..0000000 --- a/sim/testsuite/sim/sh64/compact/bfs.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for bf/s $disp8 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global taken -taken: - clrt - bf/s ntaken -slot1: - nop - fail - .global ntaken -ntaken: - sett - bf/s bad -slot2: - nop - pass -bad: - fail - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/bra.cgs b/sim/testsuite/sim/sh64/compact/bra.cgs deleted file mode 100644 index 77c6da9..0000000 --- a/sim/testsuite/sim/sh64/compact/bra.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for bra $disp12 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global bra -bra: - bra okay -slot: - nop -bad: - fail - fail - fail - .global okay -okay: - pass - fail - diff --git a/sim/testsuite/sim/sh64/compact/braf.cgs b/sim/testsuite/sim/sh64/compact/braf.cgs deleted file mode 100644 index e761f6d..0000000 --- a/sim/testsuite/sim/sh64/compact/braf.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for braf $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global braf -braf: - mov #4, r0 - braf r0 -slot: - nop -bad: - fail - fail -okay: - pass -alsobad: - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/brk.cgs b/sim/testsuite/sim/sh64/compact/brk.cgs deleted file mode 100644 index 9908072..0000000 --- a/sim/testsuite/sim/sh64/compact/brk.cgs +++ /dev/null @@ -1,18 +0,0 @@ -# sh testcase for brk -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - .global brk -brk: - # If we hit the breakpoint, the sim will stop. - pass - - # FIXME: breakpoint instruction. - # The SH4 assembler doesn't know about "brk". - .word 0x003b -bad: - fail diff --git a/sim/testsuite/sim/sh64/compact/bsr.cgs b/sim/testsuite/sim/sh64/compact/bsr.cgs deleted file mode 100644 index 75a1a2b..0000000 --- a/sim/testsuite/sim/sh64/compact/bsr.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for bsr $disp12 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global bsr -bsr: - bsr okay -slot: - nop -bad: - fail - fail -okay: - pass -alsobad: - fail diff --git a/sim/testsuite/sim/sh64/compact/bsrf.cgs b/sim/testsuite/sim/sh64/compact/bsrf.cgs deleted file mode 100644 index 9360eaa..0000000 --- a/sim/testsuite/sim/sh64/compact/bsrf.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for bsrf $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -bsrf: - mov #4, r0 - bsrf r0 -slot: - nop -bad: - fail - fail -okay: - pass -alsobad: - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/bt.cgs b/sim/testsuite/sim/sh64/compact/bt.cgs deleted file mode 100644 index 65b9d61..0000000 --- a/sim/testsuite/sim/sh64/compact/bt.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for bt $disp8 -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global taken -taken: - sett - bt ntaken - fail - .global ntaken -ntaken: - clrt - bt bad - pass -bad: - fail - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/bts.cgs b/sim/testsuite/sim/sh64/compact/bts.cgs deleted file mode 100644 index 3d62e4d..0000000 --- a/sim/testsuite/sim/sh64/compact/bts.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for bt/s $disp8 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global taken -taken: - sett - bt/s ntaken -slot1: - nop - fail - .global ntaken -ntaken: - clrt - bt/s bad -slot2: - nop - pass -bad: - fail - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/compact/clrmac.cgs b/sim/testsuite/sim/sh64/compact/clrmac.cgs deleted file mode 100644 index 482dc80..0000000 --- a/sim/testsuite/sim/sh64/compact/clrmac.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for clrmac -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global clrmac -clrmac: - clrmac - pass diff --git a/sim/testsuite/sim/sh64/compact/clrs.cgs b/sim/testsuite/sim/sh64/compact/clrs.cgs deleted file mode 100644 index bed5fd5..0000000 --- a/sim/testsuite/sim/sh64/compact/clrs.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for clrs -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global clrs -clrs: - clrs - # Somehow ensure that S is set. - pass diff --git a/sim/testsuite/sim/sh64/compact/clrt.cgs b/sim/testsuite/sim/sh64/compact/clrt.cgs deleted file mode 100644 index 281c2f4..0000000 --- a/sim/testsuite/sim/sh64/compact/clrt.cgs +++ /dev/null @@ -1,16 +0,0 @@ -# sh testcase for clrt -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global clrt -clrt: - clrt - bt wrong - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmpeq.cgs b/sim/testsuite/sim/sh64/compact/cmpeq.cgs deleted file mode 100644 index 3cc744c..0000000 --- a/sim/testsuite/sim/sh64/compact/cmpeq.cgs +++ /dev/null @@ -1,52 +0,0 @@ -# sh testcase for cmp/eq $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zeroes: - mov #0, r1 - mov #0, r2 - cmp/eq r1, r2 - bf wrong - -zero1: - mov #0, r1 - mov #1, r2 - cmp/eq r1, r2 - bt wrong - -zero2: - mov #0, r2 - mov #1, r1 - cmp/eq r2, r1 - bt wrong - -equal: - mov #192, r1 - mov #192, r2 - cmp/eq r1, r2 - bf wrong - -noteq: - mov #192, r1 - mov #193, r2 - cmp/eq r1, r2 - bt wrong - -large: - mov #1, r1 - rotr r1 - mov #1, r2 - rotr r2 - cmp/eq r1, r2 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmpeqi.cgs b/sim/testsuite/sim/sh64/compact/cmpeqi.cgs deleted file mode 100644 index 79900a0..0000000 --- a/sim/testsuite/sim/sh64/compact/cmpeqi.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for cmp/eq #$imm8, r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zeroes: - mov #0, r0 - cmp/eq #0, r0 - bf wrong - -zero1: - mov #0, r0 - cmp/eq #1, r0 - bt wrong - -zero2: - mov #1, r0 - cmp/eq #0, r0 - bt wrong - -equal: - mov #192, r0 - cmp/eq #192, r0 - bf wrong - -sign: - mov #255, r0 - cmp/eq #255, r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmpge.cgs b/sim/testsuite/sim/sh64/compact/cmpge.cgs deleted file mode 100644 index 9d4327e..0000000 --- a/sim/testsuite/sim/sh64/compact/cmpge.cgs +++ /dev/null @@ -1,69 +0,0 @@ -# sh testcase for cmp/ge $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - mov #0, r1 - cmp/ge r0, r1 - bf wrong - -onezero: - mov #1, r0 - mov #0, r1 - cmp/ge r0, r1 - bt wrong - -zeroone: - mov #0, r0 - mov #1, r1 - cmp/ge r0, r1 - bf wrong - -equal: - mov #192, r0 - mov #192, r1 - cmp/ge r0, r1 - bf wrong - -eqlarge: - mov #1, r0 - rotr r0 - add #85, r0 - mov #1, r1 - rotr r1 - add #85, r1 - cmp/ge r0, r1 - bf wrong - -large2: - mov #1, r0 - rotr r0 - add #85, r0 - mov #1, r1 - rotr r1 - add #84, r1 - cmp/ge r0, r1 - bt wrong - -large3: - mov #1, r0 - rotr r0 - add #84, r0 - mov #1, r1 - rotr r1 - add #85, r1 - cmp/ge r0, r1 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/cmpgt.cgs b/sim/testsuite/sim/sh64/compact/cmpgt.cgs deleted file mode 100644 index 460ca65..0000000 --- a/sim/testsuite/sim/sh64/compact/cmpgt.cgs +++ /dev/null @@ -1,69 +0,0 @@ -# sh testcase for cmp/gt $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - mov #0, r1 - cmp/gt r0, r1 - bt wrong - -onezero: - mov #1, r0 - mov #0, r1 - cmp/gt r0, r1 - bt wrong - -zeroone: - mov #0, r0 - mov #1, r1 - cmp/gt r0, r1 - bf wrong - -equal: - mov #192, r0 - mov #192, r1 - cmp/gt r0, r1 - bt wrong - -eqlarge: - mov #1, r0 - rotr r0 - add #85, r0 - mov #1, r1 - rotr r1 - add #85, r1 - cmp/gt r0, r1 - bt wrong - -large2: - mov #1, r0 - rotr r0 - add #85, r0 - mov #1, r1 - rotr r1 - add #84, r1 - cmp/gt r0, r1 - bt wrong - -large3: - mov #1, r0 - rotr r0 - add #84, r0 - mov #1, r1 - rotr r1 - add #85, r1 - cmp/gt r0, r1 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/cmphi.cgs b/sim/testsuite/sim/sh64/compact/cmphi.cgs deleted file mode 100644 index efbcaa3..0000000 --- a/sim/testsuite/sim/sh64/compact/cmphi.cgs +++ /dev/null @@ -1,68 +0,0 @@ -# sh testcase for cmp/hi $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - mov #0, r0 - cmp/hi r0, r1 - bt wrong - -equal: - mov #1, r0 - rotr r0 - add #3, r0 - - mov #1, r1 - rotr r1 - add #3, r1 - - cmp/hi r0, r1 - bt wrong - -gt: - mov #10, r0 - mov #12, r1 - cmp/hi r0, r1 - bf wrong - -lt: - mov #12, r0 - mov #10, r1 - cmp/hi r0, r1 - bt wrong - -gtneg: - mov #1, r0 - rotr r0 - add #1, r0 - - mov #1, r1 - rotr r1 - add #3, r1 - - cmp/hi r0, r1 - bf wrong - -ltneg: - mov #1, r0 - rotr r0 - add #3, r0 - - mov #1, r1 - rotr r1 - add #1, r1 - - cmp/hi r0, r1 - bt wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmphs.cgs b/sim/testsuite/sim/sh64/compact/cmphs.cgs deleted file mode 100644 index 957f80c..0000000 --- a/sim/testsuite/sim/sh64/compact/cmphs.cgs +++ /dev/null @@ -1,59 +0,0 @@ -# sh testcase for cmp/hs $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - mov #0, r0 - cmp/hs r0, r1 - -equal: - mov #1, r0 - rotr r0 - add #3, r0 - - mov #1, r1 - rotr r1 - add #3, r1 - - cmp/hs r0, r1 - -gt: - mov #10, r0 - mov #12, r1 - cmp/hs r0, r1 - -lt: - mov #12, r0 - mov #10, r1 - cmp/hs r0, r1 - -gtneg: - mov #1, r0 - rotr r0 - add #1, r0 - - mov #1, r1 - rotr r1 - add #3, r1 - - cmp/hs r0, r1 - -ltneg: - mov #1, r0 - rotr r0 - add #3, r0 - - mov #1, r1 - rotr r1 - add #1, r1 - - cmp/hs r0, r1 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/cmppl.cgs b/sim/testsuite/sim/sh64/compact/cmppl.cgs deleted file mode 100644 index 1c11377..0000000 --- a/sim/testsuite/sim/sh64/compact/cmppl.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for cmp/pl $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - cmp/pl r0 - bt wrong - -plus: - mov #10, r0 - cmp/pl r0 - bf wrong - -minus: - mov #10, r0 - neg r0, r0 - cmp/pl r0 - bt wrong - -large: - mov #10, r0 - shll8 r0 - add #123, r0 - cmp/pl r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmppz.cgs b/sim/testsuite/sim/sh64/compact/cmppz.cgs deleted file mode 100644 index 2e0bf48..0000000 --- a/sim/testsuite/sim/sh64/compact/cmppz.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for cmp/pz $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -zero: - mov #0, r0 - cmp/pz r0 - bf wrong - -plus: - mov #10, r0 - cmp/pz r0 - bf wrong - -minus: - mov #10, r0 - neg r0, r0 - cmp/pz r0 - bt wrong - -large: - mov #10, r0 - shll8 r0 - add #123, r0 - cmp/pz r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/cmpstr.cgs b/sim/testsuite/sim/sh64/compact/cmpstr.cgs deleted file mode 100644 index 70d90d3..0000000 --- a/sim/testsuite/sim/sh64/compact/cmpstr.cgs +++ /dev/null @@ -1,148 +0,0 @@ -# sh testcase for cmp/str $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - -.macro rot8 - rotr r0 - rotr r0 - rotr r0 - rotr r0 - rotr r0 - rotr r0 - rotr r0 - rotr r0 -.endm - - start - -# Use multiple "wrong" labels because this program is quite long. It's -# likely that some instructions will be too far away from the branch -# target to use PC-relative branches. - -match0: - # No bytes matching. - mov #1, r0 - neg r0, r0 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - mov r0, r1 - mov #1, r0 - neg r0, r0 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - cmp/str r0, r1 - bt wrong0 - - bra match1 - nop -wrong0: - fail - -match1: - # One byte matching. - mov #1, r0 - neg r0, r0 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - mov r0, r1 - mov #1, r0 - neg r0, r0 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - cmp/str r0, r1 - bf wrong1 - - bra match2 - nop -wrong1: - fail - -match2: - # Two bytes matching. - mov #1, r0 - neg r0, r0 - xor #170, r0 - rot8 - xor #170, r0 - rot8 - mov r0, r1 - mov #1, r0 - neg r0, r0 - xor #85, r0 - rot8 - xor #85, r0 - rot8 - cmp/str r0, r1 - bf wrong2 - - bra match3 - nop -wrong2: - fail - -byte0: -match3: - # One byte matching. - # This is also the test for byte 0. - mov #85, r0 - mov #85, r1 - cmp/str r0, r1 - bf wrong3 - -byte1: - # Match in byte position 1. - mov #85, r0 - shll8 r0 - mov #85, r1 - shll8 r1 - cmp/str r0, r1 - bf wrong3 - -byte2: - # Match in byte position 2. - mov #85, r0 - shll16 r0 - mov #85, r1 - shll16 r1 - cmp/str r0, r1 - bf wrong3 - -byte3: - # Match in byte position 3. - mov #85, r0 - shll16 r0 - shll8 r0 - mov #85, r1 - shll16 r1 - shll8 r1 - cmp/str r0, r1 - bf wrong3 - -okay: - pass -wrong3: - fail - diff --git a/sim/testsuite/sim/sh64/compact/div0s.cgs b/sim/testsuite/sim/sh64/compact/div0s.cgs deleted file mode 100644 index 8cd6422..0000000 --- a/sim/testsuite/sim/sh64/compact/div0s.cgs +++ /dev/null @@ -1,52 +0,0 @@ -# sh testcase for div0s $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -init: - mov #0, r0 - mov #3, r1 - mov #4, r2 - neg r1, r3 - neg r2, r4 - -perm1: - div0s r0, r0 - bt wrong - div0s r0, r1 - bt wrong - div0s r1, r0 - bt wrong - -perm2: - div0s r0, r4 - bf wrong - div0s r4, r0 - bf wrong - -perm3: - div0s r1, r2 - bt wrong - div0s r2, r1 - bt wrong - -perm4: - div0s r3, r4 - bt wrong - div0s r4, r3 - bt wrong - -perm5: - div0s r1, r1 - bt wrong - div0s r3, r3 - bt wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/div0u.cgs b/sim/testsuite/sim/sh64/compact/div0u.cgs deleted file mode 100644 index 02f8534..0000000 --- a/sim/testsuite/sim/sh64/compact/div0u.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for div0u -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global div0u -div0u: - div0u - # Can't easily test Q and M (other than visually inspecting - # the simulator's trace output). - bt wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/div1.cgs b/sim/testsuite/sim/sh64/compact/div1.cgs deleted file mode 100644 index 63a0e81..0000000 --- a/sim/testsuite/sim/sh64/compact/div1.cgs +++ /dev/null @@ -1,52 +0,0 @@ -# sh testcase for div1 $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #10, r0 - mov #2, r1 - div0s r0,r1 - - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - div1 r0, r1 - - pass diff --git a/sim/testsuite/sim/sh64/compact/dmulsl.cgs b/sim/testsuite/sim/sh64/compact/dmulsl.cgs deleted file mode 100644 index 081ce16..0000000 --- a/sim/testsuite/sim/sh64/compact/dmulsl.cgs +++ /dev/null @@ -1,115 +0,0 @@ -# sh testcase for dmuls.l $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #0, r0 - mov #0, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #0 - -test2: - mov #0, r0 - mov #5, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #0 - -test3: - mov #5, r0 - mov #0, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #0 - -test4: - mov #1, r0 - mov #5, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #5 - -test5: - mov #5, r0 - mov #1, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #5 - - bra test6 - nop - -wrong: - fail - -test6: - mov #2, r0 - mov #2, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #4 - -test7: - mov #1, r0 - neg r0, r0 - mov #2, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - - mov #0, r8 - not r8, r9 - not r8, r10 - shll r10 - cmp/eq r3, r9 - bf wrong - cmp/eq r4, r10 - bf wrong - -test8: - mov #1, r0 - neg r0, r0 - mov #1, r1 - neg r1, r1 - dmuls.l r0, r1 - # check result - sts mach, r3 - sts macl, r4 - assert r3, #0 - assert r4, #1 - -test9: - mov #1, r0 - neg r0, r0 - shlr r0 - mov #1, r1 - neg r1, r1 - shlr r1 - dmuls.l r0, r1 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/dmulul.cgs b/sim/testsuite/sim/sh64/compact/dmulul.cgs deleted file mode 100644 index b34b870..0000000 --- a/sim/testsuite/sim/sh64/compact/dmulul.cgs +++ /dev/null @@ -1,53 +0,0 @@ -# sh testcase for dmulu.l $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #0, r0 - mov #0, r1 - dmulu.l r0, r1 - - mov #0, r0 - mov #5, r1 - dmulu.l r0, r1 - - mov #5, r0 - mov #0, r1 - dmulu.l r0, r1 - - mov #1, r0 - mov #5, r1 - dmulu.l r0, r1 - - mov #5, r0 - mov #1, r1 - dmulu.l r0, r1 - - mov #2, r0 - mov #2, r1 - dmulu.l r0, r1 - - mov #1, r0 - neg r0, r0 - mov #2, r1 - dmulu.l r0, r1 - - mov #1, r0 - neg r0, r0 - mov #1, r1 - neg r1, r1 - dmulu.l r0, r1 - - mov #1, r0 - neg r0, r0 - shlr r0 - mov #1, r1 - neg r1, r1 - shlr r1 - dmulu.l r0, r1 - - pass diff --git a/sim/testsuite/sim/sh64/compact/dt.cgs b/sim/testsuite/sim/sh64/compact/dt.cgs deleted file mode 100644 index 38e9163..0000000 --- a/sim/testsuite/sim/sh64/compact/dt.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for dt $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global dt -dt: - mov #3, r0 - dt r0 - bt wrong - assert r0, #2 - - mov #1, r0 - dt r0 - bf wrong - assert r0, #0 - - mov #0, r0 - dt r0 - bt wrong - mov #0, r7 - not r7, r7 - cmp/eq r7, r0 - bf wrong - - mov #1, r0 - neg r0, r0 - dt r0 - mov #1, r7 - not r7, r7 - cmp/eq r7, r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/extsb.cgs b/sim/testsuite/sim/sh64/compact/extsb.cgs deleted file mode 100644 index 9087802..0000000 --- a/sim/testsuite/sim/sh64/compact/extsb.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for exts.b $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global extsb -extsb: - mov #42, r1 - exts.b r1, r2 - assert r2, #42 -signed: - mov #0, r0 - or #255, r0 - exts.b r0, r1 - mov #0, r7 - not r7, r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/extsw.cgs b/sim/testsuite/sim/sh64/compact/extsw.cgs deleted file mode 100644 index d625774..0000000 --- a/sim/testsuite/sim/sh64/compact/extsw.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for exts.w $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global extsw -extsw: - mov #42, r1 - exts.w r1, r2 - assert r2, #42 - -another: - mov #0, r0 - or #255, r0 - shll8 r0 - exts.w r0, r1 - - mov #-1, r7 - shll8 r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/extub.cgs b/sim/testsuite/sim/sh64/compact/extub.cgs deleted file mode 100644 index 51c14ac..0000000 --- a/sim/testsuite/sim/sh64/compact/extub.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for extu.b $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global extub -extub: - mov #42, r1 - extu.b r1, r2 - assert r2, #42 - -another: - mov #0, r0 - or #255, r0 - extu.b r0, r1 - - mov #0, r0 - or #255, r0 - cmp/eq r0, r1 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/extuw.cgs b/sim/testsuite/sim/sh64/compact/extuw.cgs deleted file mode 100644 index 057afe7..0000000 --- a/sim/testsuite/sim/sh64/compact/extuw.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for extu.w $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global extuw -extuw: - mov #42, r1 - extu.w r1, r2 - assert r2, #42 - -another: - mov #0, r0 - or #255, r0 - shll8 r0 - extu.w r0, r1 - mov #0, r0 - or #255, r0 - shll8 r0 - cmp/eq r0, r1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/fabs.cgs b/sim/testsuite/sim/sh64/compact/fabs.cgs deleted file mode 100644 index 6955fa2..0000000 --- a/sim/testsuite/sim/sh64/compact/fabs.cgs +++ /dev/null @@ -1,88 +0,0 @@ -# sh testcase for fabs -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - _clrpr - # fabs(0.0) = 0.0. - fldi0 fr0 - fabs fr0 - fldi0 fr1 - fcmp/eq fr0, fr1 - bf wrong - - # fabs(1.0) = 1.0. - fldi1 fr0 - fabs fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bf wrong - - # fabs(-1.0) = 1.0. - fldi1 fr0 - fneg fr0 - fabs fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # double precision tests. - # fabs(0.0) = 0.0. - fldi0 fr0 - _s2d fr0, dr0 - _setpr - fabs dr0 - _clrpr - # check. - fldi0 fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bf wrong - _clrpr - -one: - # fabs(1.0) = 1.0. - fldi1 fr0 - _s2d fr0, dr0 - _setpr - fabs dr0 - _clrpr - # check. - fldi1 fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bf wrong2 - _clrpr - -minusone: - # fabs(-1.0) = 1.0. - fldi1 fr0 - fneg fr0 - _s2d fr0, dr0 - _setpr - fabs dr0 - _clrpr - # check. - fldi1 fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bf wrong2 - _clrpr - -okay: - pass -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/fadd.cgs b/sim/testsuite/sim/sh64/compact/fadd.cgs deleted file mode 100644 index b000353..0000000 --- a/sim/testsuite/sim/sh64/compact/fadd.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for fadd -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - _clrpr - - fldi1 fr0 - fldi1 fr1 - fadd fr0, fr1 - - fldi0 fr0 - fldi1 fr1 - fadd fr0, fr1 - - fldi1 fr0 - fldi0 fr1 - fadd fr0, fr1 - - _setpr -double: - fldi1 fr0 - fldi1 fr1 - _s2d fr0, dr4 - _s2d fr1, dr6 - fadd dr4, dr6 - - pass diff --git a/sim/testsuite/sim/sh64/compact/fcmpeq.cgs b/sim/testsuite/sim/sh64/compact/fcmpeq.cgs deleted file mode 100644 index 151d5e5..0000000 --- a/sim/testsuite/sim/sh64/compact/fcmpeq.cgs +++ /dev/null @@ -1,88 +0,0 @@ -# sh testcase for fcmpeq -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # 1.0 == 1.0. - fldi1 fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bf wrong - - # 0.0 != 1.0. - fldi0 fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bt wrong - - # 1.0 != 0.0. - fldi1 fr0 - fldi0 fr1 - fcmp/eq fr0, fr1 - bt wrong - - # 2.0 != 1.0 - fldi1 fr0 - fadd fr0, fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bt wrong - - bra double - # delay slot - nop - -wrong: - fail - -double: - # 1.0 == 1.0 - fldi1 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bf wrong - _clrpr - - # 0.0 != 1.0 - fldi0 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bt wrong - _clrpr - - # 1.0 != 0.0 - fldi1 fr0 - fldi0 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bt wrong2 - _clrpr - - # 2.0 != 1.0 - fldi1 fr0 - fadd fr0, fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bt wrong2 - _clrpr - -okay: - pass - -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/fcmpgt.cgs b/sim/testsuite/sim/sh64/compact/fcmpgt.cgs deleted file mode 100644 index 931ae3e..0000000 --- a/sim/testsuite/sim/sh64/compact/fcmpgt.cgs +++ /dev/null @@ -1,95 +0,0 @@ -# sh testcase for fcmpgt -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # 1.0 !> 1.0. - fldi1 fr0 - fldi1 fr1 - fcmp/gt fr0, fr1 - bt wrong - - # 0.0 !> 1.0. - fldi0 fr0 - fldi1 fr1 - fcmp/gt fr0, fr1 - bf wrong - - # 1.0 > 0.0. - fldi1 fr0 - fldi0 fr1 - fcmp/gt fr0, fr1 - bt wrong - - # 2.0 > 1.0 - fldi1 fr0 - fadd fr0, fr0 - fldi1 fr1 - fcmp/gt fr0, fr1 - bt wrong - - bra double - nop - -wrong: - fail - -double: - # double precision tests. - # 1.0 !> 1.0. - fldi1 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/gt dr0, dr2 - bt wrong2 - _clrpr - - # 0.0 !> 1.0. - fldi0 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/gt dr0, dr2 - bf wrong2 - _clrpr - - bra next - nop - -wrong2: - fail - -next: - # 1.0 > 0.0. - fldi1 fr0 - fldi0 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/gt dr0, dr2 - bt wrong2 - _clrpr - - # 2.0 > 1.0. - fldi1 fr0 - fadd fr0, fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fcmp/gt dr0, dr2 - bt wrong2 - _clrpr - -okay: - pass - -wrong3: - fail diff --git a/sim/testsuite/sim/sh64/compact/fcnvds.cgs b/sim/testsuite/sim/sh64/compact/fcnvds.cgs deleted file mode 100644 index abf9e70..0000000 --- a/sim/testsuite/sim/sh64/compact/fcnvds.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for fcnvds -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - _setpr - fcnvds dr0, fpul - _clrpr -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/fcnvsd.cgs b/sim/testsuite/sim/sh64/compact/fcnvsd.cgs deleted file mode 100644 index 699bde5..0000000 --- a/sim/testsuite/sim/sh64/compact/fcnvsd.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for fcnvsd -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - fldi1 fr0 - flds fr0, fpul - _setpr - fcnvsd fpul, dr2 - _clrpr - - # Convert back. - _setpr - fcnvds dr2, fpul - _clrpr - fsts fpul, fr1 - fcmp/eq fr0, fr1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/fdiv.cgs b/sim/testsuite/sim/sh64/compact/fdiv.cgs deleted file mode 100644 index 06d1e93..0000000 --- a/sim/testsuite/sim/sh64/compact/fdiv.cgs +++ /dev/null @@ -1,83 +0,0 @@ -# sh testcase for fdiv -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - _clrpr - - # 1.0 / 0.0 should be INF - # (and not crash the sim). - fldi0 fr0 - fldi1 fr1 - fdiv fr0, fr1 - - # 0.0 / 1.0 == 0.0. - fldi0 fr0 - fldi1 fr1 - fdiv fr1, fr0 - fldi0 fr2 - fcmp/eq fr0, fr2 - bf wrong - - # 2.0 / 1.0 == 2.0. - fldi1 fr1 - fldi1 fr2 - fadd fr2, fr2 - fdiv fr1, fr2 - # Load 2.0 into fr3. - fldi1 fr3 - fadd fr3, fr3 - fcmp/eq fr2, fr3 - bf wrong - - # (1.0 / 2.0) + (1.0 / 2.0) == 1.0. - fldi1 fr1 - fldi1 fr2 - fadd fr2, fr2 - fdiv fr2, fr1 - # fr1 should contain 0.5. - fadd fr1, fr1 - # Load 1.0 into fr3. - fldi1 fr3 - # Compare fr1 with fr3. - fcmp/eq fr1, fr3 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # double test - # (1.0 / 2.0) + (1.0 / 2.0) == 1.0. - fldi1 fr1 - _s2d fr1, dr6 - fldi1 fr2 - fadd fr2, fr2 - _s2d fr2, dr8 - _setpr - fdiv dr8, dr6 - # dr0 should contain 0.5. - # double it, expect 1.0. - fadd dr6, dr6 - _clrpr -foo: - # Load 1.0 into dr4. - fldi1 fr1 - _s2d fr1, dr10 - # Compare dr0 with dr10. - _setpr - fcmp/eq dr6, dr10 - bf wrong2 - _clrpr - -okay: - pass - -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/fipr.cgs b/sim/testsuite/sim/sh64/compact/fipr.cgs deleted file mode 100644 index 092f0f6..0000000 --- a/sim/testsuite/sim/sh64/compact/fipr.cgs +++ /dev/null @@ -1,44 +0,0 @@ -# sh testcase for fipr $fvm, $fvn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -initv1: - fldi1 fr0 - # Load 2 into fr2. - fldi1 fr1 - fadd fr1, fr1 - # Load 4 into fr2. - fldi1 fr2 - fadd fr2, fr2 - fadd fr2, fr2 - fldi0 fr3 - -initv2: - fldi1 fr8 - fldi0 fr9 - fldi1 fr10 - fldi0 fr11 - - fipr fv0, fv8 - - # Result will be in fr11. - fldi1 fr0 - fldi1 fr1 - # Two. - fadd fr1, fr0 - # Four. - fadd fr0, fr0 - # Five. - fadd fr1, fr0 - fcmp/eq fr0, fr11 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/fldi0.cgs b/sim/testsuite/sim/sh64/compact/fldi0.cgs deleted file mode 100644 index b0d35e4..0000000 --- a/sim/testsuite/sim/sh64/compact/fldi0.cgs +++ /dev/null @@ -1,17 +0,0 @@ -# sh testcase for fldi0 $frn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - fldi0 fr0 - fldi0 fr2 - fldi0 fr4 - fldi0 fr6 - fldi0 fr8 - fldi0 fr10 - fldi0 fr12 - fldi0 fr14 - pass diff --git a/sim/testsuite/sim/sh64/compact/fldi1.cgs b/sim/testsuite/sim/sh64/compact/fldi1.cgs deleted file mode 100644 index 8bd5c52..0000000 --- a/sim/testsuite/sim/sh64/compact/fldi1.cgs +++ /dev/null @@ -1,17 +0,0 @@ -# sh testcase for fldi1 $frn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - fldi1 fr1 - fldi1 fr3 - fldi1 fr5 - fldi1 fr7 - fldi1 fr9 - fldi1 fr11 - fldi1 fr13 - fldi1 fr15 - pass diff --git a/sim/testsuite/sim/sh64/compact/flds.cgs b/sim/testsuite/sim/sh64/compact/flds.cgs deleted file mode 100644 index 797e7cb..0000000 --- a/sim/testsuite/sim/sh64/compact/flds.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for flds -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - fldi0 fr0 - flds fr0, fpul - fsts fpul, fr1 - fcmp/eq fr0, fr1 - bf wrong - - fldi1 fr0 - flds fr0, fpul - fsts fpul, fr1 - fcmp/eq fr0, fr1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/float.cgs b/sim/testsuite/sim/sh64/compact/float.cgs deleted file mode 100644 index 8532d7f..0000000 --- a/sim/testsuite/sim/sh64/compact/float.cgs +++ /dev/null @@ -1,80 +0,0 @@ -# sh testcase for float -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -pos: - mov #3, r0 - lds r0, fpul - float fpul, fr7 - - # Check the result. - fldi1 fr0 - fldi1 fr1 - fadd fr0, fr1 - fadd fr0, fr1 - fcmp/eq fr1, fr7 - bf wrong - -neg: - mov #3, r0 - neg r0, r0 - lds r0, fpul - float fpul, fr7 - - # Check the result. - fldi1 fr0 - fldi1 fr1 - fadd fr0, fr1 - fadd fr0, fr1 - fneg fr1 - fcmp/eq fr1, fr7 - bf wrong - - bra double - nop - -wrong: - fail - -double: - mov #3, r0 - lds r0, fpul - _setpr - float fpul, dr8 - _clrpr - # check the result. - fldi1 fr0 - fldi1 fr1 - fadd fr0, fr1 - fadd fr0, fr1 - _s2d fr1, dr2 - fcmp/eq dr2, dr8 - bf wrong - -dneg: - mov #3, r0 - neg r0, r0 - lds r0, fpul - _setpr - float fpul, dr8 - _clrpr - # check the result. - fldi1 fr0 - fldi1 fr1 - fadd fr0, fr1 - fadd fr0, fr1 - fneg fr1 - _s2d fr1, dr2 - fcmp/eq dr2, dr8 - bf wrong - -okay: - pass - -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/fmac.cgs b/sim/testsuite/sim/sh64/compact/fmac.cgs deleted file mode 100644 index dbf36ab..0000000 --- a/sim/testsuite/sim/sh64/compact/fmac.cgs +++ /dev/null @@ -1,78 +0,0 @@ -# sh testcase for fmac -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # 0.0 * x + y = y. - - fldi0 fr0 - fldi1 fr1 - fldi1 fr2 - fmac fr0, fr1, fr2 - # check result. - fldi1 fr0 - fcmp/eq fr0, fr2 - bf wrong - - # x * y + 0.0 = x * y. - - fldi1 fr0 - fldi1 fr1 - fldi0 fr2 - # double it. - fadd fr1, fr2 - fmac fr0, fr1, fr2 - # check result. - fldi1 fr0 - fadd fr0, fr0 - fcmp/eq fr0, fr2 - bf wrong - - # x * 0.0 + y = y. - - fldi1 fr0 - fldi0 fr1 - fldi1 fr2 - fadd fr2, fr2 - fmac fr0, fr1, fr2 - # check result. - fldi1 fr0 - # double fr0. - fadd fr0, fr0 - fcmp/eq fr0, fr2 - bf wrong - - # x * 0.0 + 0.0 = 0.0 - - fldi1 fr0 - fadd fr0, fr0 - fldi0 fr1 - fldi0 fr2 - fmac fr0, fr1, fr2 - # check result. - fldi0 fr0 - fcmp/eq fr0, fr2 - bf wrong - - # 0.0 * x + 0.0 = 0.0. - - fldi0 fr0 - fldi1 fr1 - # double it. - fadd fr1, fr1 - fldi0 fr2 - fmac fr0, fr1, fr2 - # check result. - fldi0 fr0 - fcmp/eq fr0, fr2 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/fmov.cgs b/sim/testsuite/sim/sh64/compact/fmov.cgs deleted file mode 100644 index f4e1fde..0000000 --- a/sim/testsuite/sim/sh64/compact/fmov.cgs +++ /dev/null @@ -1,273 +0,0 @@ -# sh testcase for all fmov instructions -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - .macro init - fldi0 fr0 - fldi1 fr2 - .endm - - # Set the SZ (SiZe) bit in the fpscr. - .macro _setsz - sts fpscr, r7 - mov #16, r8 - shll16 r8 - or r8, r7 - lds r7, fpscr - .endm - - # Clear the SZ bit. - .macro _clrsz - sts fpscr, r7 - mov #16, r8 - shll16 r8 - not r8, r8 - and r8, r7 - lds r7, fpscr - .endm - start - -fmov1: # Test fr -> fr. - init - _clrpr - _clrsz - fmov fr0, fr10 - # Ensure fr0 and fr10 are now equal. - fcmp/eq fr0, fr10 - bt fmov2 - fail - -fmov2: # Test dr -> dr. - init - _setpr - _setsz - fmov dr0, dr2 - # Ensure dr0 and dr2 are now equal. - fcmp/eq dr0, dr2 - bt fmov3 - fail - -fmov3: # Test dr -> xd and xd -> dr. - init - _setsz - fmov dr0, xd0 - # Ensure dr0 and xd0 are now equal. - fmov xd0, dr2 - fcmp/eq dr0, dr2 - bt fmov4 - fail - -fmov4: # Test xd -> xd. - init - _setsz - _setpr - fmov dr0, xd0 - fmov xd0, xd2 - fmov xd2, dr2 - # Ensure dr0 and dr2 are now equal. - fcmp/eq dr0, dr2 - bt fmov5 - fail - -fmov5: # Test fr -> @rn and @rn -> fr. - init - _clrsz - _clrpr - mov #40, r0 - shll8 r0 - fmov fr0, @r0 - fmov @r0, fr1 - fcmp/eq fr0, fr1 - bt fmov6 - fail - -fmov6: # Test dr -> @rn and @rn -> dr. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - fmov dr0, @r0 - fmov @r0, dr2 - fcmp/eq dr0, dr2 - bt fmov7 - fail - -fmov7: # Test xd -> @rn and @rn -> xd. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - fmov dr0, xd0 - fmov xd0, @r0 - fmov @r0, xd2 - fmov xd2, dr2 - fcmp/eq dr0, dr2 - bt fmov8 - fail - -fmov8: # Test fr -> @-rn. - init - _clrsz - _clrpr - mov #40, r0 - shll8 r0 - # Preserve. - mov r0, r1 - fmov fr0, @-r0 - fmov @r0, fr2 - fcmp/eq fr0, fr2 - bt f8b - fail -f8b: # check pre-dec. - add #4, r0 - cmp/eq r0, r1 - bt fmov9 - fail - -fmov9: # Test dr -> @-rn. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r1 - fmov dr0, @-r0 - fmov @r0, dr2 - fcmp/eq dr0, dr2 - bt f9b - fail -f9b: # check pre-dec. - add #8, r0 - cmp/eq r0, r1 - bt fmov10 - fail - -fmov10: # Test xd -> @-rn. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r1 - fmov dr0, xd0 - fmov xd0, @-r0 - fmov @r0, xd2 - fmov xd2, dr2 - fcmp/eq dr0, dr2 - bt f10b - fail -f10b: # check pre-dec. - add #8, r0 - cmp/eq r0, r1 - bt fmov11 - fail - -fmov11: # Test @rn+ -> fr. - init - _clrsz - _clrpr - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r1 - fmov fr0, @r0 - fmov @r0+, fr2 - fcmp/eq fr0, fr2 - bt f11b - fail -f11b: # check post-inc. - add #4, r1 - cmp/eq r0, r1 - bt fmov12 - fail - -fmov12: # Test @rn+ -> dr. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - # preserve r0. - mov r0, r1 - fmov dr0, @r0 - fmov @r0+, dr2 - fcmp/eq dr0, dr2 - bt f12b - fail -f12b: # check post-inc. - add #8, r1 - cmp/eq r0, r1 - bt fmov13 - fail - -fmov13: # Test @rn -> xd. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r1 - fmov dr0, xd0 - fmov xd0, @r0 - fmov @r0+, xd2 - fmov xd2, dr2 - fcmp/eq dr0, dr2 - bt f13b - fail -f13b: - add #8, r1 - cmp/eq r0, r1 - bt fmov14 - fail - -fmov14: # Test fr -> @(r0,rn), @(r0, rn) -> fr. - init - _clrsz - _clrpr - mov #40, r0 - shll8 r0 - mov #0, r1 - fmov fr0, @(r0, r1) - fmov @(r0, r1), fr1 - fcmp/eq fr0, fr1 - bt fmov15 - fail - -fmov15: # Test dr -> @(r0, rn), @(r0, rn) -> dr. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - mov #0, r1 - fmov dr0, @(r0, r1) - fmov @(r0, r1), dr2 - fcmp/eq dr0, dr2 - bt fmov16 - fail - -fmov16: # Test xd -> @(r0, rn), @(r0, rn) -> xd. - init - _setsz - _setpr - mov #40, r0 - shll8 r0 - mov #0, r1 - fmov dr0, xd0 - fmov xd0, @(r0, r1) - fmov @(r0, r1), xd2 - fmov xd2, dr2 - fcmp/eq dr0, dr2 - bt okay - fail - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/fmul.cgs b/sim/testsuite/sim/sh64/compact/fmul.cgs deleted file mode 100644 index a1325d63..0000000 --- a/sim/testsuite/sim/sh64/compact/fmul.cgs +++ /dev/null @@ -1,121 +0,0 @@ -# sh testcase for fmul -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - .macro init - fldi0 fr0 - fldi1 fr1 - fldi1 fr2 - fadd fr2, fr2 - fldi0 fr7 - fldi1 fr8 - .endm - - start - - # 0.0 * 0.0 = 0.0. - init - fmul fr0, fr0 - fcmp/eq fr7, fr0 - bf wrong - - # 0.0 * 1.0 = 0.0. - init - fmul fr1, fr0 - fcmp/eq fr7, fr0 - bf wrong - - # 1.0 * 0.0 = 0.0. - init - fmul fr0, fr1 - fcmp/eq fr7, fr1 - bf wrong - - # 1.0 * 1.0 = 1.0. - init - fmul fr1, fr1 - fcmp/eq fr8, fr1 - bf wrong - - # 2.0 * 1.0 = 2.0. - init - fmul fr2, fr1 - fcmp/eq fr2, fr1 - bf wrong - - bra double - nop - -wrong: - fail - - .macro dinit - fldi0 fr0 - fldi1 fr2 - fldi1 fr4 - fadd fr4, fr4 - fldi0 fr8 - fldi1 fr10 - _s2d fr0, dr0 - _s2d fr2, dr2 - _s2d fr4, dr4 - _s2d fr8, dr8 - _s2d fr10, dr10 - .endm - -double: - # 0.0 * 0.0 = 0.0. - dinit - _setpr - fmul dr0, dr0 - fcmp/eq dr8, dr0 - bf wrong - _clrpr - - # 0.0 * 1.0 = 0.0. - dinit - _setpr - fmul dr2, dr0 - fcmp/eq dr8, dr0 - bf wrong2 - _clrpr - - # 1.0 * 0.0 = 0.0. - dinit - _setpr - fmul dr0, dr2 - fcmp/eq dr8, dr2 - bf wrong2 - _clrpr - - bra next - nop - -wrong2: - fail - -next: - # 1.0 * 1.0 = 1.0. - dinit - _setpr - fmul dr2, dr2 - fcmp/eq dr10, dr2 - bf wrong3 - _clrpr - - # 2.0 * 1.0 = 2.0. - dinit - _setpr - fmul dr4, dr2 - fcmp/eq dr4, dr2 - bf wrong3 - _clrpr - -okay: - pass - -wrong3: - fail diff --git a/sim/testsuite/sim/sh64/compact/fneg.cgs b/sim/testsuite/sim/sh64/compact/fneg.cgs deleted file mode 100644 index 71fc901..0000000 --- a/sim/testsuite/sim/sh64/compact/fneg.cgs +++ /dev/null @@ -1,83 +0,0 @@ -# sh testcase for fneg -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # neg(0.0) = 0.0. - fldi0 fr0 - fldi0 fr1 - fneg fr0 - fcmp/eq fr0, fr1 - bf wrong - - # neg(1.0) = fsub(0,1) - fldi1 fr0 - fneg fr0 - fldi0 fr1 - fldi1 fr2 - fsub fr2, fr1 - fcmp/eq fr0, fr1 - bf wrong - - # neg(neg(1.0)) = 1.0. - fldi1 fr0 - fldi1 fr1 - fneg fr0 - fneg fr0 - fcmp/eq fr0, fr1 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # neg(0.0) = 0.0. - fldi0 fr0 - fldi0 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fneg dr0 - fcmp/eq dr0, dr2 - bf wrong2 - _clrpr - - # neg(1.0) = fsub(0,1) - fldi1 fr0 - _s2d fr0, dr0 - _setpr - fneg dr0 - _clrpr - fldi0 fr2 - fldi1 fr3 - fsub fr3, fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq fr0, fr2 - bf wrong2 - _clrpr - - # neg(neg(1.0)) = 1.0. - fldi1 fr0 - _s2d fr0, dr0 - fldi1 fr2 - _s2d fr2, dr2 - _setpr - fneg dr0 - fneg dr2 - fcmp/eq dr0, dr2 - bf wrong2 - _clrpr - -okay: - pass - -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/frchg.cgs b/sim/testsuite/sim/sh64/compact/frchg.cgs deleted file mode 100644 index 6f2e743..0000000 --- a/sim/testsuite/sim/sh64/compact/frchg.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for frchg -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - frchg - frchg - frchg - frchg - pass diff --git a/sim/testsuite/sim/sh64/compact/fschg.cgs b/sim/testsuite/sim/sh64/compact/fschg.cgs deleted file mode 100644 index 54a1491..0000000 --- a/sim/testsuite/sim/sh64/compact/fschg.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for fschg -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - fschg - fschg - fschg - fschg - pass diff --git a/sim/testsuite/sim/sh64/compact/fsqrt.cgs b/sim/testsuite/sim/sh64/compact/fsqrt.cgs deleted file mode 100644 index 933e112..0000000 --- a/sim/testsuite/sim/sh64/compact/fsqrt.cgs +++ /dev/null @@ -1,93 +0,0 @@ -# sh testcase for fsqrt -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # sqrt(0.0) = 0.0. - fldi0 fr0 - fsqrt fr0 - fldi0 fr1 - fcmp/eq fr0, fr1 - bf wrong - - # sqrt(1.0) = 1.0. - fldi1 fr0 - fsqrt fr0 - fldi1 fr1 - fcmp/eq fr0, fr1 - bf wrong - - # sqrt(4.0) = 2.0 - fldi1 fr0 - # Double it. - fadd fr0, fr0 - # Double it again. - fadd fr0, fr0 - fsqrt fr0 - fldi1 fr1 - # Double it. - fadd fr1, fr1 - fcmp/eq fr0, fr1 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # sqrt(0.0) = 0.0. - fldi0 fr0 - _s2d fr0, dr0 - _setpr - fsqrt dr0 - _clrpr - fldi0 fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq dr0, dr2 - bf wrong2 - _clrpr - - # sqrt(1.0) = 1.0. - fldi1 fr0 - _s2d fr0, dr0 - _setpr - fsqrt dr0 - _clrpr - fldi1 fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq fr0, fr2 - bf wrong2 - _clrpr - - # sqrt(4.0) = 2.0. - fldi1 fr0 - # Double it. - fadd fr0, fr0 - # Double it again. - fadd fr0, fr0 - _s2d fr0, dr0 - _setpr - fsqrt dr0 - _clrpr - fldi1 fr2 - # Double it. - fadd fr2, fr2 - _s2d fr2, dr2 - _setpr - fcmp/eq fr0, fr2 - bf wrong2 - _clrpr - -okay: - pass - -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/fsts.cgs b/sim/testsuite/sim/sh64/compact/fsts.cgs deleted file mode 100644 index 518533d..0000000 --- a/sim/testsuite/sim/sh64/compact/fsts.cgs +++ /dev/null @@ -1,11 +0,0 @@ -# sh testcase for fsts fpul, $frn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - fsts fpul, fr0 - fsts fpul, fr1 - pass diff --git a/sim/testsuite/sim/sh64/compact/fsub.cgs b/sim/testsuite/sim/sh64/compact/fsub.cgs deleted file mode 100644 index 346d01f..0000000 --- a/sim/testsuite/sim/sh64/compact/fsub.cgs +++ /dev/null @@ -1,120 +0,0 @@ -# sh testcase for fmul -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - # 0.0 - 0.0 = 0.0. - fldi0 fr0 - fldi0 fr1 - fsub fr0, fr1 - fldi0 fr2 - fcmp/eq fr1, fr2 - bf wrong - - # 1.0 - 0.0 = 1.0. - fldi0 fr0 - fldi1 fr1 - fsub fr0, fr1 - fldi1 fr2 - fcmp/eq fr1, fr2 - bf wrong - - # 1.0 - 1.0 = 0.0. - fldi1 fr0 - fldi1 fr1 - fsub fr0, fr1 - fldi0 fr2 - fcmp/eq fr1, fr2 - bf wrong - - # 0.0 - 1.0 = -1.0. - fldi1 fr0 - fldi0 fr1 - fsub fr0, fr1 - fldi1 fr2 - fneg fr2 - fcmp/eq fr1, fr2 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # 0.0 - 0.0 = 0.0. - fldi0 fr0 - fldi0 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fsub dr0, dr2 - _clrpr - fldi0 fr4 - _s2d fr4, dr4 - _setpr - fcmp/eq dr2, dr4 - bf wrong - _clrpr - -onezero: - # 1.0 - 0.0 = 1.0. - fldi0 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fsub dr0, dr2 - _clrpr - fldi1 fr4 - _s2d fr4, dr4 - _setpr - fcmp/eq dr2, dr4 - bf wrong2 - _clrpr - -oneone: - # 1.0 - 1.0 = 0.0. - fldi1 fr0 - fldi1 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fsub dr0, dr2 - _clrpr - fldi0 fr4 - _s2d fr4, dr4 - _setpr - fcmp/eq dr2, dr4 - bf wrong2 - _clrpr - - bra zeroone - nop - -wrong2: - fail - -zeroone: - # 0.0 - 1.0 = -1.0. - fldi1 fr0 - fldi0 fr2 - _s2d fr0, dr0 - _s2d fr2, dr2 - _setpr - fsub dr0, dr2 - _clrpr - fldi1 fr4 - fneg fr4 - _s2d fr4, dr4 - _setpr - fcmp/eq dr2, dr4 - bf wrong2 - _clrpr - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/ftrc.cgs b/sim/testsuite/sim/sh64/compact/ftrc.cgs deleted file mode 100644 index 6a89744..0000000 --- a/sim/testsuite/sim/sh64/compact/ftrc.cgs +++ /dev/null @@ -1,132 +0,0 @@ -# sh testcase for ftrc -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # ftrc(0.0) = 0. - fldi0 fr0 - ftrc fr0, fpul - # check results. - mov #0, r0 - sts fpul, r1 - cmp/eq r0, r1 - bf wrong - - # ftrc(1.5) = 1. - fldi1 fr0 - fldi1 fr1 - fldi1 fr2 - # double it. - fadd fr2, fr2 - # form the fraction. - fdiv fr2, fr1 - fadd fr1, fr0 - # now we've got 1.5 in fr0. - ftrc fr0, fpul - # check results. - mov #1, r0 - sts fpul, r1 - cmp/eq r0, r1 - bf wrong - - # ftrc(-1.5) = -1. - fldi1 fr0 - fneg fr0 - fldi1 fr1 - fldi1 fr2 - # double it. - fadd fr2, fr2 - # form the fraction. - fdiv fr2, fr1 - fneg fr1 - # -1 + -0.5 = -1.5. - fadd fr1, fr0 - # now we've got 1.5 in fr0. - ftrc fr0, fpul - # check results. - mov #1, r0 - neg r0, r0 - sts fpul, r1 - cmp/eq r0, r1 - bf wrong - - bra double - nop - -wrong: - fail - -double: - # ftrc(0.0) = 0. - fldi0 fr0 - _s2d fr0, dr0 - _setpr - ftrc dr0, fpul - _clrpr - # check results. - mov #0, r0 - sts fpul, r1 - cmp/eq r0, r1 -foo: - bf wrong2 - - # ftrc(1.5) = 1. - fldi1 fr0 - fldi1 fr2 - fldi1 fr4 - # double it. - fadd fr4, fr4 - # form 0.5. - fdiv fr4, fr2 - fadd fr2, fr0 - # now we've got 1.5 in fr0, so do some single->double - # conversions and perform the ftrc. - _s2d fr0, dr0 - _s2d fr2, dr2 - _s2d fr4, dr4 - _setpr - ftrc dr0, fpul - _clrpr - - # check results. - mov #1, r0 - sts fpul, r1 - cmp/eq r0, r1 - bf wrong2 - - # ftrc(-1.5) = -1. - fldi1 fr0 - fneg fr0 - fldi1 fr2 - fldi1 fr4 - # double it. - fadd fr4, fr4 - # form the fraction. - fdiv fr4, fr2 - fneg fr2 - # -1 + -0.5 = -1.5. - fadd fr2, fr0 - # now we've got 1.5 in fr0, so do some single->double - # conversions and perform the ftrc. - _s2d fr0, dr0 - _s2d fr2, dr2 - _s2d fr4, dr4 - _setpr - ftrc dr0, fpul - _clrpr - - # check results. - mov #1, r0 - neg r0, r0 - sts fpul, r1 - cmp/eq r0, r1 - bf wrong2 - -okay: - pass -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/ftrv.cgs b/sim/testsuite/sim/sh64/compact/ftrv.cgs deleted file mode 100644 index 9bdf806..0000000 --- a/sim/testsuite/sim/sh64/compact/ftrv.cgs +++ /dev/null @@ -1,74 +0,0 @@ -# sh testcase for ftrv xmtrx, $fvn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - # set the fr bit in the fpscr - .macro _setfr - sts fpscr, r7 - mov #32, r8 - shll16 r8 - or r8, r7 - lds r7, fpscr - .endm - - # clear the fr bit - .macro _clrfr - sts fpscr, r7 - mov #32, r8 - shll16 r8 - not r8, r8 - and r8, r7 - lds r7, fpscr - .endm - - .macro incr old new - fldi1 \new - fadd \old, \new - .endm - - start - _setfr -popmtrx: - # 1.0. - fldi1 fr0 - # 2.0. - fldi1 fr1 - fadd fr1, fr1 - - incr fr1, fr2 - incr fr2, fr3 - incr fr3, fr4 - incr fr4, fr5 - incr fr5, fr6 - incr fr6, fr7 - incr fr7, fr8 - incr fr8, fr9 - incr fr9, fr10 - incr fr10, fr11 - incr fr11, fr12 - incr fr12, fr13 - incr fr13, fr14 - incr fr14, fr15 - -popvect: - # Swtich fp banks. - _clrfr - fldi1 fr4 - fldi1 fr5 - fadd fr5, fr5 - fldi1 fr6 - fadd fr5, fr6 - fldi1 fr7 - fadd fr6, fr7 - -ftrv: - # fr[4,7] should contain the results: - # { 30, 70, 110, 150 }. - ftrv xmtrx, fv4 - -okay: - pass - diff --git a/sim/testsuite/sim/sh64/compact/jmp.cgs b/sim/testsuite/sim/sh64/compact/jmp.cgs deleted file mode 100644 index e9e9940..0000000 --- a/sim/testsuite/sim/sh64/compact/jmp.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for jmp @$rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global jmp -jmp: - # Load 0x1010 into r0. - mov #1, r0 - shll8 r0 - shll2 r0 - shll2 r0 - add #16, r0 - jmp @r0 -slot: - nop -bad: - fail -okay: - pass -alsobad: - fail - fail - fail - diff --git a/sim/testsuite/sim/sh64/compact/jsr.cgs b/sim/testsuite/sim/sh64/compact/jsr.cgs deleted file mode 100644 index 5ad7aef..0000000 --- a/sim/testsuite/sim/sh64/compact/jsr.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for jsr @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global jsr -jsr: - # Load 0x1010 into r0. - mov #1, r0 - shll8 r0 - shll2 r0 - shll2 r0 - add #16, r0 - jsr @r0 -slot: - nop -bad: - fail -okay: - pass -alsobad: - fail - fail - fail - diff --git a/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs deleted file mode 100644 index b19a3c1..0000000 --- a/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for ldc $rn, gbr -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldc -ldc: - mov #40, r0 - shll8 r0 - ldc r0, gbr - stc gbr, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs deleted file mode 100644 index 613e58e..0000000 --- a/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for ldc.l @${rn}+, gbr -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldcl -ldcl: - mov #40, r0 - shll8 r0 - # Preserve address. - mov r0, r1 - ldc.l @r0+, gbr - - # Add 4 to saved address (r1). - # Then compare with r0. - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs b/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs deleted file mode 100644 index 2dce253..0000000 --- a/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for lds $rn, fpscr -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global lds_fpscr -lds_fpscr: - mov #0, r0 - lds r0, fpscr -readback: - sts fpscr, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/lds-fpul.cgs b/sim/testsuite/sim/sh64/compact/lds-fpul.cgs deleted file mode 100644 index 1a80a70..0000000 --- a/sim/testsuite/sim/sh64/compact/lds-fpul.cgs +++ /dev/null @@ -1,17 +0,0 @@ -# sh testcase for lds $rn, fpul -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global lds_fpul -lds_fpul: - mov #63, r0 - shll8 r0 - add #128, r0 - shll16 r0 - lds r0, fpul - pass diff --git a/sim/testsuite/sim/sh64/compact/lds-mach.cgs b/sim/testsuite/sim/sh64/compact/lds-mach.cgs deleted file mode 100644 index 1ffd656..0000000 --- a/sim/testsuite/sim/sh64/compact/lds-mach.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for lds $rn, mach -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global lds_mach -lds_mach: - mov #41, r0 - shll8 r0 - lds r0, mach -readback: - sts mach, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/lds-macl.cgs b/sim/testsuite/sim/sh64/compact/lds-macl.cgs deleted file mode 100644 index f09315a..0000000 --- a/sim/testsuite/sim/sh64/compact/lds-macl.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for lds $rn, macl -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global lds_macl -lds_macl: - mov #42, r0 - shll8 r0 - lds r0, macl -readback: - sts macl, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/lds-pr.cgs b/sim/testsuite/sim/sh64/compact/lds-pr.cgs deleted file mode 100644 index 97e3a65..0000000 --- a/sim/testsuite/sim/sh64/compact/lds-pr.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for lds $rn, pr -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global lds_pr -lds_pr: - mov #40, r0 - shll8 r0 - lds r0, pr -readback: - sts pr, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs deleted file mode 100644 index 642f15d..0000000 --- a/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for lds.l @${rn}+, fpscr -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #40, r0 - shll8 r0 - # save address for later examination. - mov r0, r1 - - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - # Store it in memory. - mov.l r2, @r0 - - lds.l @r0+, fpscr - -check: - # Read it back. - sts fpscr, r3 - cmp/eq r2, r3 - bf wrong - -inc: - # Test for proper post-increment. - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs deleted file mode 100644 index 428a5b7..0000000 --- a/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for lds.l @${rn}+, fpul -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldsl_fpul -ldsl_fpul: - mov #40, r0 - shll8 r0 - # remember the address. - mov r0, r1 - lds.l @r0+, fpul - - # ensure post increment occurred. - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs b/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs deleted file mode 100644 index f5ffdec..0000000 --- a/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for lds.l @${rn}+, mach -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldsl_mach -ldsl_mach: - mov #40, r0 - shll8 r0 - # save address for later examination. - mov r0, r1 - - lds.l @r0+, mach - - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs b/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs deleted file mode 100644 index 4e21bf1..0000000 --- a/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for lds.l @${rn}+, macl -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldsl_macl -ldsl_macl: - mov #40, r0 - shll8 r0 - # save address for later examination. - mov r0, r1 - - lds.l @r0+, macl - - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs deleted file mode 100644 index eb8ee53..0000000 --- a/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for lds.l @${rn}+, pr -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ldsl_pr -ldsl_pr: - mov #40, r0 - shll8 r0 - # Preserve address. - mov r0, r1 - lds.l @r0+, pr - - # Add 4 to saved address (r1). - # Then compare with r0. - add #4, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/macl.cgs b/sim/testsuite/sim/sh64/compact/macl.cgs deleted file mode 100644 index ef2dfa6..0000000 --- a/sim/testsuite/sim/sh64/compact/macl.cgs +++ /dev/null @@ -1,76 +0,0 @@ -# sh testcase for mac.l @${rm}+, @${rn}+ -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - # force S-bit clear - clrs - - # Store some magic numbers in memory. - mov #40, r1 - shll8 r1 - mov #85, r0 - mov.l r0, @r1 - # Keep for later. - mov r1, r10 -store2: - mov #40, r1 - shll8 r1 - add #12, r1 - mov #17, r0 - mov.l r0, @r1 - # Keep for later. - mov r1, r11 - -init: - # Set up addresses. - mov #40, r1 - shll8 r1 - mov #40, r2 - shll8 r2 - add #12, r2 - - # Prime {MACL, MACH} to #1. - mov #1, r3 - dmulu.l r3, r3 - -test: - mac.l @r1+, @r2+ - -check: - # Check result. - sts mach, r5 - assert r5, #0 - - mov #5, r0 - shll8 r0 - or #166, r0 - sts macl, r6 - cmp/eq r6, r0 - bf wrong - - # Ensure post-increment occurred. - add #4, r10 - cmp/eq r10, r1 - bf wrong - - add #4, r11 - cmp/eq r11, r2 - bf wrong - -doubleinc: - mov #40, r0 - shll8 r0 - mov r0, r1 - mac.l @r0+, @r0+ - add #16, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/macw.cgs b/sim/testsuite/sim/sh64/compact/macw.cgs deleted file mode 100644 index f5935f7..0000000 --- a/sim/testsuite/sim/sh64/compact/macw.cgs +++ /dev/null @@ -1,70 +0,0 @@ -# sh testcase for mac.w @${rm}+, @${rn}+ -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # Store some magic numbers in memory. - mov #40, r1 - shll8 r1 - mov #85, r0 - mov.l r0, @r1 - # Keep for later. - mov r1, r10 -store2: - mov #40, r1 - shll8 r1 - add #12, r1 - mov #17, r0 - mov.l r0, @r1 - # Keep for later. - mov r1, r11 - -init: - # Set up addresses. - mov #40, r1 - shll8 r1 - mov #40, r2 - shll8 r2 - add #12, r2 - - # Prime {MACL, MACH} to #1. - mov #1, r3 - dmulu.l r3, r3 - -test: - mac.w @r1+, @r2+ - -check: - # Check result. - sts mach, r5 - assert r5, #0 - - sts macl, r6 - assert r6, #1 - - # Ensure post-increment occurred. - add #2, r10 - cmp/eq r10, r1 - bf wrong - - add #2, r11 - cmp/eq r11, r2 - bf wrong - -doubleinc: - mov #40, r0 - shll8 r0 - mov r0, r1 - mac.w @r0+, @r0+ - add #8, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/mov.cgs b/sim/testsuite/sim/sh64/compact/mov.cgs deleted file mode 100644 index 9442388..0000000 --- a/sim/testsuite/sim/sh64/compact/mov.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for mov $rm64, $rn64 -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global mov -mov: - mov #1, r0 - rotr r0 - mov #0, r15 - mov #10, r0 - - mov r0, r1 - mov r1, r2 - mov r2, r3 - mov r3, r4 - mov r4, r5 - mov r5, r6 - mov r6, r7 - mov r7, r8 - mov r8, r9 - mov r9, r10 - mov r10, r11 - mov r11, r12 - mov r12, r13 - mov r13, r14 - mov r14, r15 - - cmp/eq r0, r15 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/mova.cgs b/sim/testsuite/sim/sh64/compact/mova.cgs deleted file mode 100644 index f555d66..0000000 --- a/sim/testsuite/sim/sh64/compact/mova.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for mova @($imm8x4, pc), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global mova -mova: - mova @(40, pc), r0 - mov #16, r1 - shll8 r1 - add #40, r1 - cmp/eq r0, r1 - bf wrong - mova @(12, pc), r0 - mov #16, r1 - shll8 r1 - add #24, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb1.cgs b/sim/testsuite/sim/sh64/compact/movb1.cgs deleted file mode 100644 index 8278e1b..0000000 --- a/sim/testsuite/sim/sh64/compact/movb1.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for mov.b $rm, @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #55, r1 - mov #40, r2 - shll8 r2 - mov.b r1, @r2 - - # Load it back into r3. - mov #40, r2 - shll8 r2 - mov.b @r2, r3 - - # Make sure r1 and r3 match. - cmp/eq r1, r3 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb10.cgs b/sim/testsuite/sim/sh64/compact/movb10.cgs deleted file mode 100644 index 0ddb736..0000000 --- a/sim/testsuite/sim/sh64/compact/movb10.cgs +++ /dev/null @@ -1,25 +0,0 @@ -# sh testcase for mov.b @($imm4, $rm), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 - # Store something there first. - mov #0, r0 - or #170, r0 - mov r0, r7 - mov.b r0, @(3, r1) - # Load it back. - mov.b @(3, r1), r0 - and #255, r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb2.cgs b/sim/testsuite/sim/sh64/compact/movb2.cgs deleted file mode 100644 index 692c34f..0000000 --- a/sim/testsuite/sim/sh64/compact/movb2.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for mov.b $rm, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #40, r1 - shll8 r1 - mov #55, r2 - - # Save ADDR, DATA. - mov r1, r7 - mov r2, r8 - - # Do the move. - mov.b r2, @-r1 - - # Load the value back into r3. - mov.b @r1, r3 - cmp/eq r2, r3 - bf wrong - - # Ensure that r1 has been decremented. - mov #1, r0 - sub r0, r7 - cmp/eq r7, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb3.cgs b/sim/testsuite/sim/sh64/compact/movb3.cgs deleted file mode 100644 index 6143562..0000000 --- a/sim/testsuite/sim/sh64/compact/movb3.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for mov.b $rm, @(r0,$rn) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #40, r2 - shll8 r2 - mov #3, r1 - mov #0, r0 - or #170, r0 - mov r0, r3 - mov r2, r0 - mov.b r3, @(r0, r1) - - # Load the value back into a different register. - mov.b @(r0, r1), r4 - # Check the lowest order byte matches the stored value. - mov r4, r0 - and #255, r0 - cmp/eq r0, r3 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb4.cgs b/sim/testsuite/sim/sh64/compact/movb4.cgs deleted file mode 100644 index d30a7a8..0000000 --- a/sim/testsuite/sim/sh64/compact/movb4.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for mov.b r0, @($imm8, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #0, r0 - or #170, r0 - mov r0, r3 - mov #30, r2 - ldc r2, gbr - mov.b r0, @(40, gbr) - - # Load the value back into a different register. - mov.b @(40, gbr), r0 - # Check the lowest order byte matches the stored value. - and #255, r0 - cmp/eq r0, r3 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movb5.cgs b/sim/testsuite/sim/sh64/compact/movb5.cgs deleted file mode 100644 index 4f6795a..0000000 --- a/sim/testsuite/sim/sh64/compact/movb5.cgs +++ /dev/null @@ -1,25 +0,0 @@ -# sh testcase for mov.b r0, @($imm4, rm) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #0, r0 - or #170, r0 - mov r0, r3 - mov #30, r2 - mov.b r0, @(3, r2) - - # Load the value back into a different register. - mov.b @(3, r2), r0 - and #255, r0 - cmp/eq r3, r0 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movb6.cgs b/sim/testsuite/sim/sh64/compact/movb6.cgs deleted file mode 100644 index 9ddebde..0000000 --- a/sim/testsuite/sim/sh64/compact/movb6.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for mov.b @$rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r2 - shll8 r2 - # Store something first. - mov #0, r0 - or #170, r0 - mov r0, r7 - mov.b r7, @r2 - # Load it back. - mov.b @r2, r1 - mov r1, r0 - and #255, r0 - cmp/eq r7, r0 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb7.cgs b/sim/testsuite/sim/sh64/compact/movb7.cgs deleted file mode 100644 index f55a223..0000000 --- a/sim/testsuite/sim/sh64/compact/movb7.cgs +++ /dev/null @@ -1,35 +0,0 @@ -# sh testcase for mov.b @${rm}+, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 - # Store addr. - mov r1, r8 - - # Store something there first. - mov #0, r0 - or #170, r0 - mov r0, r7 - mov.b r7, @r1 - # Load it back. - mov.b @r1+, r2 - mov r2, r0 - and #255, r0 - cmp/eq r7, r0 - bf wrong - - # Test address for post-incrementing. - add #1, r8 - cmp/eq r8, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movb8.cgs b/sim/testsuite/sim/sh64/compact/movb8.cgs deleted file mode 100644 index 883e4b3..0000000 --- a/sim/testsuite/sim/sh64/compact/movb8.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for mov.b @(r0, $rm), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - mov #14, r1 - # Store something there first. - mov #0, r0 - or #170, r0 - mov r0, r7 - mov.b r7, @(r0, r1) - # Load it back. - mov.b @(r0, r1), r2 - mov r2, r0 - and #255, r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movb9.cgs b/sim/testsuite/sim/sh64/compact/movb9.cgs deleted file mode 100644 index 3ad1b46..0000000 --- a/sim/testsuite/sim/sh64/compact/movb9.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for mov.b @($imm8, gbr), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - ldc r0, gbr - # Store something there first. - mov #0, r0 - or #170, r0 - mov r0, r7 - mov.b r0, @(3, gbr) - # Load it back. - mov.b @(3, gbr), r0 - and #255, r0 - cmp/eq r7, r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movcal.cgs b/sim/testsuite/sim/sh64/compact/movcal.cgs deleted file mode 100644 index 7aac57e..0000000 --- a/sim/testsuite/sim/sh64/compact/movcal.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for movca.l r0, @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global movcal -movcal: - mov #1, r0 - rotr r0 - add #128, r0 - mov #40, r1 - shll8 r1 - movca.l r0, @r1 - - # Load the word back in. - mov.l @r1, r3 - cmp/eq r0, r3 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movi.cgs b/sim/testsuite/sim/sh64/compact/movi.cgs deleted file mode 100644 index bc72c1b..0000000 --- a/sim/testsuite/sim/sh64/compact/movi.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for mov #$imm8, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global movi -movi: - mov #0, r0 - cmp/eq #0, r0 - bf wrong - - mov #1, r0 - cmp/eq #1, r0 - bf wrong - - mov #255, r0 - cmp/eq #255, r0 - bf wrong - - mov #1, r15 - mov #1, r0 - cmp/eq r0, r15 - bf wrong - - mov #255, r15 - mov r15, r0 - cmp/eq r0, r15 - bf wrong - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movl1.cgs b/sim/testsuite/sim/sh64/compact/movl1.cgs deleted file mode 100644 index 7d85c38..0000000 --- a/sim/testsuite/sim/sh64/compact/movl1.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for mov.l $rm, @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - - mov.l r2, @r1 - - # Load it back. - mov.l @r1, r3 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl10.cgs b/sim/testsuite/sim/sh64/compact/movl10.cgs deleted file mode 100644 index 5e9cf2d..0000000 --- a/sim/testsuite/sim/sh64/compact/movl10.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for mov.l @($imm8x4, pc), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - - # Store to memory. - mov #16, r1 - shll8 r1 - add #32, r1 - mov.l r2, @r1 -check: - # Read it back. - mov.l @(12, pc), r0 - cmp/eq r2, r0 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl11.cgs b/sim/testsuite/sim/sh64/compact/movl11.cgs deleted file mode 100644 index 32c763d..0000000 --- a/sim/testsuite/sim/sh64/compact/movl11.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for mov.l @($imm4x4, $rm), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - # Store something first. - mov.l r2, @(12, r0) - -check: - # Read it back. - mov.l @(12, r0), r1 - cmp/eq r2, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movl2.cgs b/sim/testsuite/sim/sh64/compact/movl2.cgs deleted file mode 100644 index bb55061..0000000 --- a/sim/testsuite/sim/sh64/compact/movl2.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for mov.l $rm, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r1 - shll8 r1 - # Save address. - mov r1, r7 - -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - mov.l r2, @-r1 - -check: - # Compare the value loaded into another reg. - mov.l @r1, r3 - cmp/eq r2, r3 - bf wrong - -dec: - # Ensure address is decremented. - mov #4, r6 - sub r6, r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl3.cgs b/sim/testsuite/sim/sh64/compact/movl3.cgs deleted file mode 100644 index 6205de7..0000000 --- a/sim/testsuite/sim/sh64/compact/movl3.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for mov.l $rm, @(r0, $rn) -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -setaddr: - mov #0, r0 - mov #30, r1 - shll8 r1 - -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - shll8 r2 - add #85, r2 - shll8 r2 - add #170, r2 - - mov.l r2, @(r0, r1) - -check: - # Load it back. - mov.l @(r0, r1), r3 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl4.cgs b/sim/testsuite/sim/sh64/compact/movl4.cgs deleted file mode 100644 index 4444094..0000000 --- a/sim/testsuite/sim/sh64/compact/movl4.cgs +++ /dev/null @@ -1,38 +0,0 @@ -# sh testcase for mov.l r0, @($imm8x4, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -setaddr: - mov #30, r1 - shll8 r1 - ldc r1, gbr - -init: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #170, r0 - # Preserve. - mov r0, r7 - - mov.l r0, @(4, gbr) -check: - # Load it back. - mov.l @(4, gbr), r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movl5.cgs b/sim/testsuite/sim/sh64/compact/movl5.cgs deleted file mode 100644 index 897ebef..0000000 --- a/sim/testsuite/sim/sh64/compact/movl5.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for mov.l $rm, @($imm4x4, $rn) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -setaddr: - mov #30, r1 - shll8 r1 - -init: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #170, r0 - # Preserve. - mov r0, r7 - - mov.l r0, @(4, r1) -check: - # Load it back. - mov.l @(4, r1), r0 - cmp/eq r7, r0 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl6.cgs b/sim/testsuite/sim/sh64/compact/movl6.cgs deleted file mode 100644 index 42f63b2..0000000 --- a/sim/testsuite/sim/sh64/compact/movl6.cgs +++ /dev/null @@ -1,25 +0,0 @@ -# sh testcase for mov.l @$rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r0 - shll8 r0 - # Store something there first. - mov #170, r1 - mov.l r1, @r0 -check: - # Load it back. - mov.l @r0, r3 - cmp/eq r1, r3 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movl7.cgs b/sim/testsuite/sim/sh64/compact/movl7.cgs deleted file mode 100644 index b6c12fc..0000000 --- a/sim/testsuite/sim/sh64/compact/movl7.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for mov.l @$rm+, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r0 - shll8 r0 - # Preserve address. - mov r0, r7 - # Store something first. - mov #170, r3 - mov.l r3, @r0 - - mov.l @r0+, r1 -check: - cmp/eq r1, r3 - bf wrong - - # Ensure address is post-incremented. - add #4, r7 - cmp/eq r7, r0 - bf wrong - -equal: - # Test rm = rn. - mov #30, r0 - shll8 r0 - mov.l @r0+, r0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl8.cgs b/sim/testsuite/sim/sh64/compact/movl8.cgs deleted file mode 100644 index a6cd932..0000000 --- a/sim/testsuite/sim/sh64/compact/movl8.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for mov.l @(r0, $rm), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #0, r0 - mov #30, r1 - shll8 r1 - # Store something there first. - mov #170, r3 - mov.l r3, @(r0, r1) -check: - # Load it back. - mov.l @(r0, r1), r2 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movl9.cgs b/sim/testsuite/sim/sh64/compact/movl9.cgs deleted file mode 100644 index 4fa07b0..0000000 --- a/sim/testsuite/sim/sh64/compact/movl9.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for mov.l @($imm8x4, gbr), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 - ldc r1, gbr - # Store something there first. - mov #170, r0 - mov r0, r7 - mov.l r0, @(12, gbr) -check: - # Load it back. - mov.l @(12, gbr), r0 - cmp/eq r0, r7 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movt.cgs b/sim/testsuite/sim/sh64/compact/movt.cgs deleted file mode 100644 index 4553981..0000000 --- a/sim/testsuite/sim/sh64/compact/movt.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for movt $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global movt -init: - sett - movt r1 - assert r1, #1 -clear: - clrt - movt r1 - assert r1, #0 -set: - sett - movt r1 - assert r1, #1 - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw1.cgs b/sim/testsuite/sim/sh64/compact/movw1.cgs deleted file mode 100644 index 5d55a58..0000000 --- a/sim/testsuite/sim/sh64/compact/movw1.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for mov.w $rm, @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r1 - shll8 r1 -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - mov.w r2, @r1 -check: - # Read it back. - mov.w @r1, r3 - shll16 r2 - shll16 r3 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movw10.cgs b/sim/testsuite/sim/sh64/compact/movw10.cgs deleted file mode 100644 index 5bab911..0000000 --- a/sim/testsuite/sim/sh64/compact/movw10.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for mov.w @($imm8x2, pc), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - - # Store to memory. - mov #16, r1 - shll8 r1 - add #32, r1 - mov.w r2, @r1 - -check: - # Read it back. - mov.w @(18, pc), r0 - shll16 r0 - shll16 r2 - cmp/eq r0, r2 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movw11.cgs b/sim/testsuite/sim/sh64/compact/movw11.cgs deleted file mode 100644 index df739fa..0000000 --- a/sim/testsuite/sim/sh64/compact/movw11.cgs +++ /dev/null @@ -1,35 +0,0 @@ -# sh testcase for mov.w @($imm4x2, $rm), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 - - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - - # Preserve r0. - mov r0, r3 - - # Store something first. - mov.w r0, @(12, r1) - -check: - # Read it back. - mov.w @(12, r1), r0 - shll16 r0 - shll16 r3 - cmp/eq r0, r3 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw2.cgs b/sim/testsuite/sim/sh64/compact/movw2.cgs deleted file mode 100644 index 27c29dc..0000000 --- a/sim/testsuite/sim/sh64/compact/movw2.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for mov.w $rm, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r1 - shll8 r1 - # Preserve. - mov r1, r7 -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 -store: - mov.w r2, @-r1 -check: - # Read it back. - mov.w @r1, r3 - shll16 r2 - shll16 r3 - cmp/eq r2, r3 - bf wrong -dec: - add #2, r1 - cmp/eq r7, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movw3.cgs b/sim/testsuite/sim/sh64/compact/movw3.cgs deleted file mode 100644 index d7b39c8..0000000 --- a/sim/testsuite/sim/sh64/compact/movw3.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for mov.w $rm, @(r0, $rn) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #0, r0 - mov #30, r1 - shll8 r1 -init: - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - mov.w r2, @(r0, r1) -check: - # Read it back. - mov.w @(r0, r1), r3 - shll16 r2 - shll16 r3 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw4.cgs b/sim/testsuite/sim/sh64/compact/movw4.cgs deleted file mode 100644 index 4853b50..0000000 --- a/sim/testsuite/sim/sh64/compact/movw4.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for mov.w r0, @($imm8x2, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r0 - shll8 r0 - ldc r0, gbr - -init: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - # Preserve r0. - mov r0, r7 - mov.w r0, @(12, gbr) -check: - mov.w @(12, gbr), r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw5.cgs b/sim/testsuite/sim/sh64/compact/movw5.cgs deleted file mode 100644 index 9b4f84f..0000000 --- a/sim/testsuite/sim/sh64/compact/movw5.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for mov.w r0, @($imm4x2, $rn) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r1 - shll8 r1 - -init: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - # Preserve. - mov r0, r7 -move: - mov.w r0, @(12, r1) -check: - mov.w @(12, r1), r0 - shll16 r0 - shll16 r7 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw6.cgs b/sim/testsuite/sim/sh64/compact/movw6.cgs deleted file mode 100644 index 758497c..0000000 --- a/sim/testsuite/sim/sh64/compact/movw6.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for mov.w @$rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - mov #30, r0 - shll8 r0 - - # Store something first. - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - mov.w r2, @r0 - -check: - # Read it back. - mov.w @r0, r1 - cmp/eq r1, r2 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw7.cgs b/sim/testsuite/sim/sh64/compact/movw7.cgs deleted file mode 100644 index 45f5c09..0000000 --- a/sim/testsuite/sim/sh64/compact/movw7.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for mov.w @${rm}+, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - # Preserve address. - mov r0, r7 - - # Store something first. - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - mov.w r2, @r0 -check: - # Read it back. - mov.w @r0+, r3 - cmp/eq r2, r3 - bf wrong - -inc: - # Ensure address is post-incremented. - add #2, r7 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/movw8.cgs b/sim/testsuite/sim/sh64/compact/movw8.cgs deleted file mode 100644 index 0a7ce3f..0000000 --- a/sim/testsuite/sim/sh64/compact/movw8.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for mov.w @(r0, $rm), $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - mov #10, r1 - - # Store something first. - # Build up a distinctive bit pattern. - mov #1, r2 - shll8 r2 - add #12, r2 - - mov.w r2, @(r0, r1) -check: - # Read it back. - mov.w @(r0, r1), r3 - shll16 r2 - shll16 r3 - cmp/eq r2, r3 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/movw9.cgs b/sim/testsuite/sim/sh64/compact/movw9.cgs deleted file mode 100644 index 1872f06..0000000 --- a/sim/testsuite/sim/sh64/compact/movw9.cgs +++ /dev/null @@ -1,33 +0,0 @@ -# sh testcase for mov.w @($imm8x2, gbr), r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - mov #30, r0 - shll8 r0 - ldc r0, gbr - - # Store something first. - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - # Preserve r0. - mov r0, r7 - mov.w r0, @(12, gbr) - -check: - # Load it back. - mov.w @(12, gbr), r0 - shll16 r0 - shll16 r7 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/mull.cgs b/sim/testsuite/sim/sh64/compact/mull.cgs deleted file mode 100644 index 921141a..0000000 --- a/sim/testsuite/sim/sh64/compact/mull.cgs +++ /dev/null @@ -1,64 +0,0 @@ -# sh testcase for mul.l $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global mull -mull: - mov #3, r0 - mov #5, r1 - mul.l r0, r1 - - # Check the result. - sts macl, r3 - mov #15, r4 - cmp/eq r3, r4 - bf wrong - -lxs: - # Large * small. - mov #255, r0 - mov #0, r1 - mul.l r0, r1 - - # Check the result. - sts macl, r3 - mov #0, r4 - cmp/eq r3, r4 - bf wrong - -sxl: - # Small * large. - mov #0, r0 - mov #255, r1 - mul.l r0, r1 - - # Check the result. - sts macl, r3 - mov #0, r4 - cmp/eq r3, r4 - bf wrong - -lxl: - # Large * large. - mov #1, r0 - neg r0, r0 - mov #2, r1 - mul.l r0, r1 - - # Check the result. - sts macl, r3 - mov #2, r4 - neg r4, r4 - cmp/eq r3, r4 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/mulsw.cgs b/sim/testsuite/sim/sh64/compact/mulsw.cgs deleted file mode 100644 index 05c8a3d..0000000 --- a/sim/testsuite/sim/sh64/compact/mulsw.cgs +++ /dev/null @@ -1,91 +0,0 @@ -# sh testcase for muls.w $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - sts mach, r7 - - .global mulsw -zero: - mov #0, r0 - mov #1, r1 - muls.w r0, r1 - - # Check the result. - sts macl, r3 - mov #0, r4 - cmp/eq r3, r4 - bf wrong - -sxs: - # Small * small. - mov #1, r0 - mov #2, r1 - muls.w r0, r1 - - # Check the result. - sts macl, r3 - mov #2, r4 - cmp/eq r3, r4 - bf wrong - -sxl: - # Small * large. - mov #1, r0 - mov #255, r1 - shll8 r1 - muls.w r0, r1 - - # Check the result. - sts macl, r3 - mov #0, r4 - not r4, r4 - shll8 r4 - cmp/eq r3, r4 - bf wrong - -lxs: - # Large * small. - mov #255, r0 - shll8 r0 - mov #1, r1 - muls.w r0, r1 - - # Check the result. - sts macl, r3 - mov #0, r4 - not r4, r4 - shll8 r4 - cmp/eq r3, r4 - bf wrong - -lxl: - # Large * large. - mov #255, r0 - shll8 r0 - mov #255, r1 - shll8 r1 - muls.w r0, r1 - - # Check the result. - sts macl, r3 - mov #1, r4 - shll16 r4 - cmp/eq r3, r4 - bf wrong - -invariant: - # Ensure MACH is invariant. - sts mach, r8 - cmp/eq r7, r8 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/muluw.cgs b/sim/testsuite/sim/sh64/compact/muluw.cgs deleted file mode 100644 index fa0a334..0000000 --- a/sim/testsuite/sim/sh64/compact/muluw.cgs +++ /dev/null @@ -1,96 +0,0 @@ -# sh testcase for mulu.w $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - sts mach, r7 - - .global mulsw -zero: - mov #0, r0 - mov #1, r1 - mulu.w r0, r1 - - # Check the result. - sts macl, r1 - mov #0, r0 - cmp/eq r0, r1 - bf wrong - -sxs: - # Small * small. - mov #1, r0 - mov #2, r1 - mulu.w r0, r1 - - # Check the result. - sts macl, r1 - mov #2, r0 - cmp/eq r0, r1 - bf wrong - -sxl: - # Small * large. - mov #1, r1 - mov #0, r0 - or #255, r0 - shll8 r0 - mulu.w r1, r0 - - # Check the result. - sts macl, r1 - mov #0, r0 - or #255, r0 - shll8 r0 - cmp/eq r0, r1 - bf wrong - -lxs: - # Large * small. - mov #0, r0 - or #255, r0 - shll8 r0 - mov #1, r1 - mulu.w r0, r1 - - # Check the result. - sts macl, r1 - mov #0, r0 - or #255, r0 - shll8 r0 - cmp/eq r0, r1 - bf wrong - -lxl: - # Large * large. - mov #0, r0 - or #255, r0 - shll8 r0 - mov r0, r1 - mulu.w r0, r1 - - # Check the result. - sts macl, r1 - mov #0, r0 - or #254, r0 - shll8 r0 - or #1, r0 - shll16 r0 - cmp/eq r0, r1 - bf wrong - -invariant: - # Ensure MACH is invariant. - sts mach, r8 - cmp/eq r7, r8 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/neg.cgs b/sim/testsuite/sim/sh64/compact/neg.cgs deleted file mode 100644 index b6f98d7..0000000 --- a/sim/testsuite/sim/sh64/compact/neg.cgs +++ /dev/null @@ -1,55 +0,0 @@ -# sh testcase for neg $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - .macro signbit sign - shlr16 r1 - shlr8 r1 - shlr r1 - shlr r1 - shlr r1 - shlr r1 - shlr r1 - shlr r1 - shlr r1 - assert r1, \sign - .endm - start - - .global neg -neg: - mov #0, r0 - neg r0, r1 - signbit #0 - - mov #42, r0 - neg r0, r1 - signbit #1 - - mov #0, r0 - or #25, r0 - neg r0, r1 - signbit #1 - - # neg(0) is 0. - mov #0, r0 - neg r0, r1 - signbit #0 - - # neg(neg(x)) = x. - mov #42, r0 - neg r0, r1 - signbit #1 - mov #42, r0 - neg r0, r2 - neg r2, r1 - signbit #0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/negc.cgs b/sim/testsuite/sim/sh64/compact/negc.cgs deleted file mode 100644 index 1f5547d..0000000 --- a/sim/testsuite/sim/sh64/compact/negc.cgs +++ /dev/null @@ -1,66 +0,0 @@ -# sh testcase for negc $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - .macro signbit sign - mov r1, r2 - shlr16 r2 - shlr8 r2 - shlr r2 - shlr r2 - shlr r2 - shlr r2 - shlr r2 - shlr r2 - shlr r2 - assert r2, \sign - .endm - start - - .global negc -negc: - clrt - mov #1, r0 - negc r0, r1 - signbit #1 - -negc2: - sett - mov #1, r0 - negc r0, r1 - signbit #1 - -negc3: - clrt - mov #0, r0 - negc r0, r1 - signbit #0 - -negc4: - sett - mov #0, r0 - negc r0, r1 - signbit #1 - -negc5: - clrt - mov #0, r0 - or #255, r0 - negc r0, r1 - signbit #1 - -negc6: - sett - mov #0, r0 - or #255, r0 - negc r0, r1 - signbit #1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/nop.cgs b/sim/testsuite/sim/sh64/compact/nop.cgs deleted file mode 100644 index 8ce910c..0000000 --- a/sim/testsuite/sim/sh64/compact/nop.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for nop -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global nop -nop: - nop - pass diff --git a/sim/testsuite/sim/sh64/compact/not.cgs b/sim/testsuite/sim/sh64/compact/not.cgs deleted file mode 100644 index 380808d..0000000 --- a/sim/testsuite/sim/sh64/compact/not.cgs +++ /dev/null @@ -1,47 +0,0 @@ -# sh testcase for not $rm64, $rn64 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global not -not: - mov #0, r0 - or #192, r0 - not r0, r1 - - mov #0, r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #63, r0 - - cmp/eq r0, r1 - bf wrong - -ones: - mov #0, r1 - not r1, r2 - - mov #0, r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #255, r0 - shll8 r0 - or #255, r0 - cmp/eq r0, r2 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/ocbi.cgs b/sim/testsuite/sim/sh64/compact/ocbi.cgs deleted file mode 100644 index 12fb2a1..0000000 --- a/sim/testsuite/sim/sh64/compact/ocbi.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for ocbi @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - .global ocbi -ocbi: - ocbi @r0 - ocbi @r1 - ocbi @r15 - pass diff --git a/sim/testsuite/sim/sh64/compact/ocbp.cgs b/sim/testsuite/sim/sh64/compact/ocbp.cgs deleted file mode 100644 index 153aff2..0000000 --- a/sim/testsuite/sim/sh64/compact/ocbp.cgs +++ /dev/null @@ -1,15 +0,0 @@ -# sh testcase for ocbp @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ocbp -ocbp: - ocbp @r0 - ocbp @r1 - ocbp @r15 - pass diff --git a/sim/testsuite/sim/sh64/compact/ocbwb.cgs b/sim/testsuite/sim/sh64/compact/ocbwb.cgs deleted file mode 100644 index 6b0a741..0000000 --- a/sim/testsuite/sim/sh64/compact/ocbwb.cgs +++ /dev/null @@ -1,15 +0,0 @@ -# sh testcase for ocbwb @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ocbwb -ocbwb: - ocbwb @r0 - ocbwb @r1 - ocbwb @r15 - pass diff --git a/sim/testsuite/sim/sh64/compact/or.cgs b/sim/testsuite/sim/sh64/compact/or.cgs deleted file mode 100644 index a02eee3..0000000 --- a/sim/testsuite/sim/sh64/compact/or.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for or $rm64, $rn64 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global or -or: - mov #1, r0 - rotr r0 - mov #1, r1 - or r0, r1 - - mov #1, r7 - rotr r7 - add #1, r7 - cmp/eq r7, r1 - bf wrong - - .global or2 -or2: - mov #85, r0 - shll16 r0 - shll8 r0 - mov #85, r1 - shll8 r1 - or r0, r1 - - mov #85, r7 - shll16 r7 - add #85 ,r7 - shll8 r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/orb.cgs b/sim/testsuite/sim/sh64/compact/orb.cgs deleted file mode 100644 index 7e962f6..0000000 --- a/sim/testsuite/sim/sh64/compact/orb.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for or.b #$imm8, @(r0, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global orb -init: - # Init GBR and R0. - mov #30, r0 - ldc r0, gbr - mov #40, r0 - -orb: - or.b #0, @(r0, gbr) - or.b #170, @(r0, gbr) - or.b #0, @(r0, gbr) - or.b #255, @(r0, gbr) - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/ori.cgs b/sim/testsuite/sim/sh64/compact/ori.cgs deleted file mode 100644 index 63a5fb5..0000000 --- a/sim/testsuite/sim/sh64/compact/ori.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for or #$imm8, r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global ori -ori: - mov #1, r0 - rotr r0 - or #1, r0 - - mov #1, r7 - rotr r7 - add #1, r7 - cmp/eq r0, r7 - bf wrong - - .global ori2 -ori2: - mov #85, r0 - shll16 r0 - shll8 r0 - or #85, r0 - - mov #85, r7 - shll16 r7 - shll8 r7 - add #85, r7 - cmp/eq r0, r7 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/pref.cgs b/sim/testsuite/sim/sh64/compact/pref.cgs deleted file mode 100644 index 065e093..0000000 --- a/sim/testsuite/sim/sh64/compact/pref.cgs +++ /dev/null @@ -1,15 +0,0 @@ -# sh testcase for pref @$rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global pref -pref: - pref @r0 - pref @r1 - pref @r15 - pass diff --git a/sim/testsuite/sim/sh64/compact/rotcl.cgs b/sim/testsuite/sim/sh64/compact/rotcl.cgs deleted file mode 100644 index 5e1a3b9..0000000 --- a/sim/testsuite/sim/sh64/compact/rotcl.cgs +++ /dev/null @@ -1,121 +0,0 @@ -# sh testcase for rotcl $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global rotcl - -rotcl: - clrt - mov #1, r1 - rotcl r1 - assert r1, #2 - clrt - rotcl r1 - assert r1, #4 - clrt - rotcl r1 - assert r1, #8 - clrt - rotcl r1 - assert r1, #16 - clrt - rotcl r1 - assert r1, #32 - clrt - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - bf wrong - rotcl r1 - assert r1, #1 - - bra trotcl - nop - -wrong: - fail - -trotcl: - sett - mov #1, r1 - rotcl r1 - assert r1, #3 - clrt - rotcl r1 - assert r1, #6 - clrt - rotcl r1 - assert r1, #12 - clrt - rotcl r1 - assert r1, #24 - clrt - rotcl r1 - assert r1, #48 - clrt - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - rotcl r1 - bf wrong2 - assert r1, #1 - rotcl r1 - rotcl r1 - -okay: - pass -wrong2: - fail diff --git a/sim/testsuite/sim/sh64/compact/rotcr.cgs b/sim/testsuite/sim/sh64/compact/rotcr.cgs deleted file mode 100644 index b53300e..0000000 --- a/sim/testsuite/sim/sh64/compact/rotcr.cgs +++ /dev/null @@ -1,103 +0,0 @@ -# sh testcase for rotcr $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global rotcr -rotcr: - clrt - mov #1, r1 - rotcr r1 - bf wrong - assert r1, #0 - sett - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - assert r1, #1 - rotcr r1 - bf wrong - -trotcr: - sett - mov #1, r1 - rotcr r1 - bf wrong - sett - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - rotcr r1 - bf wrong - assert r1, #1 - rotcr r1 - bf wrong - rotcr r1 - -okay: - pass -wrong: - fail - - diff --git a/sim/testsuite/sim/sh64/compact/rotl.cgs b/sim/testsuite/sim/sh64/compact/rotl.cgs deleted file mode 100644 index e292de7..0000000 --- a/sim/testsuite/sim/sh64/compact/rotl.cgs +++ /dev/null @@ -1,62 +0,0 @@ -# sh testcase for rotl $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global rotl -rotl: - mov #1, r1 - rotl r1 - assert r1, #2 - rotl r1 - assert r1, #4 - rotl r1 - assert r1, #8 - rotl r1 - assert r1, #16 - rotl r1 - assert r1, #32 - rotl r1 - assert r1, #64 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - rotl r1 - bf wrong - assert r1, #1 - rotl r1 - rotl r1 - rotl r1 - assert r1, #8 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/rotr.cgs b/sim/testsuite/sim/sh64/compact/rotr.cgs deleted file mode 100644 index 7f80f99..0000000 --- a/sim/testsuite/sim/sh64/compact/rotr.cgs +++ /dev/null @@ -1,55 +0,0 @@ -# sh testcase for rotr $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global rotr -rotr: - mov #1, r1 - rotr r1 - bf wrong - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - rotr r1 - assert r1, #1 - rotr r1 - rotr r1 - rotr r1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/rts.cgs b/sim/testsuite/sim/sh64/compact/rts.cgs deleted file mode 100644 index eeb8dce..0000000 --- a/sim/testsuite/sim/sh64/compact/rts.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for rts -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global rts -rts: - bsr subroutine -slot: - nop -return: - pass - fail - -subroutine: - rts -rts_slot: - nop -bad: - fail diff --git a/sim/testsuite/sim/sh64/compact/sets.cgs b/sim/testsuite/sim/sh64/compact/sets.cgs deleted file mode 100644 index f031701..0000000 --- a/sim/testsuite/sim/sh64/compact/sets.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for sets -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sets -sets: - sets - pass diff --git a/sim/testsuite/sim/sh64/compact/sett.cgs b/sim/testsuite/sim/sh64/compact/sett.cgs deleted file mode 100644 index 9ae8af5..0000000 --- a/sim/testsuite/sim/sh64/compact/sett.cgs +++ /dev/null @@ -1,16 +0,0 @@ -# sh testcase for sett -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sett -sett: - sett - bf wrong - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shad.cgs b/sim/testsuite/sim/sh64/compact/shad.cgs deleted file mode 100644 index 340743d..0000000 --- a/sim/testsuite/sim/sh64/compact/shad.cgs +++ /dev/null @@ -1,58 +0,0 @@ -# sh testcase for shad $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global null -null: - mov #1, r0 - mov #0, r1 - shad r1, r0 - # no shift is performed. - assert r0, #1 - - .global gt0 -gt0: - mov #4, r0 - mov #3, r1 - shad r1, r0 - # shift left 3 bits. - assert r0, #32 - - .global lt0 -lt0: - mov #32, r0 - mov #3, r1 - neg r1, r1 - shad r1, r0 - # shift right 3 bits. - assert r0, #4 - - .global fillpos -fillpos: - mov #1, r0 - mov #1, r1 - rotr r1 - shad r1, r0 - # check result. - assert r0, #0 - - .global fillneg -fillneg: - mov #1, r0 - neg r0, r0 - mov #1, r1 - rotr r1 - shad r1, r0 - # check result. - not r0, r0 - assert r0, #0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shal.cgs b/sim/testsuite/sim/sh64/compact/shal.cgs deleted file mode 100644 index dfea947..0000000 --- a/sim/testsuite/sim/sh64/compact/shal.cgs +++ /dev/null @@ -1,57 +0,0 @@ -# sh testcase for shal $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shal -shal: - mov #1, r1 - shal r1 - assert r1, #2 - shal r1 - assert r1, #4 - shal r1 - assert r1, #8 - shal r1 - assert r1, #16 - shal r1 - assert r1, #32 - shal r1 - assert r1, #64 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - shal r1 - assert r1, #0 - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/shar.cgs b/sim/testsuite/sim/sh64/compact/shar.cgs deleted file mode 100644 index e3e92fc..0000000 --- a/sim/testsuite/sim/sh64/compact/shar.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for shar $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shar -shar: - mov #0, r0 - or #192, r0 - shar r0 - bt wrong - shar r0 - bt wrong - shar r0 - bt wrong - shar r0 - bt wrong - shar r0 - bt wrong - shar r0 - bt wrong - shar r0 - bf wrong - shar r0 - bf wrong - shar r0 - bt wrong - shar r0 - bt wrong - assert r0, #0 - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/shld.cgs b/sim/testsuite/sim/sh64/compact/shld.cgs deleted file mode 100644 index 32e4100..0000000 --- a/sim/testsuite/sim/sh64/compact/shld.cgs +++ /dev/null @@ -1,48 +0,0 @@ -# sh testcase for shld $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global null -null: - mov #1, r0 - mov #0, r1 - shld r1, r0 - # no shift is performed. - assert r0, #1 - - .global gt0 -gt0: - mov #4, r0 - mov #3, r1 - shld r1, r0 - # shift left 3 bits. - assert r0, #32 - - .global lt0 -lt0: - mov #32, r0 - mov #3, r1 - neg r1, r1 - shld r1, r0 - # shift right 3 bits. - assert r0, #4 - - .global fill -fill: - mov #1, r0 - rotr r0 - mov #1, r1 - rotr r1 - shld r1, r0 - assert r0, #0 - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/shll.cgs b/sim/testsuite/sim/sh64/compact/shll.cgs deleted file mode 100644 index 882f2c2..0000000 --- a/sim/testsuite/sim/sh64/compact/shll.cgs +++ /dev/null @@ -1,57 +0,0 @@ -# sh testcase for shll $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shll -shll: - mov #1, r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - shll r1 - assert r1, #0 -another: - mov #1, r1 - shll r1 - shll r1 - shll r1 - assert r1, #8 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shll16.cgs b/sim/testsuite/sim/sh64/compact/shll16.cgs deleted file mode 100644 index 0637c3d..0000000 --- a/sim/testsuite/sim/sh64/compact/shll16.cgs +++ /dev/null @@ -1,44 +0,0 @@ -# sh testcase for shll16 $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shll16 -shll16: - mov #108, r1 - shll16 r1 - shll16 r1 - assert r1, #0 - -another: - mov #1, r1 - shll16 r1 - mov #1, r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shll2.cgs b/sim/testsuite/sim/sh64/compact/shll2.cgs deleted file mode 100644 index 6e28c66..0000000 --- a/sim/testsuite/sim/sh64/compact/shll2.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for shll2 $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shll2 -shll2: - mov #1, r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - shll2 r1 - assert r1, #0 - -another: - mov #1, r1 - shll2 r1 - assert r1, #4 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shll8.cgs b/sim/testsuite/sim/sh64/compact/shll8.cgs deleted file mode 100644 index fe455ec..0000000 --- a/sim/testsuite/sim/sh64/compact/shll8.cgs +++ /dev/null @@ -1,38 +0,0 @@ -# sh testcase for shll8 $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shll8 -shll8: - mov #1, r1 - shll8 r1 - shll8 r1 - shll8 r1 - shll8 r1 - assert r1, #0 - -another: - mov #1, r1 - shll8 r1 - mov #1, r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - shll r7 - cmp/eq r1, r7 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shlr.cgs b/sim/testsuite/sim/sh64/compact/shlr.cgs deleted file mode 100644 index 9d86461..0000000 --- a/sim/testsuite/sim/sh64/compact/shlr.cgs +++ /dev/null @@ -1,33 +0,0 @@ -# sh testcase for shlr $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shlr -shlr: - mov #0, r0 - or #192, r0 - shlr r0 - shlr r0 - shlr r0 - shlr r0 - shlr r0 - shlr r0 - # Make sure a bit is shifted into T. - shlr r0 - bf wrong - # Ditto. - shlr r0 - bf wrong - shlr r0 - assert r0, #0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/shlr16.cgs b/sim/testsuite/sim/sh64/compact/shlr16.cgs deleted file mode 100644 index 7bfc627..0000000 --- a/sim/testsuite/sim/sh64/compact/shlr16.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for shlr16 $rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shrl16 -shrl16: - shlr16 r0 - - pass diff --git a/sim/testsuite/sim/sh64/compact/shlr2.cgs b/sim/testsuite/sim/sh64/compact/shlr2.cgs deleted file mode 100644 index 6f08597..0000000 --- a/sim/testsuite/sim/sh64/compact/shlr2.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for shlr2 $rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shrl2 -shrl2: - shlr2 r0 - - pass diff --git a/sim/testsuite/sim/sh64/compact/shlr8.cgs b/sim/testsuite/sim/sh64/compact/shlr8.cgs deleted file mode 100644 index 82040b5..0000000 --- a/sim/testsuite/sim/sh64/compact/shlr8.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for shlr8 $rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global shrl8 -shrl8: - shlr8 r0 - - pass diff --git a/sim/testsuite/sim/sh64/compact/stc-gbr.cgs b/sim/testsuite/sim/sh64/compact/stc-gbr.cgs deleted file mode 100644 index 1b84008..0000000 --- a/sim/testsuite/sim/sh64/compact/stc-gbr.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for stc gbr, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stc_gbr -stc_gbr: - stc gbr, r1 - mov #42, r1 - ldc r1, gbr - stc gbr, r2 - cmp/eq r1, r2 - bf wrong -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs deleted file mode 100644 index 3e74cc5..0000000 --- a/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for stc.l gbr, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stcl_gbr -stcl_gbr: - mov #42, r0 - ldc r0, gbr - mov #40, r0 - shll8 r0 - # save address - mov r0, r1 - stc.l gbr, @-r0 - - add #4, r0 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs b/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs deleted file mode 100644 index 42724b4..0000000 --- a/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for sts fpscr, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sts_fpscr -sts_fpscr: - sts fpscr, r0 - mov #42, r0 - lds r0, fpscr - sts fpscr, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/sts-fpul.cgs b/sim/testsuite/sim/sh64/compact/sts-fpul.cgs deleted file mode 100644 index ddbdaf1..0000000 --- a/sim/testsuite/sim/sh64/compact/sts-fpul.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for sts fpul, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sts_fpul -sts_fpul: - # This is properly exercised by the lds-fpul test case. - sts fpul, r1 - pass diff --git a/sim/testsuite/sim/sh64/compact/sts-mach.cgs b/sim/testsuite/sim/sh64/compact/sts-mach.cgs deleted file mode 100644 index 4d34bc1..0000000 --- a/sim/testsuite/sim/sh64/compact/sts-mach.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for sts mach, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sts_mach -sts_mach: - mov #42, r0 - lds r0, mach - sts mach, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/sts-macl.cgs b/sim/testsuite/sim/sh64/compact/sts-macl.cgs deleted file mode 100644 index b805f79..0000000 --- a/sim/testsuite/sim/sh64/compact/sts-macl.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for sts macl, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sts_macl -sts_macl: - mov #42, r0 - lds r0, macl - sts macl, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/sts-pr.cgs b/sim/testsuite/sim/sh64/compact/sts-pr.cgs deleted file mode 100644 index 3e4f6ee..0000000 --- a/sim/testsuite/sim/sh64/compact/sts-pr.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for sts pr, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sts_pr -sts_pr: - mov #42, r0 - lds r0, pr - sts pr, r1 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs deleted file mode 100644 index 032870d..0000000 --- a/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for sts.l fpscr, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stsl_fpscr -stsl_fpscr: - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r7 - sts.l fpscr, @-r0 - -check: - # Ensure r0 is decremented. - add #4, r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs deleted file mode 100644 index 89bd9e7..0000000 --- a/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for sts.l fpul, @-$rn -*- Asm -*_ -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stsl_fpul -stsl_fpul: - mov #40, r0 - shll8 r0 - # Preserve r0. - mov r0, r7 - sts.l fpul, @-r0 - -dec: - # Check for proper pre-decrementing. - add #4, r0 - cmp/eq r0, r7 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/stsl-mach.cgs b/sim/testsuite/sim/sh64/compact/stsl-mach.cgs deleted file mode 100644 index e15bdde..0000000 --- a/sim/testsuite/sim/sh64/compact/stsl-mach.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for sts.l mach, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stsl_mach -stsl_mach: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #170, r0 - - lds r0, mach - mov #40, r2 - shll8 r2 - # Preserve r2. - mov r2, r7 - sts.l mach, @-r2 - - # check results. - mov.l @r2, r3 - cmp/eq r0, r3 - bf wrong - - # Ensure decrement occurred. - add #4, r2 - cmp/eq r2, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/stsl-macl.cgs b/sim/testsuite/sim/sh64/compact/stsl-macl.cgs deleted file mode 100644 index 854ef34..0000000 --- a/sim/testsuite/sim/sh64/compact/stsl-macl.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for sts.l macl, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stsl_macl -stsl_macl: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #170, r0 - - lds r0, macl - mov #40, r2 - shll8 r2 - # Preserve r2. - mov r2, r7 - sts.l macl, @-r2 - - # check results. - mov.l @r2, r3 - cmp/eq r0, r3 - bf wrong - - # Ensure decrement occurred. - add #4, r2 - cmp/eq r2, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/stsl-pr.cgs b/sim/testsuite/sim/sh64/compact/stsl-pr.cgs deleted file mode 100644 index b519c9b..0000000 --- a/sim/testsuite/sim/sh64/compact/stsl-pr.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for sts.l pr, @-$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global stsl_pr -stsl_pr: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #170, r0 - - lds r0, pr - mov #40, r2 - shll8 r2 - # Preserve r2. - mov r2, r7 - sts.l pr, @-r2 - - # check results. - mov.l @r2, r3 - cmp/eq r0, r3 - bf wrong - - # Ensure decrement occurred. - add #4, r2 - cmp/eq r2, r7 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/sub.cgs b/sim/testsuite/sim/sh64/compact/sub.cgs deleted file mode 100644 index 3ba29f8..0000000 --- a/sim/testsuite/sim/sh64/compact/sub.cgs +++ /dev/null @@ -1,68 +0,0 @@ -# sh testcase for sub $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global sub1 -sub1: - # 0 - x. - mov #0, r0 - mov #3, r1 - sub r1, r0 - - mov #2, r7 - not r7, r7 - cmp/eq r7, r0 - bf wrong - - .global sub2 -sub2: - # x - 0. - mov #0, r0 - mov #3, r1 - sub r0, r1 - assert r1, #3 - - .global sub3 -sub3: - # x - y. - mov #4, r0 - mov #3, r1 - sub r0, r1 - - mov #0, r7 - not r7, r7 - cmp/eq r7, r1 - bf wrong - - .global sub4 -sub4: - # y - x. - mov #4, r0 - mov #3, r1 - sub r1, r0 - assert r0, #1 - - .global sub5 -sub5: - # y - y == 0 (where y are in two distinct registers). - mov #4, r0 - mov #4, r1 - sub r1, r0 - assert r0, #0 - - .global sub6 -sub6: - # y - y = 0 (where y is the same register). - mov #4, r1 - sub r1, r1 - assert r1, #0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/subc.cgs b/sim/testsuite/sim/sh64/compact/subc.cgs deleted file mode 100644 index cda1e84..0000000 --- a/sim/testsuite/sim/sh64/compact/subc.cgs +++ /dev/null @@ -1,109 +0,0 @@ -# sh testcase for subc $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -zero: - mov #0, r0 - mov #0, r1 - clrt - subc r0, r1 - assert r1, #0 - -zerot: - mov #0, r0 - mov #0, r1 - sett - subc r0, r1 - # Invert all 1's to all 0's for ease of comparison. - not r1, r1 - assert r1, #0 - -null: - mov #0, r0 - mov #10, r1 - clrt - subc r0, r1 - assert r1, #10 - -nullt: - mov #0, r0 - mov #10, r1 - sett - subc r0, r1 - assert r1, #9 - -subc: - mov #10, r0 - mov #0, r1 - clrt - subc r0, r1 - # Again, invert .. - not r1, r1 - assert r1, #9 - -subct: - mov #10, r0 - mov #0, r1 - sett - subc r0, r1 - # Again, invert .. - not r1, r1 - assert r1, #10 - -subc2: - mov #10, r0 - mov #20, r1 - clrt - subc r0, r1 - assert r1, #10 - -subc2t: - mov #20, r0 - mov #10, r1 - sett - subc r0, r1 - # Again, invert .. - not r1, r1 - assert r1, #10 - -subc3: - mov #5, r0 - mov #5, r1 - clrt - subc r0, r1 - assert r1, #0 - -subc3t: - mov #5, r0 - mov #5, r1 - sett - subc r0, r1 - # Again, invert .. - not r1, r1 - assert r1, #0 - -large: - mov #2, r0 - mov #10, r1 - clrt - subc r1, r0 - # Again, invert .. - not r0, r0 - assert r0, #7 - -larget: - mov #2, r0 - mov #10, r1 - sett - subc r0, r1 - assert r1, #7 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/subv.cgs b/sim/testsuite/sim/sh64/compact/subv.cgs deleted file mode 100644 index ceb8c64..0000000 --- a/sim/testsuite/sim/sh64/compact/subv.cgs +++ /dev/null @@ -1,55 +0,0 @@ -# sh testcase for subv $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start -zero: - mov #0, r0 - mov #0, r1 - subv r0, r1 - bt wrong - assert r1, #0 - -one: - mov #10, r0 - mov #0, r1 - subv r0, r1 - bt wrong - not r1, r1 - assert r1, #9 - -large: - # Produce MAXINT in R0. - mov #0, r0 - not r0, r0 - shlr r0 - - # Put -3 into R1. - mov #3, r1 - neg r1, r1 - - # Subtract them and underflow. - subv r0, r1 - bf wrong - -another: - # Produce MAXINT in R0. - mov #0, r0 - not r0, r0 - shlr r0 - - # Put -3 into R1. - mov #3, r1 - neg r1, r1 - - # Subtract them and overflow. - subv r1, r0 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/swapb.cgs b/sim/testsuite/sim/sh64/compact/swapb.cgs deleted file mode 100644 index 22f6f16..0000000 --- a/sim/testsuite/sim/sh64/compact/swapb.cgs +++ /dev/null @@ -1,44 +0,0 @@ -# sh testcase for swap.b $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -init: - # Build up a distinctive bit pattern. - mov #1, r0 - shll8 r0 - add #12, r0 - shll8 r0 - add #85, r0 - shll8 r0 - add #70, r0 - -test: - # Swap the lower two bytes into a different register. - swap.b r0, r1 - mov #1, r7 - shll8 r7 - add #12, r7 - shll8 r7 - add #70, r7 - shll8 r7 - add #85, r7 - cmp/eq r1, r7 - bf wrong - -swapback: - # Swap the lower two bytes into the same registers. - # R0 should now equal R1. - swap.b r1, r2 - cmp/eq r0, r2 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/swapw.cgs b/sim/testsuite/sim/sh64/compact/swapw.cgs deleted file mode 100644 index fa1ab69..0000000 --- a/sim/testsuite/sim/sh64/compact/swapw.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for swap.w $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global swapw -swapw: - # Build up a characteristic bit pattern in R0. - mov #85, r0 - shll16 r0 - add #3, r0 - rotr r0 - rotr r0 - or #170, r0 - # Preserve for later. - mov r0, r8 - -test: - swap.w r0, r1 - mov #64, r0 - shll8 r0 - or #170, r0 - shll8 r0 - or #192, r0 - shll8 r0 - or #21, r0 - cmp/eq r1, r0 - bf wrong - -swapback: - swap.w r1, r2 - cmp/eq r2, r8 - bf wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/tasb.cgs b/sim/testsuite/sim/sh64/compact/tasb.cgs deleted file mode 100644 index cb7f618..0000000 --- a/sim/testsuite/sim/sh64/compact/tasb.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for tas.b @$rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -tasb1: - mov #40, r0 - shll8 r0 - tas.b @r0 - bf wrong - -tasb2: - mov #40, r0 - shll8 r0 - tas.b @r0 - bt wrong - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/testutils.inc b/sim/testsuite/sim/sh64/compact/testutils.inc deleted file mode 100644 index b1ad830..0000000 --- a/sim/testsuite/sim/sh64/compact/testutils.inc +++ /dev/null @@ -1,49 +0,0 @@ -# Support macros for the assembly test cases. - - .macro start - .text - .global start -start: - .endm - - # Perform a single to double precision floating point conversion. - .macro _s2d fpr dpr - flds \fpr, fpul - _setpr - fcnvsd fpul, \dpr - _clrpr - .endm - - # Set the PR (PRecision) bit in the FPSCR. - .macro _setpr - sts fpscr, r7 - mov #8, r8 - shll16 r8 - or r8, r7 - lds r7, fpscr - .endm - - # Clear the PR bit. - .macro _clrpr - sts fpscr, r7 - mov #8, r8 - shll16 r8 - not r8, r8 - and r8, r7 - lds r7, fpscr - .endm - - # nb: this macro clobbers R7. - .macro assert reg value - mov \value, r7 - cmp/eq \reg, r7 - bf wrong - .endm - - .macro pass - trapa #253 - .endm - - .macro fail - trapa #254 - .endm diff --git a/sim/testsuite/sim/sh64/compact/trapa.cgs b/sim/testsuite/sim/sh64/compact/trapa.cgs deleted file mode 100644 index 24f8a6b..0000000 --- a/sim/testsuite/sim/sh64/compact/trapa.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for trapa #$imm8 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global trapa -trapa: - # pass is a macro for "trapa #253". - trapa #253 diff --git a/sim/testsuite/sim/sh64/compact/tst.cgs b/sim/testsuite/sim/sh64/compact/tst.cgs deleted file mode 100644 index a72b8a9..0000000 --- a/sim/testsuite/sim/sh64/compact/tst.cgs +++ /dev/null @@ -1,62 +0,0 @@ -# sh testcase for tst $rm, $rn -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global tst1 -tst1: - mov #0, r0 - mov #0, r1 - tst r0, r0 - bf wrong - -test2: - mov #0, r0 - mov #1, r1 - tst r0, r1 - bf wrong - -test3: - mov #0, r0 - mov #1, r1 - tst r1, r0 - bf wrong - -test4: - mov #1, r0 - mov #1, r1 - tst r0, r1 - bt wrong - -test5: - mov #1, r0 - rotr r0 - add #85, r0 - shll16 r0 - add #12, r0 - mov #1, r1 - rotr r1 - add #85, r1 - shll16 r1 - add #12, r1 - tst r0, r1 - bt wrong - -test6: - mov #1, r0 - rotr r0 - add #85, r0 - shll16 r0 - add #12, r0 - mov #1, r1 - tst r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/tstb.cgs b/sim/testsuite/sim/sh64/compact/tstb.cgs deleted file mode 100644 index 1b3829b..0000000 --- a/sim/testsuite/sim/sh64/compact/tstb.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for tst.b #$imm8, @(r0, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global orb -init: - # Init GBR and R0. - mov #30, r0 - ldc r0, gbr - mov #40, r0 - -orb: - tst.b #0, @(r0, gbr) - bf wrong - tst.b #170, @(r0, gbr) - bf wrong - tst.b #0, @(r0, gbr) - bf wrong - tst.b #255, @(r0, gbr) - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/compact/tsti.cgs b/sim/testsuite/sim/sh64/compact/tsti.cgs deleted file mode 100644 index e088029..0000000 --- a/sim/testsuite/sim/sh64/compact/tsti.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for tst #$imm8, r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global tsti -tsti: - mov #0, r0 - tst #0, r0 - -tsti2: - mov #0, r0 - tst #1, r0 - -tsti3: - mov #1, r0 - tst #0, r0 - -tsti4: - mov #1, r0 - tst #1, r0 - -tsti5: - mov #255, r0 - tst #255, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/xor.cgs b/sim/testsuite/sim/sh64/compact/xor.cgs deleted file mode 100644 index d158aaf..0000000 --- a/sim/testsuite/sim/sh64/compact/xor.cgs +++ /dev/null @@ -1,70 +0,0 @@ -# sh testcase for xor $rm64, $rn64 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global xor -xor: - # 0 (+) 1 = 1. - mov #0, r0 - mov #1, r1 - xor r0, r1 - assert r1, #1 - -xor2: - # 1 (+) 0 = 0. - mov #1, r0 - mov #0, r1 - xor r0, r1 - assert r1, #1 - -xor3: - # 0 (+) 0 = 0. - mov #0, r0 - mov #0, r1 - xor r0, r1 - assert r1, #0 - -xor4: - # 0 (+) 0 = 0. - mov #0, r0 - xor r0, r0 - assert r0, #0 - -xor5: - mov #0, r0 - or #85, r0 - shll16 r0 - or #170, r0 - mov r0, r1 - mov #0, r0 - or #85, r0 - shll16 r0 - or #170, r0 - xor r1, r0 - assert r0, #0 - -xor6: - mov #0, r0 - or #85, r0 - shll16 r0 - or #170, r0 - mov r0, r1 - mov #0, r0 - or #85, r0 - shll16 r0 - or #12, r0 - xor r0, r1 - mov #0, r0 - or #166, r0 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/xorb.cgs b/sim/testsuite/sim/sh64/compact/xorb.cgs deleted file mode 100644 index b31464b..0000000 --- a/sim/testsuite/sim/sh64/compact/xorb.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for xor.b #$imm8, @(r0, gbr) -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global orb -init: - # Init GBR and R0. - mov #30, r0 - ldc r0, gbr - mov #40, r0 - -orb: - xor.b #0, @(r0, gbr) - xor.b #170, @(r0, gbr) - xor.b #0, @(r0, gbr) - xor.b #255, @(r0, gbr) - -okay: - pass diff --git a/sim/testsuite/sim/sh64/compact/xori.cgs b/sim/testsuite/sim/sh64/compact/xori.cgs deleted file mode 100644 index 732b9ec..0000000 --- a/sim/testsuite/sim/sh64/compact/xori.cgs +++ /dev/null @@ -1,50 +0,0 @@ -# sh testcase for xor #$imm8, r0 -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - - .global xori -xori: - # 0 (+) 1 = 1. - mov #0, r0 - xor #1, r0 - assert r0, #1 - -xori2: - # 1 (+) 0 = 1. - mov #1, r0 - xor #0, r0 - assert r0, #1 - -xori3: - # 1 (+) 1 = 0. - mov #1, r0 - xor #1, r0 - assert r0, #0 - -xori4: - # 255 (+) 255 = 0. - mov #0, r0 - or #255, r0 - xor #255, r0 - assert r0, #0 - -xori5: - # 0 (+) 255 = 255. - mov #0, r0 - xor #255, r0 - mov r0, r1 - - mov #0, r0 - or #255, r0 - cmp/eq r0, r1 - bf wrong - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/compact/xtrct.cgs b/sim/testsuite/sim/sh64/compact/xtrct.cgs deleted file mode 100644 index 11dae7c..0000000 --- a/sim/testsuite/sim/sh64/compact/xtrct.cgs +++ /dev/null @@ -1,46 +0,0 @@ -# sh testcase for xtrct $rm, $rn -*- Asm -*- -# mach: all -# as: -isa=shcompact -# ld: -m shelf32 - - .include "compact/testutils.inc" - - start - -init: - mov #170, r0 - shll8 r0 - add #1, r0 - shll8 r0 - add #66, r0 - shll8 r0 - mov r0, r1 - - mov #85, r0 - shll8 r0 - add #2, r0 - shll8 r0 - add #42, r0 - shll8 r0 - add #3, r0 - -copy: - mov r0, r3 - mov r1, r4 - -xtrct: - xtrct r0, r1 - -check: - # Lower r3, upper r4. - shll16 r3 - shlr16 r4 - or r3, r4 - cmp/eq r1, r4 - bf wrong - -okay: - pass -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/interwork.exp b/sim/testsuite/sim/sh64/interwork.exp deleted file mode 100644 index acd19b3..0000000 --- a/sim/testsuite/sim/sh64/interwork.exp +++ /dev/null @@ -1,20 +0,0 @@ -# SH64 interworking testsuite. -# In particular, test parts of the instruction set that can be used -# for SHmedia/SHcompact instruction set mode switches. - -if [istarget sh64-*-*] { - # load support procs (none yet) - # load_lib cgen.exp - - # all machines - set all_machs "sh5" - - foreach src [lsort [glob -nocomplain $srcdir/$subdir/misc/*.s]] { - # If we're only testing specific files and this isn't one of them, - # skip it. - if ![runtest_file_p $runtests $src] { - continue - } - run_sim_test $src $all_machs - } -} diff --git a/sim/testsuite/sim/sh64/media.exp b/sim/testsuite/sim/sh64/media.exp deleted file mode 100644 index 1a3d9f4..0000000 --- a/sim/testsuite/sim/sh64/media.exp +++ /dev/null @@ -1,19 +0,0 @@ -# SHmedia testsuite. - -if [istarget sh64-*-*] { - # load support procs (none yet) - # load_lib cgen.exp - - # all machines - set all_machs "sh5" - - # The .cgs suffix is for "cgen .s". - foreach src [lsort [glob -nocomplain $srcdir/$subdir/media/*.cgs]] { - # If we're only testing specific files and this isn't one of them, - # skip it. - if ![runtest_file_p $runtests $src] { - continue - } - run_sim_test $src $all_machs - } -} diff --git a/sim/testsuite/sim/sh64/media/ChangeLog b/sim/testsuite/sim/sh64/media/ChangeLog deleted file mode 100644 index e435dbe..0000000 --- a/sim/testsuite/sim/sh64/media/ChangeLog +++ /dev/null @@ -1,102 +0,0 @@ -2001-01-09 Ben Elliston <bje@redhat.com> - - * nsb.cgs: Test consecutive bits of zeros as well as ones. - * ptb.cgs: Clean up. - -2001-01-08 Ben Elliston <bje@redhat.com> - - * fcmpund.cgs, fcmpuns.cgs: Complete test cases. - * fcnvds.cgs, fcnvsd.cgs, fgetscr.cgs, fiprs.cgs: Ditto. - * floatld.cgs, floatls.cgs, floatqd.cgs, floatqs.cgs: Ditto. - * fmuld.cgs, fmuls.cgs, fputscr.cgs, fstxp.cgs: Ditto. - * fsubd.cgs, fsubs.cgs, ftrcdl.cgs, ftrcdq.cgs: Ditto. - * ftrcsl.cgs, ftrcsq.cgs, ftrvs.cgs: Ditto. - * ldhil.cgs, ldhiq.cgs, ldlol.cgs, ldloq.cgs: Ditto. - * mabsl.cgs, mabsw.cgs, maddl.cgs, maddsl.cgs: Ditto. - * maddsub.cgs, maddsw.cgs, maddw.cgs: Ditto. - * mcmpeqb.cgs, mcmpeql.cgs, mcmpeqw.cgs: Ditto. - * mcmpgtl.cgs, mcmpgtub.cgs, mcmpgtw.cgs: Ditto. - * mcmv.cgs, mcnvslw.cgs, mcnvswb.cgs, mcnvswub.cgs: Ditto. - * mmacfxwl.cgs, mmacnfx-wl.cgs: Ditto. - * mmulfxl.cgs, mmulfxrpw.cgs, mmulfxw.cgs: Ditto. - * mmulhiwl.cgs, mmull.cgs, mmullowl.cgs: Ditto. - * mmulsumwq.cgs, mmulw.cgs, movi.cgs: Ditto. - * mpermw.cgs, msadubq.cgs: Ditto. - * mshaldsl.cgs, mshaldsw.cgs: Ditto. - * mshardl.cgs, mshardsq.cgs, mshardw.cgs: Ditto. - * mshfhib.cgs, mshfhil.cgs, mshfhiw.cgs: Ditto. - * mshflob.cgs, mshflol.cgs, mshflow.cgs: Ditto. - * mshlldl.cgs, mshlldw.cgs, mshlrdl.cgs: Ditto. - * mshlrdw.cgs, msubl.cgs, msubsl.cgs: Ditto. - * msubsub.cgs, msubsw.cgs, msubw.cgs: Ditto. - * mulsl.cgs, mulul.cgs: Ditto. - * ptabs.cgs, ptb.cgs, ptrel.cgs: Ditto. - * shard.cgs, shardl.cgs, shari.cgs, sharil.cgs: Ditto. - * shlld.cgs, shlldl.cgs, shlli.cgs, shllil.cgs: Ditto. - * shlrd.cgs, shlrdl.cgs, shlri.cgs, shlril.cgs: Ditto. - * sthil.cgs, sthiq.cgs, swapq.cgs, trapa.cgs: Ditto. - - * testutils.inc (pass): Pass correct "syscall" number. - (fail): Ditto. - -2000-12-13 Ben Elliston <bje@redhat.com> - - * sub.cgs, subl.cgs: Complete test cases. - * ptrel.cgs: Likewise. - - * shori.cgs: Test for zero extension of immediate operand. - * fcmpged.cgs, fcmpges.cgs, fldd.cgs: Complete test cases. - * fldp.cgs, flds.cgs, fldxd.cgs, fldxp.cgs: Likewise. - * fldxs.cgs, fmacs.cgs, fnegd.cgs, fnegs.cgs: Likewise. - * fsqrtd.cgs, fsqrts.cgs, fstd.cgs, fstp.cgs: Likewise. - * fsts.cgs, fstxd.cgs, fstxs.cgs: Likewise. - -2000-12-12 Ben Elliston <bje@redhat.com> - - * testutils.inc (pass): Use simple syscall mechanism. - (fail): Likewise. - (_packb, _packw, _packl): New macros for packing slices. - - * stb.cgs, stq.cgs, stxb.cgs, stxq.cgs: Complete test cases. - * stl.cgs, stw.cgs, stxl.cgs, stxw.cgs: Likewise. - * ldl.cgs, ldq.cgs, ldub.cgs, lduw.cgs, ldw.cgs: Likewise. - * ldxb.cgs, ldxl.cgs, ldxq.cgs, ldxub.cgs: Likewise. - * ldxuw.cgs, ldxw.cgs, nsb.cgs, trapa.cgs: Likewise. - - * fcmpeqd.cgs, fcmpeqs.cgs, fcmpgtd.cgs: Complete test cases. - * fcmpgts.cgs, fdivd.cgs, fdivs.cgs, fmovd.cgs: Likewise. - * fmovdq.cgs, fmovqd.cgs, fmovls.cgs, fmovs.cgs: Likewise. - * fmovsl.cgs: Likewise. - -2000-12-11 Ben Elliston <bje@redhat.com> - - * fabss.cgs, fabsd.cgs, fadds.cgs, faddd.cgs: Complete test cases. - * getcfg.cgs, getcon.cgs, gettr.cgs, icbi.cgs: Likewise. - * prefi.cgs, pta.cgs, ptabs.cgs, ptb.cgs: Likewise. - * putcon.cgs, putcfg.cgs, rte.cgs: Likewise. - - * add.cgs, addi.cgs, addl.cgs, addil.cgs: Complete test cases. - * addl.cgs, addzl.cgs, alloco.cgs, and.cgs, andc.cgs: Likewise. - * andi.cgs, beq.cgs, beqi.cgs, bge.cgs, bgeu.cgs: Likewise. - * bgt.cgs, bgtu.cgs, blink.cgs, bne.cgs, bnei.cgs: Likewise. - * brk.cgs, byterev.cgs, cmpeq.cgs, cmpgt.cgs: Likewise. - * cmpgtu.cgs, cmveq.cgs, cmvne.cgs: Likewise. - -2000-12-07 Ben Elliston <bje@redhat.com> - - * mextr1.cgs, mextr2.cgs, mextr3.cgs: Complete test cases. - * mextr4.cgs, mextr5.cgs, mextr6.cgs, mextr7.cgs: Likewise. - -2000-12-05 Ben Elliston <bje@redhat.com> - - * nop.cgs, ocbi.cgs, ocbp.cgs, ocbwb.cgs: Complete test cases. - * or.cgs, ori.cgs, xor.cgs, xori.cgs: Ditto. - * sleep.cgs, synci.cgs, synco.cgs: Ditto. - -2000-11-22 Ben Elliston <bje@redhat.com> - - * *.cgs: Include "media/testutils.inc", not "testutils.inc" as - generated test cases do. Miscellaneous fixes. - - * testutils.inc: New file. - * *.cgs: Generate test cases. diff --git a/sim/testsuite/sim/sh64/media/add.cgs b/sim/testsuite/sim/sh64/media/add.cgs deleted file mode 100644 index 9778e8f..0000000 --- a/sim/testsuite/sim/sh64/media/add.cgs +++ /dev/null @@ -1,47 +0,0 @@ -# sh testcase for add $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global add -init: - pta wrong, tr0 -add: - movi 10, r0 - movi 0, r1 - add r0, r1, r3 - movi 10, r4 - bne r3, r4, tr0 - -add0: - movi 1, r63 - add r63, r63, r1 - bnei r1, 0, tr0 - -add2: - movi 0, r0 - movi 10, r1 - add r0, r1, r3 - movi 10, r4 - bne r3, r4, tr0 - -add3: - movi 10, r1 - add r63, r1, r3 - movi 10, r4 - bne r3, r4, tr0 - -add4: - movi 10, r1 - add r1, r63, r3 - movi 10, r4 - bne r3, r4, tr0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/addi.cgs b/sim/testsuite/sim/sh64/media/addi.cgs deleted file mode 100644 index 3d4b49f..0000000 --- a/sim/testsuite/sim/sh64/media/addi.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for addi $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -addi1: - movi 1, r0 - addi r0, 10, r0 - bnei r0, 11, tr0 - -addi2: - movi 10, r0 - addi r0, 1, r0 - bnei r0, 11, tr0 - -addi3: - movi 10, r0 - addi r0, -1, r0 - bnei r0, 9, tr0 - -addi4: - movi 20, r0 - addi r0, -2, r0 - bnei r0, 18, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/addil.cgs b/sim/testsuite/sim/sh64/media/addil.cgs deleted file mode 100644 index 5c92e27..0000000 --- a/sim/testsuite/sim/sh64/media/addil.cgs +++ /dev/null @@ -1,49 +0,0 @@ -# sh testcase for addi.l $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -addil0: - movi 1, r63 - addi.l r63, 0, r1 - bnei r1, 0, tr0 - -addil1: - movi 10, r0 - addi.l r0, 0, r3 - bnei r3, 10, tr0 - -addil2: - movi 0, r0 - addi.l r0, 10, r2 - bnei r2, 10, tr0 - -addil3: - addi.l r63, 10, r1 - bnei r1, 10, tr0 - -addil4: - movi 10, r0 - addi.l r0, 0, r1 - bnei r1, 10, tr0 - -addil5: - # Ensure top 32-bits are discarded when adding. - movi 10, r0 - shlli r0, 32, r0 - addi r0, 10, r0 - addi.l r0, 10, r2 - bnei r2, 20, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/addl.cgs b/sim/testsuite/sim/sh64/media/addl.cgs deleted file mode 100644 index 7f94b61..0000000 --- a/sim/testsuite/sim/sh64/media/addl.cgs +++ /dev/null @@ -1,61 +0,0 @@ -# sh testcase for add.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global addl -init: - pta wrong, tr0 - -addl0: - movi 1, r63 - add.l r63, r63, r1 - bnei r1, 0, tr0 - -addl1: - movi 10, r0 - movi 0, r1 - add.l r0, r1, r3 - movi 10, r4 - bne r3, r4, tr0 - -addl2: - movi 0, r0 - movi 10, r1 - add.l r0, r1, r2 - movi 10, r3 - bne r2, r3, tr0 - -addl3: - movi 10, r0 - add.l r63, r0, r1 - movi 10, r2 - bne r1, r2, tr0 - -addl4: - movi 10, r0 - add.l r0, r63, r1 - movi 10, r2 - bne r1, r2, tr0 - -addl5: - # Ensure top 32-bits are discarded when adding. - movi 10, r0 - shlli r0, 32, r0 - addi r0, 10, r0 - movi 10, r1 - shlli r1, 32, r1 - addi r1, 10, r1 - add.l r0, r1, r2 - movi 20, r3 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/addzl.cgs b/sim/testsuite/sim/sh64/media/addzl.cgs deleted file mode 100644 index b7917d3..0000000 --- a/sim/testsuite/sim/sh64/media/addzl.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for addz.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -addzl1: - movi 1, r0 - movi 2, r1 - addz.l r0, r1, r2 - bnei r2, 3, tr0 - -addzl2: - movi 1, r0 - shlli r0, 32, r0 - addi r0, 2, r0 - movi 1, r1 - shlli r1, 32, r1 - addi r1, 2, r1 - addz.l r0, r1, r2 - bnei r2, 4, tr0 - -addzl3: - movi 1, r0 - shlli r0, 31, r0 - addi r0, 2, r0 - movi 2, r1 - addz.l r0, r1, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/alloco.cgs b/sim/testsuite/sim/sh64/media/alloco.cgs deleted file mode 100644 index 5f27359..0000000 --- a/sim/testsuite/sim/sh64/media/alloco.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for alloco $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - alloco r0, 32 - pass diff --git a/sim/testsuite/sim/sh64/media/and.cgs b/sim/testsuite/sim/sh64/media/and.cgs deleted file mode 100644 index c2d4233..0000000 --- a/sim/testsuite/sim/sh64/media/and.cgs +++ /dev/null @@ -1,68 +0,0 @@ -# sh testcase for and $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -and0: - # 0 and 0 is 0. - movi 0, r0 - movi 0, r1 - and r0, r1, r2 - bnei r2, 0, tr0 - -and1: - # 0 and 1 is 0. - movi 0, r0 - movi 1, r1 - and r0, r1, r2 - bnei r2, 0, tr0 - -and2: - # 1 and 0 is 0. - movi 1, r0 - movi 0, r1 - and r0, r1, r2 - bnei r2, 0, tr0 - -and3: - # 1 and 1 is 1. - movi 1, r0 - movi 1, r1 - and r0, r1, r2 - bnei r2, 1, tr0 - -and4: - movi 1, r0 - shlli r0, 63, r0 - movi 1, r1 - shlli r1, 63, r1 - and r0, r1, r2 - # Check it. - movi 1, r3 - shlli r3, 63, r3 - bne r2, r3, tr0 - -and5: - movi 1, r0 - shlli r0, 63, r0 - movi 1, r1 - shlli r1, 63, r1 - ori r1, 1, r1 - and r0, r1, r2 - # Check it. - movi 1, r3 - shlli r1, 63, r1 - bne r1, r2, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/andc.cgs b/sim/testsuite/sim/sh64/media/andc.cgs deleted file mode 100644 index 60b50ac..0000000 --- a/sim/testsuite/sim/sh64/media/andc.cgs +++ /dev/null @@ -1,50 +0,0 @@ -# sh testcase for andc $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -andc1: - # X . !X = 0. - movi 3, r0 - movi 3, r1 - andc r0, r1, r2 - bnei r2, 0, tr0 - -andc2: - # X . 0 = X. - movi 3, r0 - movi 0, r1 - andc r0, r1, r2 - bnei r2, 3, tr0 - -andc3: - # wide X . 0 = wide X. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - movi 0, r1 - andc r0, r1, r2 - bne r0, r2, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/andi.cgs b/sim/testsuite/sim/sh64/media/andi.cgs deleted file mode 100644 index decfc2f..0000000 --- a/sim/testsuite/sim/sh64/media/andi.cgs +++ /dev/null @@ -1,46 +0,0 @@ -# sh testcase for andi $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -andi0: - # 0 and 0 is 0. - movi 0, r0 - andi r0, 0, r2 - bnei r2, 0, tr0 - -and1: - # 0 and 1 is 0. - movi 0, r0 - andi r0, 1, r2 - bnei r2, 0, tr0 - -and2: - # 1 and 0 is 0. - movi 1, r0 - andi r0, 0, r2 - bnei r2, 0, tr0 - -and3: - # 1 and 1 is 1. - movi 1, r0 - andi r0, 1, r2 - bnei r2, 1, tr0 - -and4: - movi 15, r0 - andi r0, 3, r2 - bnei r2, 3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/beq.cgs b/sim/testsuite/sim/sh64/media/beq.cgs deleted file mode 100644 index 6f96ffd..0000000 --- a/sim/testsuite/sim/sh64/media/beq.cgs +++ /dev/null @@ -1,52 +0,0 @@ -# sh testcase for beq$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global beq -init: - # Load up the branch target registers. - pta beq2, tr0 - pta beq3, tr1 - pta wrong, tr2 - -beq1: - # Compare r0 with itself. - # Always true, so branch likely. - movi 1, r0 - beq/l r0, r0, tr0 - # We should branch over this. - fail - -beq2: - # Ensure high order bits are compared, too. - movi 1, r0 - shlli r0, 35, r0 - addi r0, 10, r0 - movi 1, r1 - shlli r1, 35, r1 - addi r1, 10, r1 - beq r0, r1, tr1 - # We should branch over this, too. - fail - -beq3: - movi 1, r0 - shlli r0, 35, r0 - addi r0, 10, r0 - movi 2, r1 - shlli r1, 35, r1 - addi r1, 9, r1 - # Unlikely we'll branch! - beq/u r0, r1, tr2 - # We should proceed to pass here. - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/beqi.cgs b/sim/testsuite/sim/sh64/media/beqi.cgs deleted file mode 100644 index c2b4ea8..0000000 --- a/sim/testsuite/sim/sh64/media/beqi.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for beqi$likely $rm, $imm6, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global beqi -init: - # Load up the branch target registers. - pta beqi2, tr0 - pta beqi3, tr1 - pta wrong, tr2 - -beqi1: - # Always true, so branch likely. - movi 1, r0 - beqi/l r0, 1, tr0 - # We should branch over this. - fail - -beqi2: - movi 22, r3 - beqi r3, 22, tr1 - # We should branch over this. - fail - -beqi3: - movi 27, r7 - # We shouldn't branch here. - beqi/u r7, 23, tr2 - # We should proceed to pass here. - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/bge.cgs b/sim/testsuite/sim/sh64/media/bge.cgs deleted file mode 100644 index 832ff06..0000000 --- a/sim/testsuite/sim/sh64/media/bge.cgs +++ /dev/null @@ -1,40 +0,0 @@ -# sh testcase for bge$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global bge -init: - pta bge2, tr0 - pta bge3, tr1 - pta wrong, tr2 - movi 0, r0 - -bge1: - # Compare r0 with itself. - bge/l r0, r0, tr0 - # We should branch here. - fail - -bge2: - movi 1, r1 - movi 1, r2 - bge r1, r2, tr1 - # We should branch here. - fail - -bge3: - movi -1, r1 - movi 1, r2 - bge r1, r2, tr2 - # We should not branch here. - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/bgeu.cgs b/sim/testsuite/sim/sh64/media/bgeu.cgs deleted file mode 100644 index da469d0..0000000 --- a/sim/testsuite/sim/sh64/media/bgeu.cgs +++ /dev/null @@ -1,47 +0,0 @@ -# sh testcase for bgeu$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global bgeu -init: - movi 0, r0 - -bgeu1: - # Compare r0 with itself. - pta bgeu2, tr0 - bgeu/l r0, r0, tr0 - # We should branch here. - fail - -bgeu2: - movi 1, r1 - movi 1, r2 - pta bge3, tr0 - bgeu r1, r2, tr0 - # We should branch here. - fail - -bge3: - movi -1, r1 - movi 1, r2 - # We SHOULD branch here. - pta bge4, tr0 - bgeu r1, r2, tr0 - fail - -bge4: - movi 1, r1 - movi -1, r2 - # We should not branch here. - pta wrong, tr0 - bgeu r1, r2, tr0 -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/bgt.cgs b/sim/testsuite/sim/sh64/media/bgt.cgs deleted file mode 100644 index 8866635..0000000 --- a/sim/testsuite/sim/sh64/media/bgt.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for bgt$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - -init: - pta wrong, tr0 - -bgt1: - movi 1, r0 - movi -1, r1 - bgt r1, r0, tr0 - -bgt2: - bgt r0, r0, tr0 - -bgt3: - pta okay, tr1 - movi -1, r0 - movi 1, r1 - bgt r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/bgtu.cgs b/sim/testsuite/sim/sh64/media/bgtu.cgs deleted file mode 100644 index 3cc0269..0000000 --- a/sim/testsuite/sim/sh64/media/bgtu.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for bgtu$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - -init: - pta wrong, tr0 - -bgtu1: - movi 1, r0 - movi -1, r1 - pta bgt2, tr1 - bgtu r1, r0, tr1 - fail - -bgt2: - bgtu r0, r0, tr0 - -bgt3: - pta okay, tr1 - movi -1, r0 - movi 1, r1 - pta okay, tr1 - bgtu r0, r1, tr1 - fail - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/blink.cgs b/sim/testsuite/sim/sh64/media/blink.cgs deleted file mode 100644 index 000d1f5..0000000 --- a/sim/testsuite/sim/sh64/media/blink.cgs +++ /dev/null @@ -1,17 +0,0 @@ -# sh testcase for blink $trb, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -blink: - pta target, tr0 - gettr tr0, r1 - ptabs r1, tr0 - blink tr0, r0 - fail - -target: - pass diff --git a/sim/testsuite/sim/sh64/media/bne.cgs b/sim/testsuite/sim/sh64/media/bne.cgs deleted file mode 100644 index f574147..0000000 --- a/sim/testsuite/sim/sh64/media/bne.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for bne$likely $rm, $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 1, r0 - pta wrong, tr0 - pta okay, tr1 - -bne1: - bne r63, r63, tr0 -bne2: - bne r0, r63, tr1 -bad: - fail -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/bnei.cgs b/sim/testsuite/sim/sh64/media/bnei.cgs deleted file mode 100644 index 5ce3399..0000000 --- a/sim/testsuite/sim/sh64/media/bnei.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for bnei$likely $rm, $imm6, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 1, r0 - pta wrong, tr0 - pta okay, tr1 - -bnei1: - bnei r63, 0, tr0 -bnei2: - bnei r0, 3, tr1 -bad: - fail -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/brk.cgs b/sim/testsuite/sim/sh64/media/brk.cgs deleted file mode 100644 index 0736414..0000000 --- a/sim/testsuite/sim/sh64/media/brk.cgs +++ /dev/null @@ -1,11 +0,0 @@ -# sh testcase for brk -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - # brk will cause the sim to trap, so avoid it. - pass - brk diff --git a/sim/testsuite/sim/sh64/media/byterev.cgs b/sim/testsuite/sim/sh64/media/byterev.cgs deleted file mode 100644 index d97c3ad..0000000 --- a/sim/testsuite/sim/sh64/media/byterev.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for byterev $rm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - pta wrong, tr0 -init: - # Put a distinctive pattern in r0. - movi 10, r0 - shlli r0, 8, r0 - ori r0, 20, r0 - shlli r0, 8, r0 - ori r0, 30, r0 - shlli r0, 8, r0 - ori r0, 40, r0 - shlli r0, 8, r0 - ori r0, 50, r0 - shlli r0, 8, r0 - ori r0, 60, r0 - shlli r0, 8, r0 - ori r0, 70, r0 - shlli r0, 8, r0 - ori r0, 80, r0 - -byterev: - byterev r0, r1 - -check: - andi r1, 255, r2 - movi 10, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 20, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 30, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 40, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 50, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 60, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 70, r3 - bne r2, r3, tr0 - shlri r1, 8, r1 - andi r1, 255, r2 - movi 80, r3 - bne r2, r3, tr0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/cmpeq.cgs b/sim/testsuite/sim/sh64/media/cmpeq.cgs deleted file mode 100644 index 78f51f4..0000000 --- a/sim/testsuite/sim/sh64/media/cmpeq.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for cmpeq $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - movi 2, r2 - movi 2, r3 - movi 3, r4 - -cmpeq1: - cmpeq r2, r2, r7 - bne r7, r1, tr0 - -cmpeq2: - cmpeq r2, r3, r7 - bne r7, r1, tr0 - -cmpeq3: - cmpeq r2, r4, r7 - bne r7, r0, tr0 - -cmpeq4: - movi 1, r2 - shlli r2, 63, r2 - movi 1, r3 - shlli r3, 63, r3 - cmpeq r2, r3, r7 - bne r7, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/cmpgt.cgs b/sim/testsuite/sim/sh64/media/cmpgt.cgs deleted file mode 100644 index e4a971b..0000000 --- a/sim/testsuite/sim/sh64/media/cmpgt.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for cmpgt $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - movi 2, r2 - movi 2, r3 - movi 3, r4 - -cmpgt1: - cmpgt r2, r2, r7 - bne r7, r0, tr0 - -cmpgt2: - cmpgt r2, r3, r7 - bne r7, r0, tr0 - -cmpgt3: - cmpgt r4, r2, r7 - bne r7, r1, tr0 - -cmpgt4: - movi 1, r2 - shlli r2, 63, r2 - movi 1, r3 - shlli r3, 63, r3 - addi r3, 1, r3 - cmpgt r3, r2, r7 - bne r7, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/cmpgtu.cgs b/sim/testsuite/sim/sh64/media/cmpgtu.cgs deleted file mode 100644 index b896dfc..0000000 --- a/sim/testsuite/sim/sh64/media/cmpgtu.cgs +++ /dev/null @@ -1,43 +0,0 @@ -# sh testcase for cmpgtu $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - movi 2, r2 - movi 2, r3 - movi 3, r4 - -cmpgt1: - cmpgtu r2, r2, r7 - bne r7, r0, tr0 - -cmpgt2: - cmpgtu r2, r3, r7 - bne r7, r0, tr0 - -cmpgt3: - cmpgtu r4, r2, r7 - bne r7, r1, tr0 - -cmpgt4: - movi 1, r2 - shlli r2, 63, r2 - movi 1, r3 - shlli r3, 63, r3 - addi r3, 1, r3 - cmpgtu r3, r2, r7 - bne r7, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/cmveq.cgs b/sim/testsuite/sim/sh64/media/cmveq.cgs deleted file mode 100644 index 0f49733..0000000 --- a/sim/testsuite/sim/sh64/media/cmveq.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for cmveq $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - - movi 0, r0 - movi 1, r1 - movi 2, r2 - movi 21, r3 - -cmveq: - # Zap r7. - movi 0, r7 - - cmveq r0, r2, r7 - bne r2, r7, tr0 - - cmveq r1, r3, r7 - # Make sure r7 is still equal to r2. - bne r2, r7, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/cmvne.cgs b/sim/testsuite/sim/sh64/media/cmvne.cgs deleted file mode 100644 index 909179a..0000000 --- a/sim/testsuite/sim/sh64/media/cmvne.cgs +++ /dev/null @@ -1,32 +0,0 @@ -# sh testcase for cmvne $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - - movi 0, r0 - movi 1, r1 - movi 2, r2 - movi 21, r3 - -cmvne: - # Zap r7. - movi 0, r7 - - cmvne r1, r2, r7 - bne r2, r7, tr0 - - cmvne r0, r3, r7 - # Make sure r7 is still equal to r2. - bne r2, r7, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fabsd.cgs b/sim/testsuite/sim/sh64/media/fabsd.cgs deleted file mode 100644 index 47060fc..0000000 --- a/sim/testsuite/sim/sh64/media/fabsd.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for fabs.d $drgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - -fabs0: - # Ensure fabs(-1) = 1. - fmov.ls r0, fr7 - float.ld fr7, dr0 - fmov.ls r1, fr7 - float.ld fr7, dr2 - fsub.d dr0, dr2, dr4 - fabs.d dr4, dr6 - fcmpeq.d dr6, dr2, r7 - bnei r7, 1, tr0 - -fabs1: - # Ensure fabs(1) = 1. - fmov.ls r0, fr7 - float.ld fr7, dr0 - fmov.ls r1, fr7 - float.ld fr7, dr2 - fabs.d dr2, dr4 - fcmpeq.d dr2, dr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fabss.cgs b/sim/testsuite/sim/sh64/media/fabss.cgs deleted file mode 100644 index dd9aec7..0000000 --- a/sim/testsuite/sim/sh64/media/fabss.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for fabs.s $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - -fabs0: - # Ensure fabs(-1) = 1. - fmov.ls r0, fr7 - float.ls fr7, fr0 - fmov.ls r1, fr7 - float.ls fr7, fr1 - fsub.s fr0, fr1, fr2 - fabs.s fr2, fr3 - fcmpeq.s fr3, fr1, r7 - bnei r7, 1, tr0 - -fabs1: - # Ensure fabs(1) = 1. - fmov.ls r0, fr7 - float.ls fr7, fr0 - fmov.ls r1, fr7 - float.ls fr7, fr1 - fabs.s fr1, fr2 - fcmpeq.s fr1, fr2, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/faddd.cgs b/sim/testsuite/sim/sh64/media/faddd.cgs deleted file mode 100644 index 096f852..0000000 --- a/sim/testsuite/sim/sh64/media/faddd.cgs +++ /dev/null @@ -1,33 +0,0 @@ -# sh testcase for fadd.d $drg, $drh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - movi 2, r0 - movi 3, r1 - -fadd0: - # Add 2 and 3. - fmov.ls r0, fr7 - float.ld fr7, dr0 - fmov.ls r1, fr7 - float.ld fr7, dr2 - fadd.d dr0, dr2, dr4 - # Check to make sure we got 5. - movi 5, r2 - fmov.ls r2, fr7 - float.ld fr7, dr6 - fcmpeq.d dr4, dr6, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fadds.cgs b/sim/testsuite/sim/sh64/media/fadds.cgs deleted file mode 100644 index fb93979..0000000 --- a/sim/testsuite/sim/sh64/media/fadds.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for fadd.s $frg, $frh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fadds -init: - pta wrong, tr0 - movi 2, r0 - movi 3, r1 - -fadd0: - # Add 2 and 3. - fmov.ls r0, fr7 - float.ls fr7, fr0 - fmov.ls r1, fr7 - float.ls fr7, fr1 - fadd.s fr0, fr1, fr2 - # Check to make sure we got 5. - movi 5, r2 - fmov.ls r2, fr7 - float.ls fr7, fr3 - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpeqd.cgs b/sim/testsuite/sim/sh64/media/fcmpeqd.cgs deleted file mode 100644 index c193564..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpeqd.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fcmpeq.d $drg, $drh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpeq1: - movi 1, r0 - fmov.ls r0, fr0 - fmov.ls r0, fr1 - float.ld fr0, dr2 - float.ld fr1, dr4 - fcmpeq.d dr2, dr2, r7 - bnei r7, 1, tr0 - -fcmpeq2: - movi 1, r0 - fmov.ls r0, fr0 - movi 2, r1 - fmov.ls r1, fr1 - float.ld fr0, dr4 - float.ld fr1, dr6 - fcmpeq.d dr4, dr6, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpeqs.cgs b/sim/testsuite/sim/sh64/media/fcmpeqs.cgs deleted file mode 100644 index 216894d..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpeqs.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fcmpeq.s $frg, $frh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpeq1: - movi 1, r0 - fmov.ls r0, fr0 - fmov.ls r0, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -fcmpeq2: - movi 1, r0 - fmov.ls r0, fr0 - movi 2, r1 - fmov.ls r1, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpeq.s fr2, fr3, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpged.cgs b/sim/testsuite/sim/sh64/media/fcmpged.cgs deleted file mode 100644 index 52496cc..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpged.cgs +++ /dev/null @@ -1,46 +0,0 @@ -# sh testcase for fcmpge.d $drg, $drh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpge1: # 2 = 2. - movi 2, r0 - fmov.ls r0, fr0 - fmov.ls r0, fr1 - float.ld fr0, dr2 - float.ld fr1, dr4 - fcmpge.d dr2, dr4, r7 - bnei r7, 1, tr0 - -fcmpge2: # 4 > 2. - movi 4, r0 - fmov.ls r0, fr0 - movi 2, r0 - fmov.ls r0, fr1 - float.ld fr0, dr2 - float.ld fr1, dr4 - fcmpge.d dr2, dr4, r7 - bnei r7, 1, tr0 - -fcmpge3: # 2 < 4. - movi 2, r0 - fmov.ls r0, fr0 - movi 4, r0 - fmov.ls r0, fr1 - float.ld fr0, dr2 - float.ld fr1, dr4 - fcmpge.d dr2, dr4, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpges.cgs b/sim/testsuite/sim/sh64/media/fcmpges.cgs deleted file mode 100644 index 2dd0a35..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpges.cgs +++ /dev/null @@ -1,46 +0,0 @@ -# sh testcase for fcmpge.s $frg, $frh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpge1: # 2 = 2. - movi 2, r0 - fmov.ls r0, fr0 - fmov.ls r0, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpge.s fr2, fr3, r7 - bnei r7, 1, tr0 - -fcmpge2: # 3 > 2. - movi 3, r0 - fmov.ls r0, fr0 - movi 2, r0 - fmov.ls r0, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpge.s fr2, fr3, r7 - bnei r7, 1, tr0 - -fcmpge3: # 2 < 3. - movi 2, r0 - fmov.ls r0, fr0 - movi 3, r0 - fmov.ls r0, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpge.s fr2, fr3, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpgtd.cgs b/sim/testsuite/sim/sh64/media/fcmpgtd.cgs deleted file mode 100644 index aec9520..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpgtd.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fcmpgt.d $drg, $drh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpgt1: - movi 2, r0 - fmov.qd r0, dr0 - movi 1, r1 - fmov.qd r1, dr2 - float.qd dr0, dr4 - float.qd dr2, dr6 - fcmpgt.d dr4, dr6, r7 - bnei r7, 1, tr0 - -fcmpgt2: - movi 1, r0 - fmov.qd r0, dr0 - fmov.qd r0, dr2 - float.qd dr0, dr4 - float.qd dr2, dr6 - fcmpgt.d dr4, dr6, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpgts.cgs b/sim/testsuite/sim/sh64/media/fcmpgts.cgs deleted file mode 100644 index 893bbcb..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpgts.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fcmpgt.s $frg, $frh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fcmpgt1: - movi 2, r0 - fmov.ls r0, fr0 - movi 1, r1 - fmov.ls r1, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpgt.s fr2, fr3, r7 - bnei r7, 1, tr0 - -fcmpgt2: - movi 1, r0 - fmov.ls r0, fr0 - fmov.ls r0, fr1 - float.ls fr0, fr2 - float.ls fr1, fr3 - fcmpgt.s fr2, fr3, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpund.cgs b/sim/testsuite/sim/sh64/media/fcmpund.cgs deleted file mode 100644 index b87fb8d..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpund.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for fcmpun.d $drg, $drh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fcmpund: - movi 0, r0 - movi 1, r1 - fmov.qd r0, dr0 - float.qd dr0, dr0 - fmov.qd r1, dr2 - float.qd dr2, dr2 - fcmpun.d dr0, dr2, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcmpuns.cgs b/sim/testsuite/sim/sh64/media/fcmpuns.cgs deleted file mode 100644 index 6c2ed96..0000000 --- a/sim/testsuite/sim/sh64/media/fcmpuns.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for fcmpun.s $frg, $frh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fcmpuns: - movi 0, r0 - movi 1, r1 - fmov.ls r0, fr0 - float.ls fr0, fr0 - fmov.ls r1, fr1 - float.ls fr1, fr1 - fcmpun.s fr0, fr1, r7 - bnei r7, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcnvds.cgs b/sim/testsuite/sim/sh64/media/fcnvds.cgs deleted file mode 100644 index aa6c993..0000000 --- a/sim/testsuite/sim/sh64/media/fcnvds.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for fcnv.ds $drgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fcnvds: - movi 9, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - fcnv.ds dr0, fr3 - movi 9, r0 - fmov.ls r0, fr4 - float.ls fr4, fr4 - fcmpeq.s fr3, fr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fcnvsd.cgs b/sim/testsuite/sim/sh64/media/fcnvsd.cgs deleted file mode 100644 index 6c2396f..0000000 --- a/sim/testsuite/sim/sh64/media/fcnvsd.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for fcnv.sd $frgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fcnvsd: - movi 9, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - fcnv.sd fr0, dr2 - movi 9, r0 - fmov.qd r0, dr4 - float.qd dr4, dr4 - fcmpeq.d dr2, dr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fdivd.cgs b/sim/testsuite/sim/sh64/media/fdivd.cgs deleted file mode 100644 index 62401c6..0000000 --- a/sim/testsuite/sim/sh64/media/fdivd.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for fdiv.d $drg, $drh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fdivd1: - movi 1, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - movi 2, r1 - fmov.qd r1, dr2 - float.qd dr2, dr2 - fdiv.d dr0, dr2, dr4 - -fdvid2: - movi 6, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - movi 2, r1 - fmov.qd r1, dr2 - float.qd dr2, dr2 - fdiv.d dr0, dr2, dr4 - movi 3, r3 - fmov.qd r3, dr6 - float.qd dr6, dr6 - fcmpeq.d dr4, dr6, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fdivs.cgs b/sim/testsuite/sim/sh64/media/fdivs.cgs deleted file mode 100644 index 9b20f68..0000000 --- a/sim/testsuite/sim/sh64/media/fdivs.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for fdiv.s $frg, $frh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fdivs1: - movi 1, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - movi 2, r1 - fmov.ls r1, fr1 - float.ls fr1, fr1 - fdiv.s fr0, fr1, fr2 - -fdvis2: - movi 6, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - movi 2, r1 - fmov.ls r1, fr1 - float.ls fr1, fr1 - fdiv.s fr0, fr1, fr2 - movi 3, r3 - fmov.ls r3, fr3 - float.ls fr3, fr3 - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fgetscr.cgs b/sim/testsuite/sim/sh64/media/fgetscr.cgs deleted file mode 100644 index 6aa2274..0000000 --- a/sim/testsuite/sim/sh64/media/fgetscr.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for fgetscr $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fgetscr -fgetscr: - fgetscr fr0 - - pass diff --git a/sim/testsuite/sim/sh64/media/fiprs.cgs b/sim/testsuite/sim/sh64/media/fiprs.cgs deleted file mode 100644 index fef62d1..0000000 --- a/sim/testsuite/sim/sh64/media/fiprs.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for fipr.s $fvg, $fvh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - .macro _load val, fpreg - # This macro clobbers r0. - movi \val, r0 - fmov.ls r0, \fpreg - float.ls \fpreg, \fpreg - .endm - - start - - .global fiprs -init: - pta wrong, tr0 - - _load 1, fr0 - _load 2, fr1 - _load 3, fr2 - _load 4, fr3 - _load 1, fr4 - _load 2, fr5 - _load 3, fr6 - _load 4, fr7 - -fiprs: - fipr.s fv0, fv4, fr9 - -check: - _load 30, fr10 - fcmpeq.s fr9, fr10, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fldd.cgs b/sim/testsuite/sim/sh64/media/fldd.cgs deleted file mode 100644 index ded2a9f..0000000 --- a/sim/testsuite/sim/sh64/media/fldd.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for fld.d $rm, $disp10x8, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 0x2800, r0 - fld.d r0, 0, dr0 - fld.d r0, 8, dr0 - fld.d r0, -8, dr0 - pass diff --git a/sim/testsuite/sim/sh64/media/fldp.cgs b/sim/testsuite/sim/sh64/media/fldp.cgs deleted file mode 100644 index 8727110..0000000 --- a/sim/testsuite/sim/sh64/media/fldp.cgs +++ /dev/null @@ -1,16 +0,0 @@ -# sh testcase for fld.p $rm, $disp10x8, $fpf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 0x2800, r0 - -fldp: - fld.p r0, 0, fp0 - fld.p r0, 8, fp2 - fld.p r0, -8, fp4 - pass diff --git a/sim/testsuite/sim/sh64/media/flds.cgs b/sim/testsuite/sim/sh64/media/flds.cgs deleted file mode 100644 index 75d5e96..0000000 --- a/sim/testsuite/sim/sh64/media/flds.cgs +++ /dev/null @@ -1,13 +0,0 @@ -# sh testcase for fld.s $rm, $disp10x4, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 0x2800, r0 - fld.s r0, 0, fr0 - fld.s r0, 4, fr0 - fld.s r0, -4, fr0 - pass diff --git a/sim/testsuite/sim/sh64/media/fldxd.cgs b/sim/testsuite/sim/sh64/media/fldxd.cgs deleted file mode 100644 index 63cb56b..0000000 --- a/sim/testsuite/sim/sh64/media/fldxd.cgs +++ /dev/null @@ -1,16 +0,0 @@ -# sh testcase for fldx.d $rm, $rn, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 0x2800, r0 - movi 0, r1 - fldx.d r0, r1, dr0 - movi 8, r1 - fldx.d r0, r1, dr0 - movi -8, r1 - fldx.d r0, r1, dr0 - pass diff --git a/sim/testsuite/sim/sh64/media/fldxp.cgs b/sim/testsuite/sim/sh64/media/fldxp.cgs deleted file mode 100644 index 3d929c6..0000000 --- a/sim/testsuite/sim/sh64/media/fldxp.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for fldx.p $rm, $rn, $fpf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 0x2800, r0 - -fldxp: - movi 0, r1 - fldx.p r0, r1, fp0 - - movi 8, r1 - fldx.p r0, r1, fp2 - - movi -8, r1 - fldx.p r0, r1, fp4 - - pass diff --git a/sim/testsuite/sim/sh64/media/fldxs.cgs b/sim/testsuite/sim/sh64/media/fldxs.cgs deleted file mode 100644 index 10feb3e..0000000 --- a/sim/testsuite/sim/sh64/media/fldxs.cgs +++ /dev/null @@ -1,16 +0,0 @@ -# sh testcase for fldx.s $rm, $rn, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 0x2800, r0 - movi 0, r1 - fldx.s r0, r1, fr0 - movi 4, r1 - fldx.s r0, r1, fr0 - movi -4, r1 - fldx.s r0, r1, fr0 - pass diff --git a/sim/testsuite/sim/sh64/media/floatld.cgs b/sim/testsuite/sim/sh64/media/floatld.cgs deleted file mode 100644 index 31f6111..0000000 --- a/sim/testsuite/sim/sh64/media/floatld.cgs +++ /dev/null @@ -1,12 +0,0 @@ -# sh testcase for float.ld $frgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 1, r0 - fmov.ls r0, fr0 - float.ld fr0, dr0 - pass diff --git a/sim/testsuite/sim/sh64/media/floatls.cgs b/sim/testsuite/sim/sh64/media/floatls.cgs deleted file mode 100644 index 4c8fb99..0000000 --- a/sim/testsuite/sim/sh64/media/floatls.cgs +++ /dev/null @@ -1,12 +0,0 @@ -# sh testcase for float.ls $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 1, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - pass diff --git a/sim/testsuite/sim/sh64/media/floatqd.cgs b/sim/testsuite/sim/sh64/media/floatqd.cgs deleted file mode 100644 index ea5ddd9..0000000 --- a/sim/testsuite/sim/sh64/media/floatqd.cgs +++ /dev/null @@ -1,12 +0,0 @@ -# sh testcase for float.qd $drgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 1, r0 - fmov.qd r0, dr0 - float.qd dr0, dr2 - pass diff --git a/sim/testsuite/sim/sh64/media/floatqs.cgs b/sim/testsuite/sim/sh64/media/floatqs.cgs deleted file mode 100644 index fcf35e2..0000000 --- a/sim/testsuite/sim/sh64/media/floatqs.cgs +++ /dev/null @@ -1,12 +0,0 @@ -# sh testcase for float.qs $drgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - movi 1, r0 - fmov.qd r0, dr0 - float.qs dr0, fr1 - pass diff --git a/sim/testsuite/sim/sh64/media/fmacs.cgs b/sim/testsuite/sim/sh64/media/fmacs.cgs deleted file mode 100644 index 62219c5..0000000 --- a/sim/testsuite/sim/sh64/media/fmacs.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for fmac.s $frg, $frh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fmacs: - movi 2, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - - movi 3, r1 - fmov.ls r1, fr1 - float.ls fr1, fr1 - - movi 4, r2 - fmov.ls r2, fr2 - float.ls fr2, fr2 - - fmac.s fr0, fr1, fr2 - - movi 10, r3 - fmov.ls r3, fr3 - float.ls fr3, fr3 - - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmovd.cgs b/sim/testsuite/sim/sh64/media/fmovd.cgs deleted file mode 100644 index 03c05ad..0000000 --- a/sim/testsuite/sim/sh64/media/fmovd.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for fmov.d $drgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fmovd: - movi 4, r0 - fmov.qd r0, dr0 - float.qd dr0, dr2 - fmov.d dr2, dr4 - fcmpeq.d dr2, dr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmovdq.cgs b/sim/testsuite/sim/sh64/media/fmovdq.cgs deleted file mode 100644 index ff5c3fe..0000000 --- a/sim/testsuite/sim/sh64/media/fmovdq.cgs +++ /dev/null @@ -1,23 +0,0 @@ -# sh testcase for fmov.dq $drgh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fmovdq: - movi 4, r0 - fmov.qd r0, dr0 - fmov.dq dr0, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmovls.cgs b/sim/testsuite/sim/sh64/media/fmovls.cgs deleted file mode 100644 index 850ec33..0000000 --- a/sim/testsuite/sim/sh64/media/fmovls.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for fmov.ls $rm, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -fmovls0: - movi 0, r0 - fmov.ls r0, fr0 - -fmovls1: - movi 1, r1 - fmov.ls r1, fr1 - -upper: - movi 1, r2 - shlli r2, 63, r2 - ori r2, 3, r2 - # Bit 63 should be ignored. - fmov.ls r2, fr2 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/fmovqd.cgs b/sim/testsuite/sim/sh64/media/fmovqd.cgs deleted file mode 100644 index 64eac72..0000000 --- a/sim/testsuite/sim/sh64/media/fmovqd.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for fmov.qd $rm, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fmovdq: - movi 4, r0 - fmov.qd r0, dr0 - fmov.dq dr0, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmovs.cgs b/sim/testsuite/sim/sh64/media/fmovs.cgs deleted file mode 100644 index f126aa5..0000000 --- a/sim/testsuite/sim/sh64/media/fmovs.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for fmov.s $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fmovs: - movi 8, r0 - fmov.ls r0, fr7 - float.ls fr7, fr0 - fmov.s fr0, fr1 - fcmpeq.s fr0, fr1, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmovsl.cgs b/sim/testsuite/sim/sh64/media/fmovsl.cgs deleted file mode 100644 index 7dfdab1..0000000 --- a/sim/testsuite/sim/sh64/media/fmovsl.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for fmov.sl $frgh, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -fmovsl: - pta wrong, tr0 - movi 9, r0 - fmov.ls r0, fr0 - fmov.sl fr0, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmuld.cgs b/sim/testsuite/sim/sh64/media/fmuld.cgs deleted file mode 100644 index 2ad67cd..0000000 --- a/sim/testsuite/sim/sh64/media/fmuld.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for fmul.d $drg, $drh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -fmuld1: - movi 2, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - movi 3, r1 - fmov.qd r1, dr2 - float.qd dr2, dr2 - fmul.d dr0, dr2, dr4 - movi 6, r2 - fmov.qd r2, dr6 - float.qd dr6, dr6 - fcmpeq.d dr4, dr6, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fmuls.cgs b/sim/testsuite/sim/sh64/media/fmuls.cgs deleted file mode 100644 index 4b8875f..0000000 --- a/sim/testsuite/sim/sh64/media/fmuls.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for fmul.s $frg, $frh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -fmuls1: - movi 2, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - movi 3, r1 - fmov.ls r1, fr1 - float.ls fr1, fr1 - fmul.s fr0, fr1, fr2 - movi 6, r2 - fmov.ls r2, fr3 - float.ls fr3, fr3 - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fnegd.cgs b/sim/testsuite/sim/sh64/media/fnegd.cgs deleted file mode 100644 index 67b3813..0000000 --- a/sim/testsuite/sim/sh64/media/fnegd.cgs +++ /dev/null @@ -1,35 +0,0 @@ -# sh testcase for fneg.d $drgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - -fnegd0: - # Ensure fnegd(0) = 0. - fmov.ls r0, fr7 - float.ld fr7, dr0 - fneg.d dr0, dr2 - fcmpeq.d dr0, dr2, r7 - bnei r7, 1, tr0 - -fnegd1: - # Ensure fnegd(fnegd(1)) = 1. - fmov.ls r1, fr7 - float.ld fr7, dr0 - fneg.d dr0, dr2 - fneg.d dr2, dr4 - fcmpeq.d dr0, dr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fnegs.cgs b/sim/testsuite/sim/sh64/media/fnegs.cgs deleted file mode 100644 index 9ad625a..0000000 --- a/sim/testsuite/sim/sh64/media/fnegs.cgs +++ /dev/null @@ -1,35 +0,0 @@ -# sh testcase for fneg.s $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - -fnegs0: - # Ensure fnegs(0) = 0. - fmov.ls r0, fr7 - float.ls fr7, fr0 - fneg.s fr0, fr1 - fcmpeq.s fr0, fr1, r7 - bnei r7, 1, tr0 - -fnegs1: - # Ensure fnegs(fnegs(1)) = 1. - fmov.ls r1, fr7 - float.ls fr7, fr0 - fneg.s fr0, fr1 - fneg.s fr1, fr2 - fcmpeq.s fr0, fr2, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fputscr.cgs b/sim/testsuite/sim/sh64/media/fputscr.cgs deleted file mode 100644 index 28d2e72..0000000 --- a/sim/testsuite/sim/sh64/media/fputscr.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for fputscr $frgh -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fputscr -fputscr: - fputscr fr0 - - pass diff --git a/sim/testsuite/sim/sh64/media/fsqrtd.cgs b/sim/testsuite/sim/sh64/media/fsqrtd.cgs deleted file mode 100644 index ae61200..0000000 --- a/sim/testsuite/sim/sh64/media/fsqrtd.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for fsqrt.d $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 9, r0 - fmov.ls r0, fr7 - float.ld fr7, dr0 - movi 3, r1 - fmov.ls r1, fr7 - float.ld fr7, dr2 - -fsqrtd: - fsqrt.d dr0, dr4 - fcmpeq.d dr2, dr4, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fsqrts.cgs b/sim/testsuite/sim/sh64/media/fsqrts.cgs deleted file mode 100644 index f118393..0000000 --- a/sim/testsuite/sim/sh64/media/fsqrts.cgs +++ /dev/null @@ -1,27 +0,0 @@ -# sh testcase for fsqrt.s $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 9, r0 - fmov.ls r0, fr7 - float.ls fr7, fr0 - movi 3, r1 - fmov.ls r1, fr7 - float.ls fr7, fr2 - -fsqrts: - fsqrt.s fr0, fr1 - fcmpeq.s fr1, fr2, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fstd.cgs b/sim/testsuite/sim/sh64/media/fstd.cgs deleted file mode 100644 index 16ab5b6..0000000 --- a/sim/testsuite/sim/sh64/media/fstd.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for fst.d $rm, $disp10x8, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fstd -fstd: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - # Set target address. - movi 0x2800, r1 - fmov.qd r0, dr0 - - fst.d r1, 0, dr0 - fst.d r1, 8, dr0 - fst.d r1, -8, dr0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/fstp.cgs b/sim/testsuite/sim/sh64/media/fstp.cgs deleted file mode 100644 index e0c396a..0000000 --- a/sim/testsuite/sim/sh64/media/fstp.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for fst.p $rm, $disp10x8, $fpf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fstp -fstp: - fst.p r0, 0, fp0 - - pass diff --git a/sim/testsuite/sim/sh64/media/fsts.cgs b/sim/testsuite/sim/sh64/media/fsts.cgs deleted file mode 100644 index fb692cf..0000000 --- a/sim/testsuite/sim/sh64/media/fsts.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for fst.s $rm, $disp10x4, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fsts -fsts: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - # Set target address. - movi 0x2800, r1 - fmov.ls r0, fr0 - - fst.s r1, 0, fr0 - fst.s r1, 4, fr0 - fst.s r1, -4, fr0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/fstxd.cgs b/sim/testsuite/sim/sh64/media/fstxd.cgs deleted file mode 100644 index 10f6c14..0000000 --- a/sim/testsuite/sim/sh64/media/fstxd.cgs +++ /dev/null @@ -1,31 +0,0 @@ -# sh testcase for fstx.d $rm, $rn, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fstxd -fstxd: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - fmov.qd r0, dr0 - movi 0x2800, r1 - movi -8, r2 - fstx.d r1, r2, dr0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/fstxp.cgs b/sim/testsuite/sim/sh64/media/fstxp.cgs deleted file mode 100644 index 1829f58..0000000 --- a/sim/testsuite/sim/sh64/media/fstxp.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for fstx.p $rm, $rn, $fpf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fstxp -fstxp: - fstx.p r0, r0, fp0 - - pass diff --git a/sim/testsuite/sim/sh64/media/fstxs.cgs b/sim/testsuite/sim/sh64/media/fstxs.cgs deleted file mode 100644 index 0b4ff96..0000000 --- a/sim/testsuite/sim/sh64/media/fstxs.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for fstx.s $rm, $rn, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - .global fstxs -fstxs: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - fmov.ls r0, fr0 - movi 0x2800, r1 - movi -8, r2 - fstx.s r1, r2, fr0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/fsubd.cgs b/sim/testsuite/sim/sh64/media/fsubd.cgs deleted file mode 100644 index 93dc421..0000000 --- a/sim/testsuite/sim/sh64/media/fsubd.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fsub.d $drg, $drh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fsubd -init: - pta wrong, tr0 - -fsubd: - movi 9, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - - movi 3, r0 - fmov.qd r0, dr2 - float.qd dr2, dr2 - - fsub.d dr0, dr2, dr4 - - movi 6, r0 - fmov.qd r0, dr6 - float.qd dr6, dr6 - - fcmpeq.d dr4, dr6, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/fsubs.cgs b/sim/testsuite/sim/sh64/media/fsubs.cgs deleted file mode 100644 index b009f09..0000000 --- a/sim/testsuite/sim/sh64/media/fsubs.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for fsub.s $frg, $frh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global fsubs -init: - pta wrong, tr0 - -fsubs: - movi 9, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - - movi 3, r0 - fmov.ls r0, fr1 - float.ls fr1, fr1 - - fsub.s fr0, fr1, fr2 - - movi 6, r0 - fmov.ls r0, fr3 - float.ls fr3, fr3 - - fcmpeq.s fr2, fr3, r7 - bnei r7, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ftrcdl.cgs b/sim/testsuite/sim/sh64/media/ftrcdl.cgs deleted file mode 100644 index 3aafb83..0000000 --- a/sim/testsuite/sim/sh64/media/ftrcdl.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for ftrc.dl $drgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ftrcdl -init: - pta wrong, tr0 - -ftrcdl: - movi -9, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - ftrc.dl dr0, fr0 - fmov.sl fr0, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ftrcdq.cgs b/sim/testsuite/sim/sh64/media/ftrcdq.cgs deleted file mode 100644 index 6cd63fb..0000000 --- a/sim/testsuite/sim/sh64/media/ftrcdq.cgs +++ /dev/null @@ -1,24 +0,0 @@ -# sh testcase for ftrc.dq $drgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -ftrcdq: - movi -9, r0 - fmov.qd r0, dr0 - float.qd dr0, dr0 - ftrc.dq dr0, dr2 - fmov.dq dr2, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ftrcsl.cgs b/sim/testsuite/sim/sh64/media/ftrcsl.cgs deleted file mode 100644 index 9fd7fae..0000000 --- a/sim/testsuite/sim/sh64/media/ftrcsl.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for ftrc.sl $frgh, $frf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ftrcsl -init: - pta wrong, tr0 - -ftrcsl: - movi -9, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - ftrc.sl fr0, fr1 - fmov.sl fr1, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ftrcsq.cgs b/sim/testsuite/sim/sh64/media/ftrcsq.cgs deleted file mode 100644 index 8f19d59..0000000 --- a/sim/testsuite/sim/sh64/media/ftrcsq.cgs +++ /dev/null @@ -1,25 +0,0 @@ -# sh testcase for ftrc.sq $frgh, $drf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -ftrcsq: - movi -9, r0 - fmov.ls r0, fr0 - float.ls fr0, fr0 - ftrc.sq fr0, dr2 - fmov.dq dr2, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ftrvs.cgs b/sim/testsuite/sim/sh64/media/ftrvs.cgs deleted file mode 100644 index be7a75a..0000000 --- a/sim/testsuite/sim/sh64/media/ftrvs.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for ftrv.s $mtrxg, $fvh, $fvf -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - .macro _load val, fpreg - # This macro clobbers r0. - movi \val, r0 - fmov.ls r0, \fpreg - float.ls \fpreg, \fpreg - .endm - - start - -init: - pta wrong, tr0 - - _load 1, fr0 - _load 2, fr4 - _load 3, fr8 - _load 4, fr12 - _load 5, fr1 - _load 6, fr5 - _load 7, fr9 - _load 8, fr13 - _load 9, fr2 - _load 10, fr6 - _load 11, fr10 - _load 12, fr14 - _load 13, fr3 - _load 14, fr7 - _load 15, fr11 - _load 16, fr15 - - _load 1, fr16 - _load 2, fr17 - _load 3, fr18 - _load 4, fr19 - -ftrvs: - ftrv.s mtrx0, fv16, fv20 - -check: - _load 30, fr0 - _load 70, fr1 - _load 110, fr2 - _load 150, fr3 - - fcmpeq.s fr0, fr20, r0 - bnei r0, 1, tr0 - - fcmpeq.s fr1, fr21, r0 - bnei r0, 1, tr0 - - fcmpeq.s fr2, fr22, r0 - bnei r0, 1, tr0 - - fcmpeq.s fr3, fr23, r0 - bnei r0, 1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/getcfg.cgs b/sim/testsuite/sim/sh64/media/getcfg.cgs deleted file mode 100644 index d151739..0000000 --- a/sim/testsuite/sim/sh64/media/getcfg.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for getcfg $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - getcfg r0, 0, r0 - pass diff --git a/sim/testsuite/sim/sh64/media/getcon.cgs b/sim/testsuite/sim/sh64/media/getcon.cgs deleted file mode 100644 index 8eeb43c..0000000 --- a/sim/testsuite/sim/sh64/media/getcon.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for getcon $crk, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -getcon1: - movi 22, r0 - putcon r0, cr0 - getcon cr0, r1 - bne r0, r1, tr0 - -getcon2: - movi 12, r0 - shlli r0, 35, r0 - putcon r0, cr20 - getcon cr20, r20 - bne r0, r20, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/gettr.cgs b/sim/testsuite/sim/sh64/media/gettr.cgs deleted file mode 100644 index 8840a36..0000000 --- a/sim/testsuite/sim/sh64/media/gettr.cgs +++ /dev/null @@ -1,48 +0,0 @@ -# sh testcase for gettr $trb, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - # tr0 is reserved. - # don't use it anywhere else in this test. - pta wrong, tr0 - -gettr1: - # Put garbage in r1, r2. - movi 20, r1 - movi 30, r2 - - pta foo, tr1 - pta foo, tr2 - -check1: - gettr tr1, r1 - gettr tr2, r2 - bne r1, r2, tr0 - -gettr2: - # Put garbage in r3, r4. - movi 21, r3 - movi 42, r4 - -check2: - pta foo, tr1 - gettr tr1, r2 - ptabs r2, tr2 - gettr tr2, r3 - ptabs r3, tr3 - gettr tr3, r4 - bne r2, r4, tr0 - -okay: - pass - -wrong: - fail - -foo: - nop diff --git a/sim/testsuite/sim/sh64/media/icbi.cgs b/sim/testsuite/sim/sh64/media/icbi.cgs deleted file mode 100644 index 9ba1845..0000000 --- a/sim/testsuite/sim/sh64/media/icbi.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for icbi $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - icbi r0, 0 - pass diff --git a/sim/testsuite/sim/sh64/media/ldb.cgs b/sim/testsuite/sim/sh64/media/ldb.cgs deleted file mode 100644 index fad1e6e..0000000 --- a/sim/testsuite/sim/sh64/media/ldb.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for ld.b $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 20, r3 - shlli r3, 8, r3 - -ldb1: - ld.b r3, 0, r0 -ldb2: - ld.b r3, -1, r0 -ldb3: - ld.b r3, 1, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldhil.cgs b/sim/testsuite/sim/sh64/media/ldhil.cgs deleted file mode 100644 index 4323985..0000000 --- a/sim/testsuite/sim/sh64/media/ldhil.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for ldhi.l $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ldhil -ldhil: - ldhi.l r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/ldhiq.cgs b/sim/testsuite/sim/sh64/media/ldhiq.cgs deleted file mode 100644 index c34a952..0000000 --- a/sim/testsuite/sim/sh64/media/ldhiq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for ldhi.q $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ldhiq -ldhiq: - ldhi.q r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/ldl.cgs b/sim/testsuite/sim/sh64/media/ldl.cgs deleted file mode 100644 index b8b8725..0000000 --- a/sim/testsuite/sim/sh64/media/ldl.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for ld.l $rm, $disp10x4, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 20, r3 - shlli r3, 8, r3 - -ldl1: - ld.l r3, 0, r0 -ldl2: - ld.l r3, -4, r0 -ldl3: - ld.l r3, 4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldlol.cgs b/sim/testsuite/sim/sh64/media/ldlol.cgs deleted file mode 100644 index 8204f40..0000000 --- a/sim/testsuite/sim/sh64/media/ldlol.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for ldlo.l $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ldlol -ldlol: - ldlo.l r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/ldloq.cgs b/sim/testsuite/sim/sh64/media/ldloq.cgs deleted file mode 100644 index 0cf128e..0000000 --- a/sim/testsuite/sim/sh64/media/ldloq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for ldlo.q $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ldloq -ldloq: - ldlo.q r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/ldq.cgs b/sim/testsuite/sim/sh64/media/ldq.cgs deleted file mode 100644 index cacc076..0000000 --- a/sim/testsuite/sim/sh64/media/ldq.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for ld.q $rm, $disp10x8, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 20, r3 - shlli r3, 8, r3 - -ldl1: - ld.q r3, 0, r0 -ldl2: - ld.q r3, -8, r0 -ldl3: - ld.q r3, 8, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldub.cgs b/sim/testsuite/sim/sh64/media/ldub.cgs deleted file mode 100644 index 825ce64..0000000 --- a/sim/testsuite/sim/sh64/media/ldub.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for ld.ub $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi 20, r3 - shlli r3, 8, r3 - -ldub1: - ld.ub r3, 0, r0 -ldub2: - ld.ub r3, -1, r0 -ldub3: - ld.ub r3, 1, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/lduw.cgs b/sim/testsuite/sim/sh64/media/lduw.cgs deleted file mode 100644 index a329802..0000000 --- a/sim/testsuite/sim/sh64/media/lduw.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for ld.uw $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi 20, r3 - shlli r3, 8, r3 - -lduw1: - ld.uw r3, 0, r0 -lduw2: - ld.uw r3, -2, r0 -lduw3: - ld.uw r3, 2, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldw.cgs b/sim/testsuite/sim/sh64/media/ldw.cgs deleted file mode 100644 index d394055..0000000 --- a/sim/testsuite/sim/sh64/media/ldw.cgs +++ /dev/null @@ -1,21 +0,0 @@ -# sh testcase for ld.w $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 20, r3 - shlli r3, 8, r3 - -ldw1: - ld.w r3, 0, r0 -ldw2: - ld.w r3, -2, r0 -ldw3: - ld.w r3, 2, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxb.cgs b/sim/testsuite/sim/sh64/media/ldxb.cgs deleted file mode 100644 index 36038df..0000000 --- a/sim/testsuite/sim/sh64/media/ldxb.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for ldx.b $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -ldxb1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.b r3, r4, r0 - -ldxb2: - movi 20, r3 - shlli r3, 8, r3 - movi 1, r4 - ldx.b r3, r4, r0 - -ldxb3: - movi 20, r3 - shlli r3, 8, r3 - movi -1, r4 - ldx.b r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxl.cgs b/sim/testsuite/sim/sh64/media/ldxl.cgs deleted file mode 100644 index 0596e9f..0000000 --- a/sim/testsuite/sim/sh64/media/ldxl.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for ldx.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -ldxl1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.l r3, r4, r0 - -ldxl2: - movi 20, r3 - shlli r3, 8, r3 - movi 4, r4 - ldx.l r3, r4, r0 - -ldxl3: - movi 20, r3 - shlli r3, 8, r3 - movi -4, r4 - ldx.l r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxq.cgs b/sim/testsuite/sim/sh64/media/ldxq.cgs deleted file mode 100644 index 1247f22..0000000 --- a/sim/testsuite/sim/sh64/media/ldxq.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for ldx.q $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -ldxq1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.q r3, r4, r0 - -ldxq2: - movi 20, r3 - shlli r3, 8, r3 - movi 8, r4 - ldx.q r3, r4, r0 - -ldxq3: - movi 20, r3 - shlli r3, 8, r3 - movi -8, r4 - ldx.q r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxub.cgs b/sim/testsuite/sim/sh64/media/ldxub.cgs deleted file mode 100644 index e863a3b..0000000 --- a/sim/testsuite/sim/sh64/media/ldxub.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for ldx.ub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -ldxub1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.ub r3, r4, r0 - -ldxub2: - movi 20, r3 - shlli r3, 8, r3 - movi 1, r4 - ldx.ub r3, r4, r0 - -ldxub3: - movi 20, r3 - shlli r3, 8, r3 - movi -1, r4 - ldx.ub r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxuw.cgs b/sim/testsuite/sim/sh64/media/ldxuw.cgs deleted file mode 100644 index 282812d..0000000 --- a/sim/testsuite/sim/sh64/media/ldxuw.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for ldx.uw $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -ldxuw1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.uw r3, r4, r0 - -ldxuw2: - movi 20, r3 - shlli r3, 8, r3 - movi 2, r4 - ldx.uw r3, r4, r0 - -ldxuw3: - movi 20, r3 - shlli r3, 8, r3 - movi -2, r4 - ldx.uw r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ldxw.cgs b/sim/testsuite/sim/sh64/media/ldxw.cgs deleted file mode 100644 index d377fef..0000000 --- a/sim/testsuite/sim/sh64/media/ldxw.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for ldx.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -ldxw1: - movi 20, r3 - shlli r3, 8, r3 - movi 0, r4 - ldx.w r3, r4, r0 - -ldxw2: - movi 20, r3 - shlli r3, 8, r3 - movi 2, r4 - ldx.w r3, r4, r0 - -ldxw3: - movi 20, r3 - shlli r3, 8, r3 - movi -2, r4 - ldx.w r3, r4, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/mabsl.cgs b/sim/testsuite/sim/sh64/media/mabsl.cgs deleted file mode 100644 index a8af663..0000000 --- a/sim/testsuite/sim/sh64/media/mabsl.cgs +++ /dev/null @@ -1,39 +0,0 @@ -# sh testcase for mabs.l $rm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mabsl -init: - pta wrong, tr0 - -mabsl1: - # Pack { 1 3 } into R0. - _packl 1, 3, r0 - - mabs.l r0, r1 - - # Test for { 1 3 } in R0. - _packl 1, 3, r2 - bne r0, r2, tr0 - -mabsl2: - # Pack { -1, -1 } into R0. - _packl 1, 1, r0 - - # Set the left sign bit. - movi 1, r1 - shlli r1, 63, r1 - or r0, r1, r0 - - mabs.l r0, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mabsw.cgs b/sim/testsuite/sim/sh64/media/mabsw.cgs deleted file mode 100644 index f4e980a..0000000 --- a/sim/testsuite/sim/sh64/media/mabsw.cgs +++ /dev/null @@ -1,38 +0,0 @@ -# sh testcase for mabs.w $rm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -mabsw1: - # Pack { 1 3 5 7 } into R0. - _packw 1, 3, 5, 7, r0 - - mabs.l r0, r1 - - # Test for { 1 3 5 7 } in R0. - _packw 1, 3, 5, 7, r2 - bne r0, r2, tr0 - -mabsw2: - # Pack { -1, -1, -1, -1 } into R0. - _packw 1, 1, 1, 1, r0 - - # Set the left sign bit - movi 1, r1 - shlli r1, 63, r1 - or r0, r1, r0 - - mabs.w r0, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/maddl.cgs b/sim/testsuite/sim/sh64/media/maddl.cgs deleted file mode 100644 index 4bdf546..0000000 --- a/sim/testsuite/sim/sh64/media/maddl.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for madd.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -maddl: - # Load { 1 2 } into r0. - _packl 1, 2, r0 - # Load { 3 4 } into r1. - _packl 3, 4, r1 - - # Add slices to produce { 4 6 }. - madd.l r0, r1, r2 - - _packl 4, 6, r3 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/maddsl.cgs b/sim/testsuite/sim/sh64/media/maddsl.cgs deleted file mode 100644 index 3977275..0000000 --- a/sim/testsuite/sim/sh64/media/maddsl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for madds.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global maddsl -maddsl: - madds.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/maddsub.cgs b/sim/testsuite/sim/sh64/media/maddsub.cgs deleted file mode 100644 index a55f927..0000000 --- a/sim/testsuite/sim/sh64/media/maddsub.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for madds.ub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global maddsub -maddsub: - madds.ub r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/maddsw.cgs b/sim/testsuite/sim/sh64/media/maddsw.cgs deleted file mode 100644 index 45a774e..0000000 --- a/sim/testsuite/sim/sh64/media/maddsw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for madds.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global maddsw -maddsw: - madds.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/maddw.cgs b/sim/testsuite/sim/sh64/media/maddw.cgs deleted file mode 100644 index b220ef4..0000000 --- a/sim/testsuite/sim/sh64/media/maddw.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for madd.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -maddw: - # Load { 1 2 3 4 } into R0. - _packw 1, 2, 3, 4, r0 - - # Load { 3 4 5 6 } into R1. - _packw 3, 4, 5, 6, r1 - - # Add slices to produce { 4 6 8 10 }. - madd.w r0, r1, r2 - - _packw 4, 6, 8, 10, r3 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mcmpeqb.cgs b/sim/testsuite/sim/sh64/media/mcmpeqb.cgs deleted file mode 100644 index d7af6fa..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpeqb.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpeq.b $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpeqb -mcmpeqb: - mcmpeq.b r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmpeql.cgs b/sim/testsuite/sim/sh64/media/mcmpeql.cgs deleted file mode 100644 index 2851e80..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpeql.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpeq.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpeql -mcmpeql: - mcmpeq.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmpeqw.cgs b/sim/testsuite/sim/sh64/media/mcmpeqw.cgs deleted file mode 100644 index 085df84..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpeqw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpeq.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpeqw -mcmpeqw: - mcmpeq.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmpgtl.cgs b/sim/testsuite/sim/sh64/media/mcmpgtl.cgs deleted file mode 100644 index 2ace048..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpgtl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpgt.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpgtl -mcmpgtl: - mcmpgt.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmpgtub.cgs b/sim/testsuite/sim/sh64/media/mcmpgtub.cgs deleted file mode 100644 index 540ce96..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpgtub.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpgt.ub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpgtub -mcmpgtub: - mcmpgt.ub r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmpgtw.cgs b/sim/testsuite/sim/sh64/media/mcmpgtw.cgs deleted file mode 100644 index 8327451..0000000 --- a/sim/testsuite/sim/sh64/media/mcmpgtw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmpgt.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmpgtw -mcmpgtw: - mcmpgt.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcmv.cgs b/sim/testsuite/sim/sh64/media/mcmv.cgs deleted file mode 100644 index c1f59aa..0000000 --- a/sim/testsuite/sim/sh64/media/mcmv.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcmv $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcmv -mcmv: - mcmv r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcnvslw.cgs b/sim/testsuite/sim/sh64/media/mcnvslw.cgs deleted file mode 100644 index 005108b..0000000 --- a/sim/testsuite/sim/sh64/media/mcnvslw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcnvs.lw $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcnvslw -mcnvslw: - mcnvs.lw r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcnvswb.cgs b/sim/testsuite/sim/sh64/media/mcnvswb.cgs deleted file mode 100644 index 0d25920..0000000 --- a/sim/testsuite/sim/sh64/media/mcnvswb.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcnvs.wb $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcnvswb -mcnvswb: - mcnvs.wb r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mcnvswub.cgs b/sim/testsuite/sim/sh64/media/mcnvswub.cgs deleted file mode 100644 index 2fc7446..0000000 --- a/sim/testsuite/sim/sh64/media/mcnvswub.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mcnvs.wub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mcnvswub -mcnvswub: - mcnvs.wub r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mextr1.cgs b/sim/testsuite/sim/sh64/media/mextr1.cgs deleted file mode 100644 index b2cb3c3..0000000 --- a/sim/testsuite/sim/sh64/media/mextr1.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr1 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr1: - mextr1 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x2535, r3 - shlli r3, 8, r3 - ori r3, 0x45, r3 - shlli r3, 8, r3 - ori r3, 0x55, r3 - shlli r3, 8, r3 - ori r3, 0x65, r3 - shlli r3, 8, r3 - ori r3, 0x75, r3 - shlli r3, 8, r3 - ori r3, 0x85, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr2.cgs b/sim/testsuite/sim/sh64/media/mextr2.cgs deleted file mode 100644 index cf136be..0000000 --- a/sim/testsuite/sim/sh64/media/mextr2.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr2 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr2: - mextr2 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x3545, r3 - shlli r3, 8, r3 - ori r3, 0x55, r3 - shlli r3, 8, r3 - ori r3, 0x65, r3 - shlli r3, 8, r3 - ori r3, 0x75, r3 - shlli r3, 8, r3 - ori r3, 0x85, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr3.cgs b/sim/testsuite/sim/sh64/media/mextr3.cgs deleted file mode 100644 index b8d60a4..0000000 --- a/sim/testsuite/sim/sh64/media/mextr3.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr3 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr3: - mextr3 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x4555, r3 - shlli r3, 8, r3 - ori r3, 0x65, r3 - shlli r3, 8, r3 - ori r3, 0x75, r3 - shlli r3, 8, r3 - ori r3, 0x85, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - shlli r3, 8, r3 - ori r3, 0x30, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr4.cgs b/sim/testsuite/sim/sh64/media/mextr4.cgs deleted file mode 100644 index e9ebff9..0000000 --- a/sim/testsuite/sim/sh64/media/mextr4.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr4 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr4: - mextr4 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x5565, r3 - shlli r3, 8, r3 - ori r3, 0x75, r3 - shlli r3, 8, r3 - ori r3, 0x85, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - shlli r3, 8, r3 - ori r3, 0x30, r3 - shlli r3, 8, r3 - ori r3, 0x40, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr5.cgs b/sim/testsuite/sim/sh64/media/mextr5.cgs deleted file mode 100644 index c61a0c8..0000000 --- a/sim/testsuite/sim/sh64/media/mextr5.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr5 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr5: - mextr5 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x6575, r3 - shlli r3, 8, r3 - ori r3, 0x85, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - shlli r3, 8, r3 - ori r3, 0x30, r3 - shlli r3, 8, r3 - ori r3, 0x40, r3 - shlli r3, 8, r3 - ori r3, 0x50, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr6.cgs b/sim/testsuite/sim/sh64/media/mextr6.cgs deleted file mode 100644 index 5c6c7f6..0000000 --- a/sim/testsuite/sim/sh64/media/mextr6.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr6 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr6: - mextr6 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x7585, r3 - shlli r3, 8, r3 - ori r3, 0x10, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - shlli r3, 8, r3 - ori r3, 0x30, r3 - shlli r3, 8, r3 - ori r3, 0x40, r3 - shlli r3, 8, r3 - ori r3, 0x50, r3 - shlli r3, 8, r3 - ori r3, 0x60, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mextr7.cgs b/sim/testsuite/sim/sh64/media/mextr7.cgs deleted file mode 100644 index e05ec7f..0000000 --- a/sim/testsuite/sim/sh64/media/mextr7.cgs +++ /dev/null @@ -1,67 +0,0 @@ -# sh testcase for mextr7 $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - # Put a distinguised bit pattern in R0. - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - # Put another distinguished bit pattern in R1. - movi 0x1525, r1 - shlli r1, 8, r1 - ori r1, 0x35, r1 - shlli r1, 8, r1 - ori r1, 0x45, r1 - shlli r1, 8, r1 - ori r1, 0x55, r1 - shlli r1, 8, r1 - ori r1, 0x65, r1 - shlli r1, 8, r1 - ori r1, 0x75, r1 - shlli r1, 8, r1 - ori r1, 0x85, r1 - -mextr7: - mextr7 r0, r1, r2 - -check: - # Put the result in R3. - movi 0x8510, r3 - shlli r3, 8, r3 - ori r3, 0x20, r3 - shlli r3, 8, r3 - ori r3, 0x30, r3 - shlli r3, 8, r3 - ori r3, 0x40, r3 - shlli r3, 8, r3 - ori r3, 0x50, r3 - shlli r3, 8, r3 - ori r3, 0x60, r3 - shlli r3, 8, r3 - ori r3, 0x70, r3 - - pta wrong, tr0 - bne r2, r3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mmacfxwl.cgs b/sim/testsuite/sim/sh64/media/mmacfxwl.cgs deleted file mode 100644 index dd2d9a4..0000000 --- a/sim/testsuite/sim/sh64/media/mmacfxwl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmacfx.wl $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmacfxwl -mmacfxwl: - mmacfx.wl r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs b/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs deleted file mode 100644 index ba634d2..0000000 --- a/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmacnfx.wl $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmacnfx_wl -mmacnfx_wl: - mmacnfx.wl r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulfxl.cgs b/sim/testsuite/sim/sh64/media/mmulfxl.cgs deleted file mode 100644 index 7d2d1a6..0000000 --- a/sim/testsuite/sim/sh64/media/mmulfxl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmulfx.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulfxl -mmulfxl: - mmulfx.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs b/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs deleted file mode 100644 index 13fdcc7..0000000 --- a/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmulfxrp.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulfxrpw -mmulfxrpw: - mmulfxrp.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulfxw.cgs b/sim/testsuite/sim/sh64/media/mmulfxw.cgs deleted file mode 100644 index e2a66a7..0000000 --- a/sim/testsuite/sim/sh64/media/mmulfxw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmulfx.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulfxw -mmulfxw: - mmulfx.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulhiwl.cgs b/sim/testsuite/sim/sh64/media/mmulhiwl.cgs deleted file mode 100644 index 1a41ac5..0000000 --- a/sim/testsuite/sim/sh64/media/mmulhiwl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmulhi.wl $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulhiwl -mmulhiwl: - mmulhi.wl r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmull.cgs b/sim/testsuite/sim/sh64/media/mmull.cgs deleted file mode 100644 index b3ed9df..0000000 --- a/sim/testsuite/sim/sh64/media/mmull.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmul.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmull -mmull: - mmul.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmullowl.cgs b/sim/testsuite/sim/sh64/media/mmullowl.cgs deleted file mode 100644 index b50ccfc..0000000 --- a/sim/testsuite/sim/sh64/media/mmullowl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmullo.wl $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmullowl -mmullowl: - mmullo.wl r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulsumwq.cgs b/sim/testsuite/sim/sh64/media/mmulsumwq.cgs deleted file mode 100644 index 344710b..0000000 --- a/sim/testsuite/sim/sh64/media/mmulsumwq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmulsum.wq $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulsumwq -mmulsumwq: - mmulsum.wq r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mmulw.cgs b/sim/testsuite/sim/sh64/media/mmulw.cgs deleted file mode 100644 index 675c620..0000000 --- a/sim/testsuite/sim/sh64/media/mmulw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mmul.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mmulw -mmulw: - mmul.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/movi.cgs b/sim/testsuite/sim/sh64/media/movi.cgs deleted file mode 100644 index a01bcae..0000000 --- a/sim/testsuite/sim/sh64/media/movi.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for movi $imm16, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -movi0: - movi 0, r0 - bnei r0, 0, tr0 -movi1: - movi 1, r0 - bnei r0, 1, tr0 -movi2: - movi 23, r0 - bnei r0, 23, tr0 -movn: - movi -1, r0 - addi r0, 1, r0 - bnei r0, 0, tr0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/mpermw.cgs b/sim/testsuite/sim/sh64/media/mpermw.cgs deleted file mode 100644 index 3b6741e..0000000 --- a/sim/testsuite/sim/sh64/media/mpermw.cgs +++ /dev/null @@ -1,51 +0,0 @@ -# sh testcase for mperm.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - movi 27, r1 - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - -mpermw: - mperm.w r0, r1, r2 - -check: - # Expect 0x7080506030401020. - movi 0x7080, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x10, r0 - shlli r0, 8, r0 - ori r0, 0x20, r0 - - bne r0, r2, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/msadubq.cgs b/sim/testsuite/sim/sh64/media/msadubq.cgs deleted file mode 100644 index 4361883..0000000 --- a/sim/testsuite/sim/sh64/media/msadubq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msad.ubq $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msadubq -msadubq: - msad.ubq r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshaldsl.cgs b/sim/testsuite/sim/sh64/media/mshaldsl.cgs deleted file mode 100644 index 1dd86ec..0000000 --- a/sim/testsuite/sim/sh64/media/mshaldsl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshalds.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshaldsl -mshaldsl: - mshalds.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshaldsw.cgs b/sim/testsuite/sim/sh64/media/mshaldsw.cgs deleted file mode 100644 index 7ab6797..0000000 --- a/sim/testsuite/sim/sh64/media/mshaldsw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshalds.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshaldsw -mshaldsw: - mshalds.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshardl.cgs b/sim/testsuite/sim/sh64/media/mshardl.cgs deleted file mode 100644 index 0dc102e..0000000 --- a/sim/testsuite/sim/sh64/media/mshardl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshard.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshardl -mshardl: - mshard.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshardsq.cgs b/sim/testsuite/sim/sh64/media/mshardsq.cgs deleted file mode 100644 index 5f29afb..0000000 --- a/sim/testsuite/sim/sh64/media/mshardsq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshards.q $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshardsq -mshardsq: - mshards.q r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshardw.cgs b/sim/testsuite/sim/sh64/media/mshardw.cgs deleted file mode 100644 index ecc7004..0000000 --- a/sim/testsuite/sim/sh64/media/mshardw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshard.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshardw -mshardw: - mshard.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshfhib.cgs b/sim/testsuite/sim/sh64/media/mshfhib.cgs deleted file mode 100644 index b7b245e..0000000 --- a/sim/testsuite/sim/sh64/media/mshfhib.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshfhi.b $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshfhib -mshfhib: - mshfhi.b r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshfhil.cgs b/sim/testsuite/sim/sh64/media/mshfhil.cgs deleted file mode 100644 index 2fab7ae..0000000 --- a/sim/testsuite/sim/sh64/media/mshfhil.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshfhi.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshfhil -mshfhil: - mshfhi.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshfhiw.cgs b/sim/testsuite/sim/sh64/media/mshfhiw.cgs deleted file mode 100644 index 0311141..0000000 --- a/sim/testsuite/sim/sh64/media/mshfhiw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshfhi.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshfhiw -mshfhiw: - mshfhi.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshflob.cgs b/sim/testsuite/sim/sh64/media/mshflob.cgs deleted file mode 100644 index 400e81a..0000000 --- a/sim/testsuite/sim/sh64/media/mshflob.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshflo.b $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshflob -mshflob: - mshflo.b r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshflol.cgs b/sim/testsuite/sim/sh64/media/mshflol.cgs deleted file mode 100644 index 2fbdf89..0000000 --- a/sim/testsuite/sim/sh64/media/mshflol.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshflo.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshflol -mshflol: - mshflo.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshflow.cgs b/sim/testsuite/sim/sh64/media/mshflow.cgs deleted file mode 100644 index 542eb04..0000000 --- a/sim/testsuite/sim/sh64/media/mshflow.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshflo.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshflow -mshflow: - mshflo.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshlldl.cgs b/sim/testsuite/sim/sh64/media/mshlldl.cgs deleted file mode 100644 index 2a17c33..0000000 --- a/sim/testsuite/sim/sh64/media/mshlldl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshlld.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshlldl -mshlldl: - mshlld.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshlldw.cgs b/sim/testsuite/sim/sh64/media/mshlldw.cgs deleted file mode 100644 index e4afe3d..0000000 --- a/sim/testsuite/sim/sh64/media/mshlldw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshlld.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshlldw -mshlldw: - mshlld.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshlrdl.cgs b/sim/testsuite/sim/sh64/media/mshlrdl.cgs deleted file mode 100644 index 89e7077..0000000 --- a/sim/testsuite/sim/sh64/media/mshlrdl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshlrd.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshlrdl -mshlrdl: - mshlrd.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mshlrdw.cgs b/sim/testsuite/sim/sh64/media/mshlrdw.cgs deleted file mode 100644 index 4cbf280..0000000 --- a/sim/testsuite/sim/sh64/media/mshlrdw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for mshlrd.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mshlrdw -mshlrdw: - mshlrd.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/msubl.cgs b/sim/testsuite/sim/sh64/media/msubl.cgs deleted file mode 100644 index 87151fa..0000000 --- a/sim/testsuite/sim/sh64/media/msubl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msub.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msubl -msubl: - msub.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/msubsl.cgs b/sim/testsuite/sim/sh64/media/msubsl.cgs deleted file mode 100644 index 014422e..0000000 --- a/sim/testsuite/sim/sh64/media/msubsl.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msubs.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msubsl -msubsl: - msubs.l r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/msubsub.cgs b/sim/testsuite/sim/sh64/media/msubsub.cgs deleted file mode 100644 index c92c77e..0000000 --- a/sim/testsuite/sim/sh64/media/msubsub.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msubs.ub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msubsub -msubsub: - msubs.ub r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/msubsw.cgs b/sim/testsuite/sim/sh64/media/msubsw.cgs deleted file mode 100644 index 83b76a1..0000000 --- a/sim/testsuite/sim/sh64/media/msubsw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msubs.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msubsw -msubsw: - msubs.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/msubw.cgs b/sim/testsuite/sim/sh64/media/msubw.cgs deleted file mode 100644 index 9d5e639..0000000 --- a/sim/testsuite/sim/sh64/media/msubw.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for msub.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global msubw -msubw: - msub.w r0, r0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/mulsl.cgs b/sim/testsuite/sim/sh64/media/mulsl.cgs deleted file mode 100644 index d65c80c..0000000 --- a/sim/testsuite/sim/sh64/media/mulsl.cgs +++ /dev/null @@ -1,54 +0,0 @@ -# sh testcase for muls.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mulsl -init: - pta wrong, tr0 - -mulsl1: - movi 0, r0 - muls.l r0, r0, r1 - bnei r1, 0, tr0 - -mulsl2: - movi 0, r0 - movi 1, r1 - muls.l r0, r1, r2 - bnei r2, 0, tr0 - -mulsl3: - movi 1, r0 - movi 0, r1 - muls.l r0, r1, r2 - bnei r2, 0, tr0 - -mulsl4: - movi 1, r0 - movi 1, r1 - muls.l r0, r1, r2 - bnei r2, 1, tr0 - -mulsl5: - movi 2, r0 - movi 9, r1 - muls.l r0, r1, r2 - bnei r2, 18, tr0 - -mulsl6: - movi 2, r0 - movi -9, r1 - muls.l r0, r1, r2 - bnei r2, -18, tr0 - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/media/mulul.cgs b/sim/testsuite/sim/sh64/media/mulul.cgs deleted file mode 100644 index b795cf7..0000000 --- a/sim/testsuite/sim/sh64/media/mulul.cgs +++ /dev/null @@ -1,54 +0,0 @@ -# sh testcase for mulu.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global mulul -init: - pta wrong, tr0 - -mulul1: - movi 0, r0 - mulu.l r0, r0, r1 - bnei r1, 0, tr0 - -mulul2: - movi 0, r0 - movi 1, r1 - mulu.l r0, r1, r2 - bnei r2, 0, tr0 - -mulul3: - movi 1, r0 - movi 0, r1 - mulu.l r0, r1, r2 - bnei r2, 0, tr0 - -mulul4: - movi 1, r0 - movi 1, r1 - mulu.l r0, r1, r2 - bnei r2, 1, tr0 - -mulul5: - movi 2, r0 - movi 9, r1 - mulu.l r0, r1, r2 - bnei r2, 18, tr0 - -mulul6: - movi 2, r0 - movi -9, r1 - mulu.l r0, r1, r2 - beqi r2, -18, tr0 - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/media/nop.cgs b/sim/testsuite/sim/sh64/media/nop.cgs deleted file mode 100644 index a0e57530..0000000 --- a/sim/testsuite/sim/sh64/media/nop.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for nop -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - nop - pass diff --git a/sim/testsuite/sim/sh64/media/nsb.cgs b/sim/testsuite/sim/sh64/media/nsb.cgs deleted file mode 100644 index 8b3cffe..0000000 --- a/sim/testsuite/sim/sh64/media/nsb.cgs +++ /dev/null @@ -1,66 +0,0 @@ -# sh testcase for nsb $rm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -nsb0: - movi 0, r0 - nsb r0, r1 -check0: - movi 63, r4 - bne r1, r4, tr0 - -nsb1: - # set up a loop target reg. - pta again1, tr1 - # r4 holds the loop count. - movi 62, r4 - movi 1, r0 -again1: - nsb r0, r1 - bne r1, r4, tr0 - # okay? go around again. - shlli r0, 1, r0 - addi r4, -1, r4 - bnei r4, 0, tr1 - -nsb2: - # set up a loop target reg. - pta again2, tr1 - # r4 holds the loop count. - movi 63, r4 - movi -1, r0 -again2: - nsb r0, r1 - bne r1, r4, tr0 - # okay? go around again. - shlli r0, 1, r0 - addi r4, -1, r4 - bnei r4, 0, tr1 - -nsb3: - movi 1, r0 - shlli r0, 63, r0 - nsb r0, r1 -check3: - movi 0, r4 - bne r1, r4, tr0 - -nsb4: - movi 7, r0 - shlli r0, 61, r0 - nsb r0, r1 -check4: - movi 2, r4 - bne r1, r4, tr0 - -okay: - pass -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ocbi.cgs b/sim/testsuite/sim/sh64/media/ocbi.cgs deleted file mode 100644 index b210216..0000000 --- a/sim/testsuite/sim/sh64/media/ocbi.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for ocbi $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - ocbi r0, 0 - pass diff --git a/sim/testsuite/sim/sh64/media/ocbp.cgs b/sim/testsuite/sim/sh64/media/ocbp.cgs deleted file mode 100644 index 9158c6f..0000000 --- a/sim/testsuite/sim/sh64/media/ocbp.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for ocbp $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - ocbp r0, 0 - pass diff --git a/sim/testsuite/sim/sh64/media/ocbwb.cgs b/sim/testsuite/sim/sh64/media/ocbwb.cgs deleted file mode 100644 index 6addabc..0000000 --- a/sim/testsuite/sim/sh64/media/ocbwb.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for ocbwb $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - ocbwb r0, 0 - pass diff --git a/sim/testsuite/sim/sh64/media/or.cgs b/sim/testsuite/sim/sh64/media/or.cgs deleted file mode 100644 index e067592..0000000 --- a/sim/testsuite/sim/sh64/media/or.cgs +++ /dev/null @@ -1,44 +0,0 @@ -# sh testcase for or $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -or1: - movi 0, r0 - or r0, r0, r1 - bnei r1, 0, tr0 - -or2: - movi 0, r0 - movi 1, r1 - or r0, r1, r2 - bnei r2, 1, tr0 - -or3: - movi 1, r0 - movi 0, r1 - or r0, r1, r2 - bnei r2, 1, tr0 - -or4: - movi 1, r0 - or r0, r0, r1 - bnei r1, 1, tr0 - -or5: - movi 1, r0 - shlli r0, 63, r0 - movi 1, r1 - or r0, r1, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/ori.cgs b/sim/testsuite/sim/sh64/media/ori.cgs deleted file mode 100644 index 7b25542..0000000 --- a/sim/testsuite/sim/sh64/media/ori.cgs +++ /dev/null @@ -1,41 +0,0 @@ -# sh testcase for ori $rm, $imm10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -or1: - movi 0, r0 - ori r0, 0, r1 - bnei r1, 0, tr0 - -or2: - movi 0, r0 - ori r0, 1, r2 - bnei r2, 1, tr0 - -or3: - movi 1, r0 - ori r0, 0, r2 - bnei r2, 1, tr0 - -or4: - movi 1, r0 - ori r0, 1, r1 - bnei r1, 1, tr0 - -or5: - movi 1, r0 - shlli r0, 63, r0 - ori r0, 1, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/prefi.cgs b/sim/testsuite/sim/sh64/media/prefi.cgs deleted file mode 100644 index 68d7bfe..0000000 --- a/sim/testsuite/sim/sh64/media/prefi.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for prefi $rm, $disp6x32 -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - prefi r0, 0 - pass diff --git a/sim/testsuite/sim/sh64/media/pta.cgs b/sim/testsuite/sim/sh64/media/pta.cgs deleted file mode 100644 index 9f6484a..0000000 --- a/sim/testsuite/sim/sh64/media/pta.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for pta$likely $disp16, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -pta0: - pta foo, tr0 -pta1: - pta/l bar, tr1 -pta2: - pta/u baz, tr2 - movi 0, r0 - bnei r0, 1, tr2 - fail - -foo: -bar: -baz: - pass - fail - fail - fail - fail diff --git a/sim/testsuite/sim/sh64/media/ptabs.cgs b/sim/testsuite/sim/sh64/media/ptabs.cgs deleted file mode 100644 index 0c01f838..0000000 --- a/sim/testsuite/sim/sh64/media/ptabs.cgs +++ /dev/null @@ -1,25 +0,0 @@ -# sh testcase for ptabs$likely $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global ptabs -ptabs: - movi 16, r0 - shlli r0, 8, r0 - # Add one to stay in SHmedia mode. - addi r0, 29, r0 - ptabs r0, tr0 - - # Now jump. - beqi r63, 0, tr0 - -wrong: - fail - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/ptb.cgs b/sim/testsuite/sim/sh64/media/ptb.cgs deleted file mode 100644 index 129d626..0000000 --- a/sim/testsuite/sim/sh64/media/ptb.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for ptb$likely $disp16, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -ptb0: - ptb foo, tr0 -ptb: - ptb/l bar, tr1 -ptb2: - ptb/u baz, tr2 - movi 0, r0 - bnei r0, 1, tr2 - fail - -.mode SHcompact - -foo: -bar: -baz: - trapa #253 - trapa #254 - trapa #254 - trapa #254 - trapa #254 diff --git a/sim/testsuite/sim/sh64/media/ptrel.cgs b/sim/testsuite/sim/sh64/media/ptrel.cgs deleted file mode 100644 index 7e5f19b..0000000 --- a/sim/testsuite/sim/sh64/media/ptrel.cgs +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for ptrel$likely $rn, $tra -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - # Add one to stay in SHmedia mode. - movi 53, r0 - ptrel r0, tr0 - movi 0, r0 - # Always branch. - bnei r0, 1, tr0 - fail - fail - fail - fail - fail - pass - fail - fail diff --git a/sim/testsuite/sim/sh64/media/putcfg.cgs b/sim/testsuite/sim/sh64/media/putcfg.cgs deleted file mode 100644 index 8538575..0000000 --- a/sim/testsuite/sim/sh64/media/putcfg.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for putcfg $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - putcfg r0, 0, r0 - pass diff --git a/sim/testsuite/sim/sh64/media/putcon.cgs b/sim/testsuite/sim/sh64/media/putcon.cgs deleted file mode 100644 index 39dfc03..0000000 --- a/sim/testsuite/sim/sh64/media/putcon.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for putcon $rm, $crj -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -putcon1: - movi 22, r0 - putcon r0, cr0 - getcon cr0, r1 - bne r0, r1, tr0 - -putcon2: - movi 12, r0 - shlli r0, 35, r0 - putcon r0, cr20 - getcon cr20, r20 - bne r0, r20, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/rte.cgs b/sim/testsuite/sim/sh64/media/rte.cgs deleted file mode 100644 index e80f085..0000000 --- a/sim/testsuite/sim/sh64/media/rte.cgs +++ /dev/null @@ -1,11 +0,0 @@ -# sh testcase for rte -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - # Unimplemented. - rte - pass diff --git a/sim/testsuite/sim/sh64/media/shard.cgs b/sim/testsuite/sim/sh64/media/shard.cgs deleted file mode 100644 index 029e529..0000000 --- a/sim/testsuite/sim/sh64/media/shard.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for shard $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shard1: - movi 128, r0 - movi 3, r1 - shard r0, r1, r2 - bnei r2, 16, tr0 - -shard2: - movi -4, r0 - movi 2, r1 - shard r0, r1, r2 - addi r2, 1, r2 - bnei r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shardl.cgs b/sim/testsuite/sim/sh64/media/shardl.cgs deleted file mode 100644 index d9acaa5..0000000 --- a/sim/testsuite/sim/sh64/media/shardl.cgs +++ /dev/null @@ -1,45 +0,0 @@ -# sh testcase for shard.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shardl1: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - movi 1, r1 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - shard.l r0, r1, r0 - movi 20, r1 - shard.l r0, r1, r0 - bnei r0, 5, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shari.cgs b/sim/testsuite/sim/sh64/media/shari.cgs deleted file mode 100644 index 3d3a650..0000000 --- a/sim/testsuite/sim/sh64/media/shari.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for shari $rm, $imm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shari1: - movi 128, r0 - shari r0, 3, r2 - bnei r2, 16, tr0 - -shari2: - movi -4, r0 - shari r0, 2, r2 - addi r2, 1, r2 - bnei r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/sharil.cgs b/sim/testsuite/sim/sh64/media/sharil.cgs deleted file mode 100644 index be946e0..0000000 --- a/sim/testsuite/sim/sh64/media/sharil.cgs +++ /dev/null @@ -1,45 +0,0 @@ -# sh testcase for shari.l $rm, $imm6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -sharil1: - movi 0x1020, r0 - shlli r0, 8, r0 - ori r0, 0x30, r0 - shlli r0, 8, r0 - ori r0, 0x40, r0 - shlli r0, 8, r0 - ori r0, 0x50, r0 - shlli r0, 8, r0 - ori r0, 0x60, r0 - shlli r0, 8, r0 - ori r0, 0x70, r0 - shlli r0, 8, r0 - ori r0, 0x80, r0 - - movi 1, r1 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 1, r0 - shari.l r0, 20, r0 - bnei r0, 5, tr0 - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/media/shlld.cgs b/sim/testsuite/sim/sh64/media/shlld.cgs deleted file mode 100644 index 05d2da4..0000000 --- a/sim/testsuite/sim/sh64/media/shlld.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for shlld $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shlld1: - movi 1, r0 - movi 5, r1 - shlld r0, r1, r2 - movi 32, r7 - bne r2, r7, tr0 - -shlld2: - movi 2, r1 - shlld r2, r1, r3 - movi 128, r7 - bne r3, r7, tr0 - -shlld3: - movi 32, r1 - shlld r0, r1, r7 - shlld r7, r1, r2 - bnei r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shlldl.cgs b/sim/testsuite/sim/sh64/media/shlldl.cgs deleted file mode 100644 index 3d37f53..0000000 --- a/sim/testsuite/sim/sh64/media/shlldl.cgs +++ /dev/null @@ -1,34 +0,0 @@ -# sh testcase for shlld.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -shlldl1: - movi 1, r0 - shlli r0, 32, r0 - ori r0, 1, r0 - movi 1, r1 - shlli r1, 7, r1 - ori r1, 3, r1 - - shlld.l r0, r1, r2 - -check1: - bnei r2, 8, tr0 - -shlldl2: - movi 1, r0 - movi 31, r1 - shlld.l r0, r1, r2 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shlli.cgs b/sim/testsuite/sim/sh64/media/shlli.cgs deleted file mode 100644 index 9ab331c..0000000 --- a/sim/testsuite/sim/sh64/media/shlli.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for shlli $rm, $imm6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shlli: - movi 1, r0 - shlli r0, 3, r0 - bnei r0, 8, tr0 - -shlli2: - shlli r0, 3, r0 - -shlli3: - # Shift all bits out of sight. - shlli r0, 63, r0 - bnei r0, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shllil.cgs b/sim/testsuite/sim/sh64/media/shllil.cgs deleted file mode 100644 index 347acd6..0000000 --- a/sim/testsuite/sim/sh64/media/shllil.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for shlli.l $rm, $imm6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global shllil -shllil: - shlli.l r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/shlrd.cgs b/sim/testsuite/sim/sh64/media/shlrd.cgs deleted file mode 100644 index 56f10bf..0000000 --- a/sim/testsuite/sim/sh64/media/shlrd.cgs +++ /dev/null @@ -1,30 +0,0 @@ -# sh testcase for shlrd $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shlrd1: - movi 128, r0 - movi 3, r1 - shlrd r0, r1, r2 - bnei r2, 16, tr0 - -shlrd2: - movi -4, r0 - movi 2, r1 - shlrd r0, r1, r2 - addi r2, 1, r2 - beqi r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shlrdl.cgs b/sim/testsuite/sim/sh64/media/shlrdl.cgs deleted file mode 100644 index 32b20c0..0000000 --- a/sim/testsuite/sim/sh64/media/shlrdl.cgs +++ /dev/null @@ -1,37 +0,0 @@ -# sh testcase for shlrd.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shlrdl1: - movi 1, r0 - shlli r0, 32, r0 - ori r0, 8, r0 - movi 1, r1 - shlli r1, 7, r1 - ori r1, 3, r1 - - shlrd.l r0, r1, r2 - -check1: - bnei r2, 1, tr0 - -shlrdl2: - movi 1, r0 - shlli r0, 31, r0 - movi 31, r1 - shlld.l r0, r1, r2 - bnei r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shlri.cgs b/sim/testsuite/sim/sh64/media/shlri.cgs deleted file mode 100644 index 488cac9..0000000 --- a/sim/testsuite/sim/sh64/media/shlri.cgs +++ /dev/null @@ -1,28 +0,0 @@ -# sh testcase for shlri $rm, $imm, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shlri1: - movi 128, r0 - shlri r0, 3, r2 - bnei r2, 16, tr0 - -shlri2: - movi -4, r0 - shlri r0, 2, r2 - addi r2, 1, r2 - beqi r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/shlril.cgs b/sim/testsuite/sim/sh64/media/shlril.cgs deleted file mode 100644 index bb1b2a6..0000000 --- a/sim/testsuite/sim/sh64/media/shlril.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for shlri.l $rm, $imm6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global shlril -shlril: - shlri.l r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/shori.cgs b/sim/testsuite/sim/sh64/media/shori.cgs deleted file mode 100644 index 5f02b7d..0000000 --- a/sim/testsuite/sim/sh64/media/shori.cgs +++ /dev/null @@ -1,35 +0,0 @@ -# sh testcase for shori $imm16, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -shori1: - movi 1, r0 - shori 7, r0 - # check it. - andi r0, 15, r7 - bnei r7, 7, tr0 - shlri r0, 16, r0 - bnei r0, 1, tr0 - -shori2: - # Test for zero extension bug reported by - # Alexandre Oliva <aoliva@redhat.com>. - movi 0, r0 - shori 65535, r0 - # check it. - movi 0xffff, r1 - bne r0, r1, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/sleep.cgs b/sim/testsuite/sim/sh64/media/sleep.cgs deleted file mode 100644 index b4c35ee..0000000 --- a/sim/testsuite/sim/sh64/media/sleep.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for sleep -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - sleep - pass diff --git a/sim/testsuite/sim/sh64/media/stb.cgs b/sim/testsuite/sim/sh64/media/stb.cgs deleted file mode 100644 index 09de47b..0000000 --- a/sim/testsuite/sim/sh64/media/stb.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for st.b $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stb1: - st.b r0, 0, r7 - -stb2: - st.b r0, 1, r7 - -stb3: - st.b r0, -1, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/sthil.cgs b/sim/testsuite/sim/sh64/media/sthil.cgs deleted file mode 100644 index cfee284..0000000 --- a/sim/testsuite/sim/sh64/media/sthil.cgs +++ /dev/null @@ -1,55 +0,0 @@ -# sh testcase for sthi.l $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - - movi 40, r0 - shlli r0, 8, r0 - - movi 0x1020, r1 - shlli r1, 8, r1 - addi r1, 0x30, r1 - shlli r1, 8, r1 - addi r1, 0x40, r1 - shlli r1, 8, r1 - addi r1, 0x50, r1 - shlli r1, 8, r1 - addi r1, 0x60, r1 - shlli r1, 8, r1 - addi r1, 0x70, r1 - shlli r1, 8, r1 - addi r1, 0x80, r1 - -sthil1: - sthi.l r0, 0, r1 - -sthil2: - sthi.l r0, 1, r1 - -sthil3: - sthi.l r0, 2, r1 - -sthil4: - sthi.l r0, 3, r1 - -sthil5: - sthi.l r0, -1, r1 - -sthil6: - sthi.l r0, -2, r1 - -sthil7: - sthi.l r0, -3, r1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/sthiq.cgs b/sim/testsuite/sim/sh64/media/sthiq.cgs deleted file mode 100644 index 6310d43..0000000 --- a/sim/testsuite/sim/sh64/media/sthiq.cgs +++ /dev/null @@ -1,79 +0,0 @@ -# sh testcase for sthi.q $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - - movi 40, r0 - shlli r0, 8, r0 - - movi 0x1020, r1 - shlli r1, 8, r1 - addi r1, 0x30, r1 - shlli r1, 8, r1 - addi r1, 0x40, r1 - shlli r1, 8, r1 - addi r1, 0x50, r1 - shlli r1, 8, r1 - addi r1, 0x60, r1 - shlli r1, 8, r1 - addi r1, 0x70, r1 - shlli r1, 8, r1 - addi r1, 0x80, r1 - -sthiq1: - sthi.q r0, 0, r1 - -sthiq2: - sthi.q r0, 1, r1 - -sthiq3: - sthi.q r0, 2, r1 - -sthiq4: - sthi.q r0, 3, r1 - -sthiq5: - sthi.q r0, 4, r1 - -sthiq6: - sthi.q r0, 5, r1 - -sthiq7: - sthi.q r0, 6, r1 - -sthiq8: - sthi.q r0, 7, r1 - -sthiq9: - sthi.q r0, -1, r1 - -sthiq10: - sthi.q r0, -2, r1 - -sthiq11: - sthi.q r0, -3, r1 - -sthiq12: - sthi.q r0, -4, r1 - -sthiq13: - sthi.q r0, -5, r1 - -sthiq14: - sthi.q r0, -6, r1 - -sthiq15: - sthi.q r0, -7, r1 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/stl.cgs b/sim/testsuite/sim/sh64/media/stl.cgs deleted file mode 100644 index 8737e35..0000000 --- a/sim/testsuite/sim/sh64/media/stl.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for st.l $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stl1: - st.l r0, 0, r7 - -stl2: - st.l r0, 4, r7 - -stl3: - st.l r0, -4, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stlol.cgs b/sim/testsuite/sim/sh64/media/stlol.cgs deleted file mode 100644 index f2d9055..0000000 --- a/sim/testsuite/sim/sh64/media/stlol.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for stlo.l $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global stlol -stlol: - stlo.l r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/stloq.cgs b/sim/testsuite/sim/sh64/media/stloq.cgs deleted file mode 100644 index 35c84c2..0000000 --- a/sim/testsuite/sim/sh64/media/stloq.cgs +++ /dev/null @@ -1,14 +0,0 @@ -# sh testcase for stlo.q $rm, $disp6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - - .global stloq -stloq: - stlo.q r0, 0, r0 - - pass diff --git a/sim/testsuite/sim/sh64/media/stq.cgs b/sim/testsuite/sim/sh64/media/stq.cgs deleted file mode 100644 index e1af795..0000000 --- a/sim/testsuite/sim/sh64/media/stq.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stq1: - st.q r0, 0, r7 - -stq2: - st.q r0, 8, r7 - -stq3: - st.q r0, -8, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stw.cgs b/sim/testsuite/sim/sh64/media/stw.cgs deleted file mode 100644 index 2446aa6..0000000 --- a/sim/testsuite/sim/sh64/media/stw.cgs +++ /dev/null @@ -1,26 +0,0 @@ -# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stw1: - st.w r0, 0, r7 - -stw2: - st.w r0, 2, r7 - -stw3: - st.w r0, -2, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stxb.cgs b/sim/testsuite/sim/sh64/media/stxb.cgs deleted file mode 100644 index 8ab2ae3..0000000 --- a/sim/testsuite/sim/sh64/media/stxb.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for stx.b $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stxb1: - movi 0, r1 - stx.b r0, r1, r7 - -stxb2: - movi 1, r1 - stx.b r0, r1, r7 - -stxb3: - movi -1, r1 - stx.b r0, r1, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stxl.cgs b/sim/testsuite/sim/sh64/media/stxl.cgs deleted file mode 100644 index 8ed2e36..0000000 --- a/sim/testsuite/sim/sh64/media/stxl.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for stx.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stxl1: - movi 0, r1 - stx.l r0, r1, r7 - -stxl2: - movi 4, r1 - stx.l r0, r1, r7 - -stxl3: - movi -4, r1 - stx.l r0, r1, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stxq.cgs b/sim/testsuite/sim/sh64/media/stxq.cgs deleted file mode 100644 index 10759fd..0000000 --- a/sim/testsuite/sim/sh64/media/stxq.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for stx.q $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stxq1: - movi 0, r1 - stx.q r0, r1, r7 - -stxq2: - movi 8, r1 - stx.q r0, r1, r7 - -stxq3: - movi -8, r1 - stx.q r0, r1, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/stxw.cgs b/sim/testsuite/sim/sh64/media/stxw.cgs deleted file mode 100644 index d039811..0000000 --- a/sim/testsuite/sim/sh64/media/stxw.cgs +++ /dev/null @@ -1,29 +0,0 @@ -# sh testcase for stx.w $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - movi -1, r7 - xori r7, 13, r7 - movi 40, r0 - shlli r0, 8, r0 - -stxw1: - movi 0, r1 - stx.w r0, r1, r7 - -stxw2: - movi 2, r1 - stx.w r0, r1, r7 - -stxw3: - movi -2, r1 - stx.w r0, r1, r7 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/sub.cgs b/sim/testsuite/sim/sh64/media/sub.cgs deleted file mode 100644 index e5e7530..0000000 --- a/sim/testsuite/sim/sh64/media/sub.cgs +++ /dev/null @@ -1,42 +0,0 @@ -# sh testcase for sub $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - movi 0, r0 - movi 1, r1 - -sub1: - # 0 - 0 = 0. - sub r0, r0, r2 - bnei r2, 0, tr0 - -sub2: - # 1 - 0 = 1. - sub r1, r0, r2 - bnei r2, 1, tr0 - -sub3: - # 0 - 1 = -1. - sub r0, r1, r2 - addi r2, 1, r2 - bnei r2, 0, tr0 - -sub4: - # 5 - 2 = 3. - movi 5, r0 - movi 2, r1 - sub r0, r1, r2 - bnei r2, 3, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/subl.cgs b/sim/testsuite/sim/sh64/media/subl.cgs deleted file mode 100644 index 98abe59..0000000 --- a/sim/testsuite/sim/sh64/media/subl.cgs +++ /dev/null @@ -1,38 +0,0 @@ -# sh testcase for sub.l $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - -init: - pta wrong, tr0 - -subl1: - # Test that the top 32 bits are ignored. - movi 1, r0 - shlli r0, 32, r0 - ori r0, 7, r0 - - movi 1, r1 - shlli r1, 32, r1 - ori r1, 2, r1 - - sub.l r0, r1, r2 - bnei r2, 5, tr0 - -subl2: - # Test that 0 - 1 is sign extended. - movi 0, r0 - movi 1, r1 - sub.l r0, r1, r2 - addi r2, 1, r2 - bnei r2, 0, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/media/swapq.cgs b/sim/testsuite/sim/sh64/media/swapq.cgs deleted file mode 100644 index 6f168b1..0000000 --- a/sim/testsuite/sim/sh64/media/swapq.cgs +++ /dev/null @@ -1,36 +0,0 @@ -# sh testcase for swap.q $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - movi 10, r0 - shlli r0, 8, r0 - ori r0, 20, r0 - shlli r0, 8, r0 - ori r0, 30, r0 - shlli r0, 8, r0 - ori r0, 40, r0 - shlli r0, 8, r0 - ori r0, 50, r0 - shlli r0, 8, r0 - ori r0, 60, r0 - shlli r0, 8, r0 - ori r0, 70, r0 - shlli r0, 8, r0 - ori r0, 80, r0 - - # Set up two address operands. - - movi 40, r1 - shlli r1, 8, r1 - movi 8, r2 - -swapq: - swap.q r1, r2, r0 - -okay: - pass diff --git a/sim/testsuite/sim/sh64/media/synci.cgs b/sim/testsuite/sim/sh64/media/synci.cgs deleted file mode 100644 index 65e0621..0000000 --- a/sim/testsuite/sim/sh64/media/synci.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for synci -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - synci - pass diff --git a/sim/testsuite/sim/sh64/media/synco.cgs b/sim/testsuite/sim/sh64/media/synco.cgs deleted file mode 100644 index 2db6df3..0000000 --- a/sim/testsuite/sim/sh64/media/synco.cgs +++ /dev/null @@ -1,10 +0,0 @@ -# sh testcase for synco -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - synco - pass diff --git a/sim/testsuite/sim/sh64/media/testutils.inc b/sim/testsuite/sim/sh64/media/testutils.inc deleted file mode 100644 index d3b383a..0000000 --- a/sim/testsuite/sim/sh64/media/testutils.inc +++ /dev/null @@ -1,51 +0,0 @@ -# Support macros for the assembly test cases. - - .macro start - .text - .global start -start: - .endm - - .macro pass - movi 253, r0 - trapa r0 - .endm - - .macro fail - movi 254, r0 - trapa r0 - .endm - - .macro _packb v1 v2 v3 v4 v5 v6 v7 v8 reg - movi \v1, \reg - shlli \reg, 8, \reg - addi \reg, \v2, \reg - shlli \reg, 8, \reg - addi \reg, \v3, \reg - shlli \reg, 8, \reg - addi \reg, \v4, \reg - shlli \reg, 8, \reg - addi \reg, \v5, \reg - shlli \reg, 8, \reg - addi \reg, \v6, \reg - shlli \reg, 8, \reg - addi \reg, \v7, \reg - shlli \reg, 8, \reg - addi \reg, \v8, \reg - .endm - - .macro _packw v1 v2 v3 v4 reg - movi \v1, \reg - shlli \reg, 16, \reg - addi \reg, \v2, \reg - shlli \reg, 16, \reg - addi \reg, \v3, \reg - shlli \reg, 16, \reg - addi \reg, \v4, \reg - .endm - - .macro _packl v1 v2 reg - movi \v1, \reg - shlli \reg, 32, \reg - addi \reg, \v2, \reg - .endm diff --git a/sim/testsuite/sim/sh64/media/trapa.cgs b/sim/testsuite/sim/sh64/media/trapa.cgs deleted file mode 100644 index c961bac..0000000 --- a/sim/testsuite/sim/sh64/media/trapa.cgs +++ /dev/null @@ -1,11 +0,0 @@ -# sh testcase for trapa $rm -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start - # This performs a trap to emit "pass". - movi 253, r0 - trapa r0 diff --git a/sim/testsuite/sim/sh64/media/xor.cgs b/sim/testsuite/sim/sh64/media/xor.cgs deleted file mode 100644 index 80278f0..0000000 --- a/sim/testsuite/sim/sh64/media/xor.cgs +++ /dev/null @@ -1,54 +0,0 @@ -# sh testcase for xor $rm, $rn, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -xor1: - # 0 xor 0 = 0. - movi 0, r0 - movi 0, r1 - xor r0, r1, r2 - bnei r2, 0, tr0 - -xor2: - # 0 xor 1 = 1. - movi 0, r0 - movi 1, r1 - xor r0, r1, r2 - bnei r2, 1, tr0 - -xor3: - # 1 xor 0 = 1. - movi 1, r0 - movi 0, r1 - xor r0, r1, r2 - bnei r2, 1, tr0 - -xor4: - # 1 xor 1 = 0. - movi 1, r0 - movi 1, r1 - xor r0, r1, r2 - bnei r2, 0, tr0 - -xor5: - movi 1, r0 - shlli r0, 63, r0 - ori r0, 1, r0 - movi 3, r1 - xor r0, r1, r2 - andi r2, 255, r2 - bnei r2, 2, tr0 - -okay: - pass - -wrong: - fail - diff --git a/sim/testsuite/sim/sh64/media/xori.cgs b/sim/testsuite/sim/sh64/media/xori.cgs deleted file mode 100644 index 0d4d96a..0000000 --- a/sim/testsuite/sim/sh64/media/xori.cgs +++ /dev/null @@ -1,48 +0,0 @@ -# sh testcase for xori $rm, $imm6, $rd -*- Asm -*- -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - - .include "media/testutils.inc" - - start -init: - pta wrong, tr0 - -xori1: - # 0 xor 0 = 0. - movi 0, r0 - xori r0, 0, r2 - bnei r2, 0, tr0 - -xori2: - # 0 xor 1 = 1. - movi 0, r0 - xori r0, 1, r2 - bnei r2, 1, tr0 - -xori3: - # 1 xor 0 = 1. - movi 1, r0 - xori r0, 0, r2 - bnei r2, 1, tr0 - -xori4: - # 1 xor 1 = 0. - movi 1, r0 - xori r0, 1, r2 - bnei r2, 0, tr0 - -xori5: - movi 1, r0 - shlli r0, 63, r0 - ori r0, 1, r0 - xori r0, 3, r2 - andi r2, 255, r2 - bnei r2, 2, tr0 - -okay: - pass - -wrong: - fail diff --git a/sim/testsuite/sim/sh64/misc/fr-dr.s b/sim/testsuite/sim/sh64/misc/fr-dr.s deleted file mode 100644 index 52f0e13..0000000 --- a/sim/testsuite/sim/sh64/misc/fr-dr.s +++ /dev/null @@ -1,22 +0,0 @@ -# sh testcase for floating point register shared state (see below). -# mach: all -# as: -isa=shmedia -# ld: -m shelf64 - -# (fr, dr, fp, fv amd mtrx provide different views of the same architecrual state). -# Hitachi SH-5 CPU volume 1, p. 15. - - .include "media/testutils.inc" - - start - - movi 42, r0 - fmov.ls r0, fr12 - # save this reg. - fmov.s fr12, fr14 - - movi 42, r0 - fmov.qd r0, dr12 - -okay: - pass |