From e855e57637eda6c0869e6dfda9cf41c32a65a379 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 25 Mar 1998 00:08:52 +0000 Subject: [PATCH] Pacify GCC. --- sim/mn10300/ChangeLog | 12 ++++++ sim/mn10300/configure | 90 ++++++++++++++++++++------------------- sim/mn10300/configure.in | 3 +- sim/mn10300/interp.c | 7 +-- sim/mn10300/mn10300.igen | 3 -- sim/mn10300/mn10300_sim.h | 8 ++++ 6 files changed, 72 insertions(+), 51 deletions(-) diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 996e5b3e6ea..0adad272272 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,15 @@ +Wed Mar 25 10:24:48 1998 Andrew Cagney + + * interp.c (sim-options.h): Include. + (sim_kind, myname): Declare when not using common framework. + + * mn10300_sim.h (do_syscall, generic*): Provide prototypes for + functions found in op_utils.c + + * mn10300.igen (add): Discard unused variables. + + * configure, config.in: Re-generate with autoconf 2.12.1. + Tue Mar 24 15:27:00 1998 Joyce Janczyn Add support for --enable-sim-common option. diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 578206b9eed..b3eefecc226 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -75,11 +75,10 @@ - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.12.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -155,6 +154,7 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -438,7 +438,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.12.1" exit 0 ;; -with-* | --with-*) @@ -732,7 +732,7 @@ esac # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi @@ -744,14 +744,14 @@ case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -769,7 +769,7 @@ NONE) esac ;; esac -target=`$ac_config_sub $target_alias` +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -787,7 +787,7 @@ NONE) esac ;; esac -build=`$ac_config_sub $build_alias` +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -994,11 +994,12 @@ fi # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1002: checking for a BSD compatible install" >&5 +echo "configure:1003: 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 @@ -1010,12 +1011,13 @@ else /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -1063,7 +1065,7 @@ AR=${AR-ar} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1067: checking for $ac_word" >&5 +echo "configure:1069: 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 @@ -1097,17 +1099,17 @@ for ac_hdr in stdlib.h string.h strings.h unistd.h time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1101: checking for $ac_hdr" >&5 +echo "configure:1103: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1137,17 +1139,17 @@ for ac_hdr in sys/time.h sys/resource.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1141: checking for $ac_hdr" >&5 +echo "configure:1143: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1177,17 +1179,17 @@ for ac_hdr in fcntl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1181: checking for $ac_hdr" >&5 +echo "configure:1183: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1216,12 +1218,12 @@ done for ac_func in getrusage time sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1220: checking for $ac_func" >&5 +echo "configure:1222: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1417,12 +1419,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1421: checking return type of signal handlers" >&5 +echo "configure:1423: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1439,7 +1441,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1589,14 +1591,14 @@ else if test "x$cross_compiling" = "xno"; then echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1593: checking whether byte ordering is bigendian" >&5 +echo "configure:1595: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1607,11 +1609,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1622,7 +1624,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1642,7 +1644,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1785,12 +1787,12 @@ fi for ac_func in time chmod utime fork execve execv chown do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1789: checking for $ac_func" >&5 +echo "configure:1791: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1841,17 +1843,17 @@ for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1845: checking for $ac_hdr" >&5 +echo "configure:1847: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1923,7 +1925,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set) 2>&1 | grep ac_space` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -1990,7 +1992,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.12.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2021,8 +2023,7 @@ s%@sim_scache@%$sim_scache%g s%@sim_default_model@%$sim_default_model%g s%@sim_hardware@%$sim_hardware%g s%@sim_hw_obj@%$sim_hw_obj%g -s%@sim_dv_src@%$sim_dv_src%g -s%@sim_dv_obj@%$sim_dv_obj%g +s%@sim_hw@%$sim_hw%g s%@sim_inline@%$sim_inline%g s%@sim_packages@%$sim_packages%g s%@sim_regparm@%$sim_regparm%g @@ -2031,6 +2032,7 @@ s%@sim_smp@%$sim_smp%g s%@sim_stdcall@%$sim_stdcall%g s%@sim_xor_endian@%$sim_xor_endian%g s%@sim_warnings@%$sim_warnings%g +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g diff --git a/sim/mn10300/configure.in b/sim/mn10300/configure.in index 2a5719ac58e..7bbd463b635 100644 --- a/sim/mn10300/configure.in +++ b/sim/mn10300/configure.in @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. sinclude(../common/aclocal.m4) -AC_PREREQ(2.5)dnl +dnl 2.12 botches SHELL substitution +AC_PREREQ(2.12.1)dnl AC_INIT(Makefile.in) SIM_AC_COMMON diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 039bd177a66..eede9a706e3 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -2,6 +2,7 @@ #if WITH_COMMON #include "sim-main.h" +#include "sim-options.h" #else #include "mn10300_sim.h" #endif @@ -36,14 +37,15 @@ host_callback *mn10300_callback; int mn10300_debug; -static SIM_OPEN_KIND sim_kind; -static char *myname; #if WITH_COMMON #else static void dispatch PARAMS ((uint32, uint32, int)); static long hash PARAMS ((long)); static void init_system PARAMS ((void)); + +static SIM_OPEN_KIND sim_kind; +static char *myname; #define MAX_HASH 127 struct hash_entry @@ -1045,7 +1047,6 @@ sim_open (kind, cb, abfd, argv) char **argv; { SIM_DESC sd = sim_state_alloc (kind, cb); - int mach; mn10300_callback = cb; SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); diff --git a/sim/mn10300/mn10300.igen b/sim/mn10300/mn10300.igen index 87eb3fb218c..27685a89d75 100644 --- a/sim/mn10300/mn10300.igen +++ b/sim/mn10300/mn10300.igen @@ -1387,9 +1387,6 @@ *mn10300 { // OP_F160 (); - int z, c, n, v; - unsigned long reg1, reg2, value; - PC = cia; genericAdd(State.regs[REG_D0 + DM1], REG_A0 + AN0); } diff --git a/sim/mn10300/mn10300_sim.h b/sim/mn10300/mn10300_sim.h index ccc7e46ae71..7be5a7d0166 100644 --- a/sim/mn10300/mn10300_sim.h +++ b/sim/mn10300/mn10300_sim.h @@ -336,3 +336,11 @@ void put_half PARAMS ((uint8 *, uint16)); void put_byte PARAMS ((uint8 *, uint8)); extern uint8 *map PARAMS ((SIM_ADDR addr)); + +void genericAdd PARAMS ((unsigned long source, unsigned long destReg)); +void genericSub PARAMS ((unsigned long source, unsigned long destReg)); +void genericCmp PARAMS ((unsigned long leftOpnd, unsigned long rightOpnd)); +void genericOr PARAMS ((unsigned long source, unsigned long destReg)); +void genericXor PARAMS ((unsigned long source, unsigned long destReg)); +void genericBtst PARAMS ((unsigned long leftOpnd, unsigned long rightOpnd)); +void do_syscall PARAMS ((void)); -- 2.30.2