From 794e9ac96aca71d2cb7683383bb445c3125d9660 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 22 Sep 1997 02:49:57 +0000 Subject: Simplify logic behind the generic configuration option --enable-sim-alignment. --- sim/arm/ChangeLog | 4 ++++ sim/common/ChangeLog | 9 +++++++++ sim/common/aclocal.m4 | 34 ++++++++++++++++++++++--------- sim/d10v/ChangeLog | 4 ++++ sim/erc32/ChangeLog | 4 ++++ sim/h8300/ChangeLog | 4 ++++ sim/m32r/ChangeLog | 4 ++++ sim/mips/ChangeLog | 4 ++++ sim/mn10300/ChangeLog | 4 ++++ sim/sh/ChangeLog | 4 ++++ sim/tic80/ChangeLog | 4 ++++ sim/tic80/configure | 55 ++++++++++++++++++++++++++++++++------------------- sim/v850/ChangeLog | 4 ++++ sim/v850/configure | 55 ++++++++++++++++++++++++++++++++------------------- sim/v850/configure.in | 2 +- 15 files changed, 145 insertions(+), 50 deletions(-) (limited to 'sim') diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 73a5e50dd4..dc06ee6b80 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 14261ef341..b0e3a2edb6 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + +Mon Sep 22 11:45:00 1997 Andrew Cagney + + * aclocal.m4 (sim_alignment): Simplify logic for selecting the + configured alignment. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4 index d3e6843eac..d05e8f813d 100644 --- a/sim/common/aclocal.m4 +++ b/sim/common/aclocal.m4 @@ -211,13 +211,12 @@ dnl and SIM_AC_OUTPUT lines. dnl Specify the alignment restrictions of the target architecture. -dnl Without this option all possible alignment restrictions are accomidated. +dnl Without this option all possible alignment restrictions are accommodated. dnl arg[1] is hardwired target alignment dnl arg[2] is default target alignment AC_DEFUN(SIM_AC_OPTION_ALIGNMENT, -wire_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])" -default_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])" -default_sim_alignment="ifelse([$1],,ifelse([$2],,,-DWITH_DEFAULT_ALIGNMENT=[$2]),-DWITH_ALIGNMENT=[$1])" +wire_alignment="[$1]" +default_alignment="[$2]" [ AC_ARG_ENABLE(sim-alignment, [ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.], @@ -228,20 +227,37 @@ AC_ARG_ENABLE(sim-alignment, yes) if test x"$wire_alignment" != x; then sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" + else + echo "No hard-wired alignment for target $target" 1>&6 + sim_alignment="-DWITH_ALIGNMENT=0" + fi fi;; no) if test x"$default_alignment" != x; then sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" + else + echo "No default alignment for target $target" 1>&6 + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + fi fi;; *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; esac if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then echo "Setting alignment flags = $sim_alignment" 6>&1 -fi],[sim_alignment="${default_sim_alignment}"])dnl +fi], +[if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" +else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + sim_alignment= + fi +fi])dnl AC_SUBST(sim_alignment) ])dnl diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 18d07690d6..f0becaac89 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 451c9619f6..2b0a075793 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index e490d052de..9e8d649393 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 64c3c47b41..138ff2e63c 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index ff6f25603b..ece3c97913 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index d131cfc963..1e1d40f6ff 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 025de9bb55..62fd70aabb 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog index bfd4ff4ddd..995c401084 100644 --- a/sim/tic80/ChangeLog +++ b/sim/tic80/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure: Regenerated to track ../common/aclocal.m4 changes. diff --git a/sim/tic80/configure b/sim/tic80/configure index 21e32a66d5..0eeed7d8ab 100755 --- a/sim/tic80/configure +++ b/sim/tic80/configure @@ -1372,9 +1372,8 @@ else fi -wire_alignment="" +wire_alignment="FORCED_ALIGNMENT" default_alignment="" -default_sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT" # Check whether --enable-sim-alignment or --disable-sim-alignment was given. if test "${enable_sim_alignment+set}" = set; then @@ -1386,14 +1385,22 @@ if test "${enable_sim_alignment+set}" = set; then yes) if test x"$wire_alignment" != x; then sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" + else + echo "No hard-wired alignment for target $target" 1>&6 + sim_alignment="-DWITH_ALIGNMENT=0" + fi fi;; no) if test x"$default_alignment" != x; then sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" + else + echo "No default alignment for target $target" 1>&6 + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + fi fi;; *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; esac @@ -1401,7 +1408,15 @@ if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then echo "Setting alignment flags = $sim_alignment" 6>&1 fi else - sim_alignment="${default_sim_alignment}" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" +else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + sim_alignment= + fi +fi fi @@ -1422,14 +1437,14 @@ else if test "x$cross_compiling" = "xno"; then echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1426: checking whether byte ordering is bigendian" >&5 +echo "configure:1441: 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 @@ -1440,11 +1455,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1459: \"$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 @@ -1455,7 +1470,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1475,7 +1490,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:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1562,17 +1577,17 @@ for ac_hdr in stdlib.h unistd.h string.h strings.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1566: checking for $ac_hdr" >&5 +echo "configure:1581: 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:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1601,12 +1616,12 @@ done for ac_func in getpid kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1605: checking for $ac_func" >&5 +echo "configure:1620: 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:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 3b37f80e12..ebc009f274 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 22 11:46:20 1997 Andrew Cagney + + * configure: Regenerated to track ../common/aclocal.m4 changes. + Fri Sep 19 17:45:25 1997 Andrew Cagney * configure.in: Specify NONSTRICT_ALIGNMENT as the default. diff --git a/sim/v850/configure b/sim/v850/configure index 9b8e2770bf..cdb603f051 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -1330,8 +1330,7 @@ fi wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="NONSTRICT_ALIGNMENT" -default_sim_alignment="-DWITH_ALIGNMENT=" +default_alignment="" # Check whether --enable-sim-alignment or --disable-sim-alignment was given. if test "${enable_sim_alignment+set}" = set; then @@ -1343,14 +1342,22 @@ if test "${enable_sim_alignment+set}" = set; then yes) if test x"$wire_alignment" != x; then sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" + else + echo "No hard-wired alignment for target $target" 1>&6 + sim_alignment="-DWITH_ALIGNMENT=0" + fi fi;; no) if test x"$default_alignment" != x; then sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" + else + echo "No default alignment for target $target" 1>&6 + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + fi fi;; *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";; esac @@ -1358,7 +1365,15 @@ if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then echo "Setting alignment flags = $sim_alignment" 6>&1 fi else - sim_alignment="${default_sim_alignment}" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" +else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + sim_alignment= + fi +fi fi @@ -1379,14 +1394,14 @@ else if test "x$cross_compiling" = "xno"; then echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1383: checking whether byte ordering is bigendian" >&5 +echo "configure:1398: 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 @@ -1397,11 +1412,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1416: \"$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 @@ -1412,7 +1427,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1432,7 +1447,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:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1518,12 +1533,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:1522: checking for $ac_func" >&5 +echo "configure:1537: 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:1565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1574,17 +1589,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:1578: checking for $ac_hdr" >&5 +echo "configure:1593: 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:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* diff --git a/sim/v850/configure.in b/sim/v850/configure.in index dfa4f02482..0a74c5ce8b 100644 --- a/sim/v850/configure.in +++ b/sim/v850/configure.in @@ -6,7 +6,7 @@ AC_INIT(Makefile.in) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) -SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT) +SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_WARNINGS SIM_AC_OPTION_RESERVED_BITS -- cgit v1.2.1