From f9a4d54332f9e1f75701ba43249a03cc631ec736 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Jun 2021 19:51:52 -0400 Subject: [PATCH] sim: overhaul & unify endian settings management The m4 macro has 2 args: the "wire" settings (which represents the hardwired port behavior), and the default settings (which are used if nothing else is specified). If none are specified, the arch is expected to support both, and the value will be probed based on the user runtime options or the input program. Only two arches today set the default value (bpf & mips). We can probably let this go as it only shows up in one scenario: the sim is invoked, but with no inputs, and no user endian selection. This means bpf will not behave like the other arches: an error is shown and forces the user to make a choice. If an input program is used though, we'll still switch the default to that. This allows us to remove the WITH_DEFAULT_TARGET_BYTE_ORDER setting. For the ports that set a "wire" endian, move it to the runtime init of the respective sim_open calls. This allows us to change the WITH_TARGET_BYTE_ORDER to purely a user-selected configure setting if they want to force a specific endianness. With all the endian logic moved to runtime selection, we can move the configure call up to the common dir so we only process it once across all ports. The ppc arch was picking the wire endian based on the target used, but since we weren't doing that for other biendian arches, we can let this go too. We'll rely on the input selecting the endian, or make the user decide. --- sim/ChangeLog | 7 +++ sim/Makefile.in | 1 + sim/aarch64/ChangeLog | 5 +++ sim/aarch64/aclocal.m4 | 1 - sim/aarch64/configure | 59 ++----------------------- sim/aarch64/configure.ac | 2 - sim/aclocal.m4 | 1 + sim/arm/ChangeLog | 5 +++ sim/arm/aclocal.m4 | 1 - sim/arm/configure | 59 ++----------------------- sim/arm/configure.ac | 2 - sim/avr/ChangeLog | 6 +++ sim/avr/aclocal.m4 | 1 - sim/avr/configure | 59 ++----------------------- sim/avr/configure.ac | 2 - sim/avr/interp.c | 1 + sim/bfin/ChangeLog | 6 +++ sim/bfin/aclocal.m4 | 1 - sim/bfin/configure | 56 +----------------------- sim/bfin/configure.ac | 1 - sim/bfin/interp.c | 1 + sim/bpf/ChangeLog | 5 +++ sim/bpf/aclocal.m4 | 1 - sim/bpf/configure | 56 +----------------------- sim/bpf/configure.ac | 1 - sim/common/ChangeLog | 8 ++++ sim/common/Make-common.in | 2 - sim/common/sim-config.c | 5 --- sim/common/sim-config.h | 8 ---- sim/config.h.in | 3 ++ sim/configure | 23 ++++++++++ sim/configure.ac | 1 + sim/cr16/ChangeLog | 6 +++ sim/cr16/aclocal.m4 | 1 - sim/cr16/configure | 59 ++----------------------- sim/cr16/configure.ac | 2 - sim/cr16/interp.c | 3 ++ sim/cris/ChangeLog | 6 +++ sim/cris/aclocal.m4 | 1 - sim/cris/configure | 56 +----------------------- sim/cris/configure.ac | 1 - sim/cris/sim-if.c | 3 ++ sim/d10v/ChangeLog | 5 +++ sim/d10v/aclocal.m4 | 1 - sim/d10v/configure | 59 ++----------------------- sim/d10v/configure.ac | 2 - sim/erc32/ChangeLog | 4 ++ sim/erc32/configure | 8 +--- sim/example-synacor/ChangeLog | 6 +++ sim/example-synacor/aclocal.m4 | 1 - sim/example-synacor/configure | 59 ++----------------------- sim/example-synacor/configure.ac | 2 - sim/example-synacor/interp.c | 1 + sim/frv/ChangeLog | 6 +++ sim/frv/aclocal.m4 | 1 - sim/frv/configure | 56 +----------------------- sim/frv/configure.ac | 1 - sim/frv/sim-if.c | 1 + sim/ft32/ChangeLog | 6 +++ sim/ft32/aclocal.m4 | 1 - sim/ft32/configure | 59 ++----------------------- sim/ft32/configure.ac | 2 - sim/ft32/interp.c | 1 + sim/h8300/ChangeLog | 6 +++ sim/h8300/aclocal.m4 | 1 - sim/h8300/compile.c | 3 ++ sim/h8300/configure | 59 ++----------------------- sim/h8300/configure.ac | 2 - sim/iq2000/ChangeLog | 6 +++ sim/iq2000/aclocal.m4 | 1 - sim/iq2000/configure | 56 +----------------------- sim/iq2000/configure.ac | 1 - sim/iq2000/sim-if.c | 1 + sim/lm32/ChangeLog | 6 +++ sim/lm32/aclocal.m4 | 1 - sim/lm32/configure | 56 +----------------------- sim/lm32/configure.ac | 1 - sim/lm32/sim-if.c | 1 + sim/m32c/ChangeLog | 4 ++ sim/m32c/configure | 8 +--- sim/m32r/ChangeLog | 6 +++ sim/m32r/aclocal.m4 | 1 - sim/m32r/configure | 56 +----------------------- sim/m32r/configure.ac | 1 - sim/m32r/sim-if.c | 1 + sim/m4/sim_ac_option_endian.m4 | 55 ++++++------------------ sim/m4/sim_ac_output.m4 | 2 - sim/m68hc11/ChangeLog | 6 +++ sim/m68hc11/aclocal.m4 | 1 - sim/m68hc11/configure | 58 ++----------------------- sim/m68hc11/configure.ac | 1 - sim/m68hc11/interp.c | 3 ++ sim/mcore/ChangeLog | 5 +++ sim/mcore/aclocal.m4 | 1 - sim/mcore/configure | 59 ++----------------------- sim/mcore/configure.ac | 2 - sim/microblaze/ChangeLog | 5 +++ sim/microblaze/aclocal.m4 | 1 - sim/microblaze/configure | 59 ++----------------------- sim/microblaze/configure.ac | 2 - sim/mips/ChangeLog | 5 +++ sim/mips/aclocal.m4 | 1 - sim/mips/configure | 74 +------------------------------- sim/mips/configure.ac | 19 -------- sim/mn10300/ChangeLog | 6 +++ sim/mn10300/aclocal.m4 | 1 - sim/mn10300/configure | 56 +----------------------- sim/mn10300/configure.ac | 1 - sim/mn10300/interp.c | 3 ++ sim/moxie/ChangeLog | 6 +++ sim/moxie/aclocal.m4 | 1 - sim/moxie/configure | 59 ++----------------------- sim/moxie/configure.ac | 2 - sim/moxie/interp.c | 3 ++ sim/msp430/ChangeLog | 6 +++ sim/msp430/aclocal.m4 | 1 - sim/msp430/configure | 59 ++----------------------- sim/msp430/configure.ac | 2 - sim/msp430/msp430-sim.c | 3 ++ sim/or1k/ChangeLog | 6 +++ sim/or1k/aclocal.m4 | 1 - sim/or1k/configure | 56 +----------------------- sim/or1k/configure.ac | 1 - sim/or1k/sim-if.c | 3 ++ sim/ppc/ChangeLog | 6 +++ sim/ppc/Makefile.in | 2 - sim/ppc/configure | 25 ----------- sim/ppc/configure.ac | 19 -------- sim/pru/ChangeLog | 6 +++ sim/pru/aclocal.m4 | 1 - sim/pru/configure | 59 ++----------------------- sim/pru/configure.ac | 2 - sim/pru/interp.c | 1 + sim/riscv/ChangeLog | 6 +++ sim/riscv/aclocal.m4 | 1 - sim/riscv/configure | 57 +----------------------- sim/riscv/configure.ac | 2 - sim/riscv/interp.c | 3 ++ sim/rl78/ChangeLog | 4 ++ sim/rl78/configure | 8 +--- sim/rx/ChangeLog | 4 ++ sim/rx/configure | 8 +--- sim/sh/ChangeLog | 5 +++ sim/sh/aclocal.m4 | 1 - sim/sh/configure | 58 ++----------------------- sim/sh/configure.ac | 1 - sim/v850/ChangeLog | 6 +++ sim/v850/aclocal.m4 | 1 - sim/v850/configure | 56 +----------------------- sim/v850/configure.ac | 1 - sim/v850/interp.c | 3 ++ 151 files changed, 348 insertions(+), 1721 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index 109d5d8a9d2..9740e1311bc 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,10 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Call SIM_AC_OPTION_ENDIAN. + * m4/sim_ac_option_endian.m4: Delete wire & default arguments. + * m4/sim_ac_output.m4: Delete sim_alignment & sim_endian. + * aclocal.m4, Makefile.in, config.h.in, configure: Regenerate. + 2021-06-16 Simon Marchi * common/Make-common.in (COMPILE, libsim.a, run$(EXEEXT), diff --git a/sim/Makefile.in b/sim/Makefile.in index 3ba80a46381..f77abe38d8a 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -201,6 +201,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/m4/sim_ac_option_alignment.m4 \ $(top_srcdir)/m4/sim_ac_option_assert.m4 \ $(top_srcdir)/m4/sim_ac_option_debug.m4 \ + $(top_srcdir)/m4/sim_ac_option_endian.m4 \ $(top_srcdir)/m4/sim_ac_option_environment.m4 \ $(top_srcdir)/m4/sim_ac_option_profile.m4 \ $(top_srcdir)/m4/sim_ac_option_stdio.m4 \ diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index ea1611dd329..a522fcf0ef7 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/aarch64/aclocal.m4 b/sim/aarch64/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/aarch64/aclocal.m4 +++ b/sim/aarch64/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/aarch64/configure b/sim/aarch64/configure index 3a18f37e928..2c8a6e0abab 100755 --- a/sim/aarch64/configure +++ b/sim/aarch64/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/aarch64/configure.ac b/sim/aarch64/configure.ac index 7ac149a5f9d..849e957f827 100644 --- a/sim/aarch64/configure.ac +++ b/sim/aarch64/configure.ac @@ -24,6 +24,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN - SIM_AC_OUTPUT diff --git a/sim/aclocal.m4 b/sim/aclocal.m4 index f21cf0813e3..773ba0fc6cf 100644 --- a/sim/aclocal.m4 +++ b/sim/aclocal.m4 @@ -1174,6 +1174,7 @@ m4_include([../config/override.m4]) m4_include([m4/sim_ac_option_alignment.m4]) m4_include([m4/sim_ac_option_assert.m4]) m4_include([m4/sim_ac_option_debug.m4]) +m4_include([m4/sim_ac_option_endian.m4]) m4_include([m4/sim_ac_option_environment.m4]) m4_include([m4/sim_ac_option_profile.m4]) m4_include([m4/sim_ac_option_stdio.m4]) diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index b4a42be575e..8bb9bffbfb0 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/arm/aclocal.m4 b/sim/arm/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/arm/aclocal.m4 +++ b/sim/arm/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/arm/configure b/sim/arm/configure index 3a18f37e928..2c8a6e0abab 100755 --- a/sim/arm/configure +++ b/sim/arm/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/arm/configure.ac b/sim/arm/configure.ac index ec8a87e7d39..08bf6ff8acb 100644 --- a/sim/arm/configure.ac +++ b/sim/arm/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN - SIM_AC_OUTPUT diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 08f05583c25..156e7f26e56 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/avr/aclocal.m4 b/sim/avr/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/avr/aclocal.m4 +++ b/sim/avr/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/avr/configure b/sim/avr/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/avr/configure +++ b/sim/avr/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/avr/configure.ac b/sim/avr/configure.ac index 8cd4d23a479..08bf6ff8acb 100644 --- a/sim/avr/configure.ac +++ b/sim/avr/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/avr/interp.c b/sim/avr/interp.c index 1626fadaa97..2bd72731b55 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1686,6 +1686,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_LITTLE; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index da2ef6e2a4e..fa97d8e6a76 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/bfin/aclocal.m4 b/sim/bfin/aclocal.m4 index 529d860d872..4957db84763 100644 --- a/sim/bfin/aclocal.m4 +++ b/sim/bfin/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/bfin/configure b/sim/bfin/configure index b19f154fcb8..d4aa3a21f0c 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -635,7 +635,6 @@ sim_reserved_bits sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks SDL_LIBS SDL_CFLAGS @@ -758,7 +757,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -773,7 +771,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_default_model enable_sim_hardware enable_werror @@ -1422,8 +1419,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-default-model=model Specify default model to simulate --enable-sim-hardware=LIST @@ -10762,7 +10757,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10765 "configure" +#line 10760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10868,7 +10863,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10871 "configure" +#line 10866 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11164,51 +11159,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_default_model="bf537" # Check whether --enable-sim-default-model was given. if test "${enable_sim_default_model+set}" = set; then : @@ -11744,8 +11694,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index ddc7bc6e039..9b17dc4212f 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_DEFAULT_MODEL(bf537) SIM_AC_OPTION_HARDWARE(\ bfin_cec \ diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 10de001d7ce..216cefe2c21 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -704,6 +704,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_LITTLE; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog index 2b768356b69..5e2b222438d 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/bpf/aclocal.m4 b/sim/bpf/aclocal.m4 index 8298e1f682f..d3a56933952 100644 --- a/sim/bpf/aclocal.m4 +++ b/sim/bpf/aclocal.m4 @@ -113,7 +113,6 @@ m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/bpf/configure b/sim/bpf/configure index 102f1b867dc..a0ed8ab4c37 100755 --- a/sim/bpf/configure +++ b/sim/bpf/configure @@ -633,7 +633,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_reserved_bits sim_float -sim_alignment cgen_breaks cgen cgendir @@ -755,7 +754,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model sim_bitsize' ac_subst_files='' @@ -772,7 +770,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_bitsize -enable_sim_endian enable_sim_scache enable_sim_default_model enable_werror @@ -1419,8 +1416,6 @@ Optional Features: --enable-sim-inline=inlines Specify which functions should be inlined --enable-sim-bitsize=N Specify target bitsize (32 or 64) - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10755,7 +10750,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10758 "configure" +#line 10753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10861,7 +10856,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10864 "configure" +#line 10859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11216,51 +11211,6 @@ fi fi -wire_endian="" -default_endian="LITTLE" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11549,8 +11499,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac index 4e00c131609..d2ec00c5a34 100644 --- a/sim/bpf/configure.ac +++ b/sim/bpf/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_BITSIZE([64]) -SIM_AC_OPTION_ENDIAN([], [LITTLE]) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL([bpf-def]) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index abb2ec67995..0d260eb7123 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,11 @@ +2021-06-17 Mike Frysinger + + * Make-common.in (SIM_ENDIAN): Delete. + * sim-config.c (sim_config): Delete WITH_DEFAULT_TARGET_BYTE_ORDER. + (sim_config_print): Likewise. + * sim-config.h (WITH_TARGET_BYTE_ORDER): Delete. + (WITH_DEFAULT_TARGET_BYTE_ORDER): Likewise. + 2021-06-17 Mike Frysinger * cgen-trace.c: Include sim/callback.h. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 0ab9e79e8fd..7a6a2030a47 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -86,7 +86,6 @@ LDFLAGS = @LDFLAGS@ SIM_BITSIZE = @sim_bitsize@ SIM_DEFAULT_MODEL = @sim_default_model@ -SIM_ENDIAN = @sim_endian@ SIM_FLOAT = @sim_float@ SIM_HW_CFLAGS = @sim_hw_cflags@ SIM_HW_OBJS = @sim_hw_objs@ @@ -223,7 +222,6 @@ CONFIG_CFLAGS = \ -DHAVE_CONFIG_H \ $(SIM_DEFAULT_MODEL) \ $(SIM_BITSIZE) \ - $(SIM_ENDIAN) \ $(SIM_FLOAT) \ $(SIM_HW_CFLAGS) \ $(SIM_INLINE) \ diff --git a/sim/common/sim-config.c b/sim/common/sim-config.c index c9005f449fe..fc6b09a7238 100644 --- a/sim/common/sim-config.c +++ b/sim/common/sim-config.c @@ -169,8 +169,6 @@ sim_config (SIM_DESC sd) current_target_byte_order = prefered_target_byte_order; if (current_target_byte_order == BFD_ENDIAN_UNKNOWN) current_target_byte_order = WITH_TARGET_BYTE_ORDER; - if (current_target_byte_order == BFD_ENDIAN_UNKNOWN) - current_target_byte_order = WITH_DEFAULT_TARGET_BYTE_ORDER; /* verify the target byte order */ if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_UNKNOWN) @@ -302,9 +300,6 @@ sim_config_print (SIM_DESC sd) sim_io_printf (sd, "WITH_TARGET_BYTE_ORDER = %s\n", config_byte_order_to_a (WITH_TARGET_BYTE_ORDER)); - sim_io_printf (sd, "WITH_DEFAULT_TARGET_BYTE_ORDER = %s\n", - config_byte_order_to_a (WITH_DEFAULT_TARGET_BYTE_ORDER)); - sim_io_printf (sd, "HOST_BYTE_ORDER = %s\n", config_byte_order_to_a (HOST_BYTE_ORDER)); diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h index 2b6ed3d0b7d..5b1713cff70 100644 --- a/sim/common/sim-config.h +++ b/sim/common/sim-config.h @@ -50,14 +50,6 @@ Possible values are BFD_ENDIAN_UNKNOWN, BFD_ENDIAN_LITTLE, or BFD_ENDIAN_BIG. */ -#ifndef WITH_TARGET_BYTE_ORDER -#define WITH_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN -#endif - -#ifndef WITH_DEFAULT_TARGET_BYTE_ORDER -#define WITH_DEFAULT_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN -#endif - extern enum bfd_endian current_target_byte_order; #define CURRENT_TARGET_BYTE_ORDER \ (WITH_TARGET_BYTE_ORDER != BFD_ENDIAN_UNKNOWN \ diff --git a/sim/config.h.in b/sim/config.h.in index 6e876864941..af6b591d9ee 100644 --- a/sim/config.h.in +++ b/sim/config.h.in @@ -452,6 +452,9 @@ /* How to route I/O */ #undef WITH_STDIO +/* Sim endian settings */ +#undef WITH_TARGET_BYTE_ORDER + /* Sim trace settings */ #undef WITH_TRACE diff --git a/sim/configure b/sim/configure index 5bfbd601fe5..959fa9037ad 100755 --- a/sim/configure +++ b/sim/configure @@ -758,6 +758,7 @@ enable_targets enable_sim_alignment enable_sim_assert enable_sim_debug +enable_sim_endian enable_sim_environment enable_sim_profile enable_sim_stdio @@ -1440,6 +1441,8 @@ Optional Features: --enable-sim-assert Specify whether to perform random assertions --enable-sim-debug=opts Enable debugging flags (for developers of the sim itself) + --enable-sim-endian=endian + Specify target byte endian orientation --enable-sim-environment=environment Specify mixed, user, virtual or operating environment @@ -6751,6 +6754,26 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_debug" >&5 $as_echo "$sim_debug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim endianness" >&5 +$as_echo_n "checking whether to force sim endianness... " >&6; } +sim_endian= +# Check whether --enable-sim-endian was given. +if test "${enable_sim_endian+set}" = set; then : + enableval=$enable_sim_endian; case "${enableval}" in + b*|B*) sim_endian="BFD_ENDIAN_BIG";; + l*|L*) sim_endian="BFD_ENDIAN_LITTLE";; + yes | no) ;; + *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5;; +esac +fi + +cat >>confdefs.h <<_ACEOF +#define WITH_TARGET_BYTE_ORDER ${sim_endian:-BFD_ENDIAN_UNKNOWN} +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sim_alignment:-no}" >&5 +$as_echo "${sim_alignment:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default sim environment setting" >&5 $as_echo_n "checking default sim environment setting... " >&6; } diff --git a/sim/configure.ac b/sim/configure.ac index 129e9421ec1..4ba2921ebaf 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -112,6 +112,7 @@ dnl Eventually all simulators will support these. SIM_AC_OPTION_ALIGNMENT SIM_AC_OPTION_ASSERT SIM_AC_OPTION_DEBUG +SIM_AC_OPTION_ENDIAN SIM_AC_OPTION_ENVIRONMENT SIM_AC_OPTION_PROFILE SIM_AC_OPTION_STDIO diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 231b5350e48..dc4c1e8b239 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/cr16/aclocal.m4 b/sim/cr16/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/cr16/aclocal.m4 +++ b/sim/cr16/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/cr16/configure b/sim/cr16/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/cr16/configure +++ b/sim/cr16/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac index 8cd4d23a479..08bf6ff8acb 100644 --- a/sim/cr16/configure.ac +++ b/sim/cr16/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index 7f6b07fe286..6e3438c9d80 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -398,6 +398,9 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb, SIM_DESC sd = sim_state_alloc (kind, cb); SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 24084199f73..61d064cd067 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-17 Mike Frysinger * traps.c: Include sim/callback.h. diff --git a/sim/cris/aclocal.m4 b/sim/cris/aclocal.m4 index 4fb0bd753f4..612939868c2 100644 --- a/sim/cris/aclocal.m4 +++ b/sim/cris/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/cris/configure b/sim/cris/configure index 21171f0d3f4..cd6fe783175 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize -sim_alignment cgen_breaks cgen cgendir @@ -756,7 +755,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -771,7 +769,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_scache enable_werror enable_build_warnings @@ -1417,8 +1414,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-werror treat compile warnings as errors @@ -10753,7 +10748,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10756 "configure" +#line 10751 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10859,7 +10854,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10862 "configure" +#line 10857 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11155,51 +11150,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11490,8 +11440,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index cc5bb4922f1..48c4bbeabac 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_WARNINGS(no) SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx) diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index c6dcc23c938..c183856fa4c 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -654,6 +654,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, standard ;-) that the rest of the elements won't be initialized. */ bfd_byte sp_init[4] = {0, 0, 0, 0}; + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 1154ab74b4b..d5881766da7 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/d10v/aclocal.m4 b/sim/d10v/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/d10v/aclocal.m4 +++ b/sim/d10v/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/d10v/configure b/sim/d10v/configure index 3a18f37e928..2c8a6e0abab 100755 --- a/sim/d10v/configure +++ b/sim/d10v/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac index ec8a87e7d39..08bf6ff8acb 100644 --- a/sim/d10v/configure.ac +++ b/sim/d10v/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN - SIM_AC_OUTPUT diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 72e69c33293..24d1aacb7d7 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,7 @@ +2021-06-17 Mike Frysinger + + * configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/erc32/configure b/sim/erc32/configure index 2493f9603a1..2b10dc4be1d 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -635,9 +635,7 @@ sim_reserved_bits sim_default_model sim_scache sim_float -sim_endian sim_bitsize -sim_alignment cgen_breaks READLINE_CFLAGS READLINE @@ -10742,7 +10740,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10743 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10846,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10849 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11504,8 +11502,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog index 7737e9ce2b5..4f2c8c58715 100644 --- a/sim/example-synacor/ChangeLog +++ b/sim/example-synacor/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/example-synacor/aclocal.m4 b/sim/example-synacor/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/example-synacor/aclocal.m4 +++ b/sim/example-synacor/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/example-synacor/configure b/sim/example-synacor/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/example-synacor/configure +++ b/sim/example-synacor/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/example-synacor/configure.ac b/sim/example-synacor/configure.ac index 8cd4d23a479..08bf6ff8acb 100644 --- a/sim/example-synacor/configure.ac +++ b/sim/example-synacor/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/example-synacor/interp.c b/sim/example-synacor/interp.c index 784c9cbc575..57b1bee7cd9 100644 --- a/sim/example-synacor/interp.c +++ b/sim/example-synacor/interp.c @@ -84,6 +84,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_LITTLE; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 80b33cd6d8e..264d33e926c 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-17 Mike Frysinger * traps.c: Include sim/callback.h. diff --git a/sim/frv/aclocal.m4 b/sim/frv/aclocal.m4 index 4fb0bd753f4..612939868c2 100644 --- a/sim/frv/aclocal.m4 +++ b/sim/frv/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/frv/configure b/sim/frv/configure index cf39e6e5392..a578200c5b9 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize -sim_alignment cgen_breaks sim_trapdump cgen @@ -757,7 +756,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -772,7 +770,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_scache enable_sim_default_model enable_werror @@ -1419,8 +1416,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10756,7 +10751,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10759 "configure" +#line 10754 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10862,7 +10857,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10865 "configure" +#line 10860 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11158,51 +11153,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11509,8 +11459,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index fcc2e8836bb..39d8de4a5b8 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(fr500) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 0ad5f626e45..758e17a3fc5 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -56,6 +56,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_BIG; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index db9ea4f592b..bb7ea80d8f4 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/ft32/aclocal.m4 b/sim/ft32/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/ft32/aclocal.m4 +++ b/sim/ft32/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/ft32/configure b/sim/ft32/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/ft32/configure +++ b/sim/ft32/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/ft32/configure.ac b/sim/ft32/configure.ac index 8cd4d23a479..08bf6ff8acb 100644 --- a/sim/ft32/configure.ac +++ b/sim/ft32/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index 8a44a472f60..77ed8f8eb89 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -810,6 +810,7 @@ sim_open (SIM_OPEN_KIND kind, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_LITTLE; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index e12242ccd3b..57ada187fb7 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * compile.c (sim_open): Set current_target_byte_order. + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-17 Mike Frysinger * compile.c: Include sim/callback.h. diff --git a/sim/h8300/aclocal.m4 b/sim/h8300/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/h8300/aclocal.m4 +++ b/sim/h8300/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 8b13326a0a9..565eadfe3b1 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -4716,6 +4716,9 @@ sim_open (SIM_OPEN_KIND kind, sd = sim_state_alloc_extra (kind, callback, sizeof (struct h8300_sim_state)); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_BIG; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/h8300/configure b/sim/h8300/configure index c7b857cdc82..2c8a6e0abab 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 7e2a166307e..08bf6ff8acb 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) - SIM_AC_OUTPUT diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index d9b288365d0..63797deb9ec 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/iq2000/aclocal.m4 b/sim/iq2000/aclocal.m4 index 4fb0bd753f4..612939868c2 100644 --- a/sim/iq2000/aclocal.m4 +++ b/sim/iq2000/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/iq2000/configure b/sim/iq2000/configure index 0c73323d249..a6467398ff7 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize -sim_alignment cgen_breaks cgen cgendir @@ -756,7 +755,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -771,7 +769,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_scache enable_sim_default_model enable_werror @@ -1417,8 +1414,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10753,7 +10748,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10756 "configure" +#line 10751 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10859,7 +10854,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10862 "configure" +#line 10857 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11155,51 +11150,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11488,8 +11438,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index c61c9480d5e..4afa1b3501d 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(iq2000) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index 82ac53f2d0b..1129cee9145 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -62,6 +62,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_BIG; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index c239fafdcdf..57cbf650231 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/lm32/aclocal.m4 b/sim/lm32/aclocal.m4 index 4fb0bd753f4..612939868c2 100644 --- a/sim/lm32/aclocal.m4 +++ b/sim/lm32/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/lm32/configure b/sim/lm32/configure index 5a80fc32f9d..6c1d03d5171 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize -sim_alignment cgen_breaks cgen cgendir @@ -756,7 +755,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -771,7 +769,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_scache enable_sim_default_model enable_werror @@ -1417,8 +1414,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10753,7 +10748,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10756 "configure" +#line 10751 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10859,7 +10854,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10862 "configure" +#line 10857 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11155,51 +11150,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11488,8 +11438,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index 4a2037468de..06c65569642 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(lm32) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index fba2d638f42..0142868834d 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -93,6 +93,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_BIG; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index add2dae2b8f..18a2882e858 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-06-17 Mike Frysinger + + * configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32c/configure b/sim/m32c/configure index 571fdbcfc56..2c8a6e0abab 100755 --- a/sim/m32c/configure +++ b/sim/m32c/configure @@ -635,9 +635,7 @@ sim_reserved_bits sim_default_model sim_scache sim_float -sim_endian sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -10739,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10742 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10845,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10848 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11363,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 48b8f1ea7d2..9ff4abc9b89 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32r/aclocal.m4 b/sim/m32r/aclocal.m4 index 4fb0bd753f4..612939868c2 100644 --- a/sim/m32r/aclocal.m4 +++ b/sim/m32r/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/m32r/configure b/sim/m32r/configure index 33f8f39471f..1f12c92e04b 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize -sim_alignment cgen_breaks sim_extra_cflags traps_obj @@ -758,7 +757,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model' ac_subst_files='' ac_user_opts=' @@ -773,7 +771,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_scache enable_sim_default_model enable_werror @@ -1419,8 +1416,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10755,7 +10750,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10758 "configure" +#line 10753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10861,7 +10856,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10864 "configure" +#line 10859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11157,51 +11152,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_scache="16384" # Check whether --enable-sim-scache was given. if test "${enable_sim_scache+set}" = set; then : @@ -11504,8 +11454,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index a5cea83849e..9377081e938 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(m32r/d) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index bea6505d740..3d8db0332fd 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -56,6 +56,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_BIG; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/m4/sim_ac_option_endian.m4 b/sim/m4/sim_ac_option_endian.m4 index e5a5b61dc17..01467a06c16 100644 --- a/sim/m4/sim_ac_option_endian.m4 +++ b/sim/m4/sim_ac_option_endian.m4 @@ -15,51 +15,20 @@ dnl along with this program. If not, see . dnl dnl --enable-sim-endian={yes,no,big,little} is for simulators dnl that support both big and little endian targets. -dnl arg[1] is hardwired target endianness. -dnl arg[2] is default target endianness. AC_DEFUN([SIM_AC_OPTION_ENDIAN], -[ -wire_endian="[$1]" -default_endian="[$2]" +[dnl +AC_MSG_CHECKING([whether to force sim endianness]) +sim_endian= AC_ARG_ENABLE(sim-endian, [AS_HELP_STRING([--enable-sim-endian=endian], [Specify target byte endian orientation])], [case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi], -[if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi])dnl -]) -AC_SUBST(sim_endian) + b*|B*) sim_endian="BFD_ENDIAN_BIG";; + l*|L*) sim_endian="BFD_ENDIAN_LITTLE";; + yes | no) ;; + *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian");; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_TARGET_BYTE_ORDER], + [${sim_endian:-BFD_ENDIAN_UNKNOWN}], [Sim endian settings]) +AC_MSG_RESULT([${sim_alignment:-no}]) +])dnl diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4 index b18f2540f70..db6c3ffbbfe 100644 --- a/sim/m4/sim_ac_output.m4 +++ b/sim/m4/sim_ac_output.m4 @@ -48,9 +48,7 @@ AC_CONFIG_COMMANDS([stamp-h], [echo > stamp-h]) dnl These are unfortunate. They are conditionally called by other sim macros dnl but always used by common/Make-common.in. So we have to subst here even dnl when the rest of the code is in the respective macros. -AC_SUBST(sim_alignment) AC_SUBST(sim_bitsize) -AC_SUBST(sim_endian) AC_SUBST(sim_float) AC_SUBST(sim_scache) AC_SUBST(sim_default_model) diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 0c1aa1146e8..3b87798225f 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-17 Mike Frysinger * sim-main.h: Delete sim/callback.h include. diff --git a/sim/m68hc11/aclocal.m4 b/sim/m68hc11/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/m68hc11/aclocal.m4 +++ b/sim/m68hc11/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index fb519749618..1ed8c04f089 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_hardware enable_werror enable_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-hardware=LIST Specify the hardware to be included in the build. --enable-werror treat compile warnings as errors @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,51 +11139,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - hardware="cfi core pal glue \ m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram" sim_hw_cflags="-DWITH_HW=1" @@ -11413,8 +11363,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac index b2685040f61..986d8addfd8 100644 --- a/sim/m68hc11/configure.ac +++ b/sim/m68hc11/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON dnl Options available in this module -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_HARDWARE(\ m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram) diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c index d4b2531abea..7d28f40d71d 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -406,6 +406,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_BIG; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index f7abd659df2..cf7d270e6ad 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/mcore/aclocal.m4 b/sim/mcore/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/mcore/aclocal.m4 +++ b/sim/mcore/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/mcore/configure b/sim/mcore/configure index 3a18f37e928..2c8a6e0abab 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac index ec8a87e7d39..08bf6ff8acb 100644 --- a/sim/mcore/configure.ac +++ b/sim/mcore/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN - SIM_AC_OUTPUT diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index c2536582c5f..5d0224b36ce 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/microblaze/aclocal.m4 b/sim/microblaze/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/microblaze/aclocal.m4 +++ b/sim/microblaze/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/microblaze/configure b/sim/microblaze/configure index 3a18f37e928..2c8a6e0abab 100755 --- a/sim/microblaze/configure +++ b/sim/microblaze/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/microblaze/configure.ac b/sim/microblaze/configure.ac index ec8a87e7d39..08bf6ff8acb 100644 --- a/sim/microblaze/configure.ac +++ b/sim/microblaze/configure.ac @@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN - SIM_AC_OUTPUT diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index c582abc0744..05d64616764 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * interp.c (dotrace): Make comment const. diff --git a/sim/mips/aclocal.m4 b/sim/mips/aclocal.m4 index b61eb2e31dd..cd86d4d7705 100644 --- a/sim/mips/aclocal.m4 +++ b/sim/mips/aclocal.m4 @@ -111,7 +111,6 @@ m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_float.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) diff --git a/sim/mips/configure b/sim/mips/configure index d7fdbf31644..55041fdffad 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -633,7 +633,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_default_model sim_scache -sim_alignment cgen_breaks XMKMF sim_multi_obj @@ -764,7 +763,6 @@ sim_hw sim_hw_objs sim_hw_cflags sim_float -sim_endian sim_bitsize' ac_subst_files='' ac_user_opts=' @@ -783,7 +781,6 @@ enable_werror enable_build_warnings enable_sim_build_warnings enable_sim_reserved_bits -enable_sim_endian enable_sim_bitsize enable_sim_float enable_sim_hardware @@ -1439,8 +1436,6 @@ Optional Features: --enable-sim-reserved-bits Specify whether to check reserved bits in instruction - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-bitsize=N Specify target bitsize (32 or 64) --enable-sim-float Specify that the target processor has floating point hardware @@ -10770,7 +10765,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10773 "configure" +#line 10768 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10876,7 +10871,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10879 "configure" +#line 10874 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11304,69 +11299,6 @@ esac -# -# Select the byte order of the target -# -mips_endian= -default_endian= -case "${target}" in - mips64el*-*-*) mips_endian=LITTLE ;; - mips64vr*el-*-*) default_endian=LITTLE ;; - mips64*-*-*) default_endian=BIG ;; - mips16*-*-*) default_endian=BIG ;; - mipsisa32*-*-*) default_endian=BIG ;; - mipsisa64*-*-*) default_endian=BIG ;; - mips*-*-*) default_endian=BIG ;; - *) default_endian=BIG ;; -esac - -wire_endian="$mips_endian" -default_endian="$default_endian" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - - # # Select the bitsize of the target # @@ -12195,8 +12127,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index f0b26b4f0ac..03d8f5169e7 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -27,25 +27,6 @@ AC_SUBST(SIM_SUBTARGET) -# -# Select the byte order of the target -# -mips_endian= -default_endian= -case "${target}" in - mips64el*-*-*) mips_endian=LITTLE ;; - mips64vr*el-*-*) default_endian=LITTLE ;; - mips64*-*-*) default_endian=BIG ;; - mips16*-*-*) default_endian=BIG ;; - mipsisa32*-*-*) default_endian=BIG ;; - mipsisa64*-*-*) default_endian=BIG ;; - mips*-*-*) default_endian=BIG ;; - *) default_endian=BIG ;; -esac -SIM_AC_OPTION_ENDIAN($mips_endian,$default_endian) - - - # # Select the bitsize of the target # diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 0e2c36f5672..6f6dceda053 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-17 Mike Frysinger * mn10300_sim.h (u642dw, dw2u64): Change INLINE to INLINE2. diff --git a/sim/mn10300/aclocal.m4 b/sim/mn10300/aclocal.m4 index 8121fe66c14..61a92c9578a 100644 --- a/sim/mn10300/aclocal.m4 +++ b/sim/mn10300/aclocal.m4 @@ -111,7 +111,6 @@ m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_reserved_bits.m4]) diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 4dee9eb8391..d24ac1df39e 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -634,7 +634,6 @@ LIBOBJS sim_default_model sim_scache sim_float -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,7 +752,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_bitsize' ac_subst_files='' ac_user_opts=' @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_reserved_bits enable_sim_bitsize enable_sim_hardware @@ -1413,8 +1410,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-reserved-bits Specify whether to check reserved bits in instruction @@ -10748,7 +10743,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10751 "configure" +#line 10746 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10849,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10857 "configure" +#line 10852 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11150,51 +11145,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_reserved_bits="1" # Check whether --enable-sim-reserved-bits was given. if test "${enable_sim_reserved_bits+set}" = set; then : @@ -11493,8 +11443,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index 6754136f6d9..1083c062df6 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_RESERVED_BITS SIM_AC_OPTION_BITSIZE(32,31) SIM_AC_OPTION_HARDWARE(mn103cpu mn103int mn103tim mn103ser mn103iop) diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 541d4b14668..b793d3c019f 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -94,6 +94,9 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) return 0; diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index bc157933282..a0f5ccc2988 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/moxie/aclocal.m4 b/sim/moxie/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/moxie/aclocal.m4 +++ b/sim/moxie/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/moxie/configure b/sim/moxie/configure index 6fa5b49f07c..26ccbb3d01e 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks DTC MAINT @@ -754,8 +753,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +767,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1412,8 +1409,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10743,7 +10738,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10746 "configure" +#line 10741 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10849,7 +10844,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10852 "configure" +#line 10847 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11238,52 +11233,6 @@ fi -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11506,8 +11455,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac index 75a6f37ed26..c7475b799a6 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -6,6 +6,4 @@ SIM_AC_COMMON AC_CHECK_TOOL(DTC, dtc) -SIM_AC_OPTION_ENDIAN(BIG) - SIM_AC_OUTPUT diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index caf9e43deda..c70215f8c7a 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -1198,6 +1198,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_DESC sd = sim_state_alloc (kind, cb); SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_BIG; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 092a4f70313..a78d476516c 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * msp430-sim.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/msp430/aclocal.m4 b/sim/msp430/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/msp430/aclocal.m4 +++ b/sim/msp430/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/msp430/configure b/sim/msp430/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/msp430/configure +++ b/sim/msp430/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/msp430/configure.ac b/sim/msp430/configure.ac index 9cab54296b6..4f2c0ace70b 100644 --- a/sim/msp430/configure.ac +++ b/sim/msp430/configure.ac @@ -23,6 +23,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index 58a54698993..ed0393317c1 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -112,6 +112,9 @@ sim_open (SIM_OPEN_KIND kind, /* Initialise the simulator. */ + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { sim_state_free (sd); diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index b163a587ae1..4140fd6e6a5 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * sim-if.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/or1k/aclocal.m4 b/sim/or1k/aclocal.m4 index 8298e1f682f..d3a56933952 100644 --- a/sim/or1k/aclocal.m4 +++ b/sim/or1k/aclocal.m4 @@ -113,7 +113,6 @@ m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) m4_include([../m4/sim_ac_option_cgen_maint.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_scache.m4]) diff --git a/sim/or1k/configure b/sim/or1k/configure index 1d772d6b4e2..d73662434ab 100755 --- a/sim/or1k/configure +++ b/sim/or1k/configure @@ -633,7 +633,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_reserved_bits sim_float -sim_alignment cgen_breaks cgen cgendir @@ -755,7 +754,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model sim_bitsize' ac_subst_files='' @@ -771,7 +769,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_bitsize enable_sim_scache enable_sim_default_model @@ -1418,8 +1415,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-bitsize=N Specify target bitsize (32 or 64) --enable-sim-scache=size Specify simulator execution cache size @@ -10755,7 +10750,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10758 "configure" +#line 10753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10861,7 +10856,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10864 "configure" +#line 10859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11156,51 +11151,6 @@ fi - -wire_endian="BIG" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - wire_word_bitsize="32" wire_word_msb="31" wire_address_bitsize="32" @@ -11549,8 +11499,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac index e09fee1ac13..ed8538eb108 100644 --- a/sim/or1k/configure.ac +++ b/sim/or1k/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_BITSIZE([32], [31], [32]) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL([or1200]) diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c index e6342ee42c0..06d7dcb61b2 100644 --- a/sim/or1k/sim-if.c +++ b/sim/or1k/sim-if.c @@ -160,6 +160,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, char c; int i; + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_BIG; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 280234af869..fc3f62f0bc3 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * Makefile.in (ENDIAN_CFLAGS): Delete. + * configure.ac: Delete sim-endian. + * configure: Regenerate. + 2021-06-17 Mike Frysinger * igen.c (gen_semantics_h): Rename PAGE_SIZE to MPC860C0_PAGE_SIZE. diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index c1135a3a7b0..4446922dede 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -72,7 +72,6 @@ MAKEINFO = makeinfo RANLIB = @RANLIB@ INLINE_CFLAGS = @sim_inline@ -ENDIAN_CFLAGS = @sim_endian@ SMP_CFLAGS = @sim_smp@ XOR_ENDIAN_CFLAGS = @sim_xor_endian@ BITSIZE_CFLAGS = @sim_bitsize@ @@ -86,7 +85,6 @@ TERMIO_CFLAGS = @sim_termio@ WARNING_CFLAGS = @sim_warnings@ DEVZERO_CFLAGS = @sim_devzero@ CONFIG_CFLAGS = \ - $(ENDIAN_CFLAGS) \ $(SMP_CFLAGS) \ $(XOR_ENDIAN_CFLAGS) \ $(BITSIZE_CFLAGS) \ diff --git a/sim/ppc/configure b/sim/ppc/configure index 7927bedd198..930b24a1b5b 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -639,7 +639,6 @@ sim_bitsize sim_igen_smp sim_smp sim_xor_endian -sim_endian sim_inline sim_pk_obj sim_pk_src @@ -745,7 +744,6 @@ enable_sim_config enable_sim_decode_mechanism enable_sim_default_model enable_sim_duplicate -enable_sim_endian enable_sim_filter enable_sim_float enable_sim_hardware @@ -1400,7 +1398,6 @@ Optional Features: --enable-sim-decode-mechanism=which Specify the instruction decode mechanism. --enable-sim-default-model=which Specify default PowerPC to model. --enable-sim-duplicate Expand (duplicate) semantic functions. - --enable-sim-endian=endian Specify target byte endian orientation. --enable-sim-filter=rule Specify filter rules. --enable-sim-float Specify whether the target has hard, soft, altivec or e500 floating point. --enable-sim-hardware=list Specify the hardware to be included in the build. @@ -3201,27 +3198,6 @@ fi fi -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - yes) case "$target" in - *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; - esac;; - no) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - sim_endian="" -fi - - # Check whether --enable-sim-filter was given. if test "${enable_sim_filter+set}" = set; then : enableval=$enable_sim_filter; case "${enableval}" in @@ -4880,7 +4856,6 @@ fi - ac_config_files="$ac_config_files Makefile" diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 5867f60b628..9d294ae414a 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -93,24 +93,6 @@ if test x"$silent" != x"yes"; then fi])dnl -AC_ARG_ENABLE(sim-endian, -[ --enable-sim-endian=endian Specify target byte endian orientation.], -[case "${enableval}" in - yes) case "$target" in - *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; - esac;; - no) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi],[sim_endian=""])dnl - - AC_ARG_ENABLE(sim-filter, [ --enable-sim-filter=rule Specify filter rules.], [case "${enableval}" in @@ -758,7 +740,6 @@ AC_SUBST(sim_hw_obj) AC_SUBST(sim_pk_src) AC_SUBST(sim_pk_obj) AC_SUBST(sim_inline) -AC_SUBST(sim_endian) AC_SUBST(sim_xor_endian) AC_SUBST(sim_smp) AC_SUBST(sim_igen_smp) diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 4a91a3369f8..81033cf2e0a 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/pru/aclocal.m4 b/sim/pru/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/pru/aclocal.m4 +++ b/sim/pru/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/pru/configure b/sim/pru/configure index 99990798944..2c8a6e0abab 100755 --- a/sim/pru/configure +++ b/sim/pru/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,52 +11139,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11412,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/pru/configure.ac b/sim/pru/configure.ac index 1846b26e14b..8e9577c9ea2 100644 --- a/sim/pru/configure.ac +++ b/sim/pru/configure.ac @@ -23,6 +23,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - SIM_AC_OUTPUT diff --git a/sim/pru/interp.c b/sim/pru/interp.c index 38269df44ce..09045dc4cb0 100644 --- a/sim/pru/interp.c +++ b/sim/pru/interp.c @@ -747,6 +747,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, /* Set default options before parsing user options. */ current_alignment = STRICT_ALIGNMENT; + current_target_byte_order = BFD_ENDIAN_LITTLE; /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog index bbbd8de753e..5c7973f5f95 100644 --- a/sim/riscv/ChangeLog +++ b/sim/riscv/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/riscv/aclocal.m4 b/sim/riscv/aclocal.m4 index 6677e0f80a8..5aa36404058 100644 --- a/sim/riscv/aclocal.m4 +++ b/sim/riscv/aclocal.m4 @@ -112,7 +112,6 @@ m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) m4_include([../m4/sim_ac_option_default_model.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/riscv/configure b/sim/riscv/configure index aa123f50c22..cdbedcceabc 100755 --- a/sim/riscv/configure +++ b/sim/riscv/configure @@ -634,7 +634,6 @@ LIBOBJS sim_reserved_bits sim_scache sim_float -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -752,7 +751,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_default_model sim_bitsize' ac_subst_files='' @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_default_model enable_sim_bitsize enable_werror @@ -1413,8 +1410,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-default-model=model Specify default model to simulate --enable-sim-bitsize=N Specify target bitsize (32 or 64) @@ -10747,7 +10742,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10750 "configure" +#line 10745 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10853,7 +10848,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10856 "configure" +#line 10851 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11148,52 +11143,6 @@ fi - -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - # Select the default model for the target. riscv_model= case "${target}" in @@ -11506,8 +11455,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac index 421b5ba7ef5..e866c8f8f4a 100644 --- a/sim/riscv/configure.ac +++ b/sim/riscv/configure.ac @@ -4,8 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) - # Select the default model for the target. riscv_model= case "${target}" in diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c index f3754da1ed8..8b96677634f 100644 --- a/sim/riscv/interp.c +++ b/sim/riscv/interp.c @@ -62,6 +62,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_DESC sd = sim_state_alloc_extra (kind, callback, sizeof (struct riscv_sim_state)); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index 7a1976cea02..a2e2cfbd51a 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,7 @@ +2021-06-17 Mike Frysinger + + * configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/rl78/configure b/sim/rl78/configure index 571fdbcfc56..2c8a6e0abab 100755 --- a/sim/rl78/configure +++ b/sim/rl78/configure @@ -635,9 +635,7 @@ sim_reserved_bits sim_default_model sim_scache sim_float -sim_endian sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -10739,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10742 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10845,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10848 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11363,8 +11361,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 76b61b0e096..0b3cbc6efc7 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,7 @@ +2021-06-17 Mike Frysinger + + * configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/rx/configure b/sim/rx/configure index 1e9f11af6e6..7200bcb42c4 100755 --- a/sim/rx/configure +++ b/sim/rx/configure @@ -635,9 +635,7 @@ sim_reserved_bits sim_default_model sim_scache sim_float -sim_endian sim_bitsize -sim_alignment cgen_breaks sim_cycle_accurate_flags MAINT @@ -10743,7 +10741,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10746 "configure" +#line 10744 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10849,7 +10847,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10852 "configure" +#line 10850 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11383,8 +11381,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 9bd6b85ad37..950fe1a3f70 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/sh/aclocal.m4 b/sim/sh/aclocal.m4 index 88b04d1652f..f5eee940afc 100644 --- a/sim/sh/aclocal.m4 +++ b/sim/sh/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_warnings.m4]) diff --git a/sim/sh/configure b/sim/sh/configure index 00e0b882ad4..661ad09e3ce 100755 --- a/sim/sh/configure +++ b/sim/sh/configure @@ -636,7 +636,6 @@ sim_default_model sim_scache sim_float sim_bitsize -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +752,7 @@ WARN_CFLAGS sim_inline sim_hw sim_hw_objs -sim_hw_cflags -sim_endian' +sim_hw_cflags' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_werror enable_build_warnings enable_sim_build_warnings @@ -1411,8 +1408,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10742,7 +10737,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10740 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10843,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10846 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11144,51 +11139,6 @@ fi -wire_endian="" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : enableval=$enable_werror; case "${enableval}" in @@ -11409,8 +11359,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac index dd975d3259e..9bf4a4099ee 100644 --- a/sim/sh/configure.ac +++ b/sim/sh/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN SIM_AC_OPTION_WARNINGS(no) SIM_AC_OUTPUT diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 304ec6156a3..2af2fc25dfc 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,9 @@ +2021-06-17 Mike Frysinger + + * configure.ac: Delete SIM_AC_OPTION_ENDIAN call. + * interp.c (sim_open): Set current_target_byte_order. + * aclocal.m4, configure: Regenerate. + 2021-06-16 Mike Frysinger * configure: Regenerate. diff --git a/sim/v850/aclocal.m4 b/sim/v850/aclocal.m4 index 8121fe66c14..61a92c9578a 100644 --- a/sim/v850/aclocal.m4 +++ b/sim/v850/aclocal.m4 @@ -111,7 +111,6 @@ m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) m4_include([../m4/sim_ac_option_bitsize.m4]) -m4_include([../m4/sim_ac_option_endian.m4]) m4_include([../m4/sim_ac_option_hardware.m4]) m4_include([../m4/sim_ac_option_inline.m4]) m4_include([../m4/sim_ac_option_reserved_bits.m4]) diff --git a/sim/v850/configure b/sim/v850/configure index 28471bfaf38..9f83ff1c2a2 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -634,7 +634,6 @@ LIBOBJS sim_default_model sim_scache sim_float -sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,7 +752,6 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian sim_bitsize' ac_subst_files='' ac_user_opts=' @@ -768,7 +766,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_endian enable_sim_reserved_bits enable_sim_bitsize enable_werror @@ -1413,8 +1410,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-endian=endian - Specify target byte endian orientation --enable-sim-reserved-bits Specify whether to check reserved bits in instruction @@ -10748,7 +10743,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10751 "configure" +#line 10746 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10849,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10857 "configure" +#line 10852 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11150,51 +11145,6 @@ fi -wire_endian="LITTLE" -default_endian="" -# Check whether --enable-sim-endian was given. -if test "${enable_sim_endian+set}" = set; then : - enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; - yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" - else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi -else - if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" -else - if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" - else - sim_endian= - fi -fi -fi - - default_sim_reserved_bits="1" # Check whether --enable-sim-reserved-bits was given. if test "${enable_sim_reserved_bits+set}" = set; then : @@ -11493,8 +11443,6 @@ ac_config_commands="$ac_config_commands stamp-h" - - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac index 6d586f194fd..c3cd64627c0 100644 --- a/sim/v850/configure.ac +++ b/sim/v850/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_RESERVED_BITS SIM_AC_OPTION_BITSIZE(32,31) diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 79c6e0f7ddc..92c80a814c6 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -197,6 +197,9 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_target_byte_order = BFD_ENDIAN_LITTLE; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) return 0; -- 2.30.2