sim: overhaul & unify endian settings management
authorMike Frysinger <vapier@gentoo.org>
Tue, 15 Jun 2021 23:51:52 +0000 (19:51 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 18 Jun 2021 03:20:13 +0000 (23:20 -0400)
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.

151 files changed:
sim/ChangeLog
sim/Makefile.in
sim/aarch64/ChangeLog
sim/aarch64/aclocal.m4
sim/aarch64/configure
sim/aarch64/configure.ac
sim/aclocal.m4
sim/arm/ChangeLog
sim/arm/aclocal.m4
sim/arm/configure
sim/arm/configure.ac
sim/avr/ChangeLog
sim/avr/aclocal.m4
sim/avr/configure
sim/avr/configure.ac
sim/avr/interp.c
sim/bfin/ChangeLog
sim/bfin/aclocal.m4
sim/bfin/configure
sim/bfin/configure.ac
sim/bfin/interp.c
sim/bpf/ChangeLog
sim/bpf/aclocal.m4
sim/bpf/configure
sim/bpf/configure.ac
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/sim-config.c
sim/common/sim-config.h
sim/config.h.in
sim/configure
sim/configure.ac
sim/cr16/ChangeLog
sim/cr16/aclocal.m4
sim/cr16/configure
sim/cr16/configure.ac
sim/cr16/interp.c
sim/cris/ChangeLog
sim/cris/aclocal.m4
sim/cris/configure
sim/cris/configure.ac
sim/cris/sim-if.c
sim/d10v/ChangeLog
sim/d10v/aclocal.m4
sim/d10v/configure
sim/d10v/configure.ac
sim/erc32/ChangeLog
sim/erc32/configure
sim/example-synacor/ChangeLog
sim/example-synacor/aclocal.m4
sim/example-synacor/configure
sim/example-synacor/configure.ac
sim/example-synacor/interp.c
sim/frv/ChangeLog
sim/frv/aclocal.m4
sim/frv/configure
sim/frv/configure.ac
sim/frv/sim-if.c
sim/ft32/ChangeLog
sim/ft32/aclocal.m4
sim/ft32/configure
sim/ft32/configure.ac
sim/ft32/interp.c
sim/h8300/ChangeLog
sim/h8300/aclocal.m4
sim/h8300/compile.c
sim/h8300/configure
sim/h8300/configure.ac
sim/iq2000/ChangeLog
sim/iq2000/aclocal.m4
sim/iq2000/configure
sim/iq2000/configure.ac
sim/iq2000/sim-if.c
sim/lm32/ChangeLog
sim/lm32/aclocal.m4
sim/lm32/configure
sim/lm32/configure.ac
sim/lm32/sim-if.c
sim/m32c/ChangeLog
sim/m32c/configure
sim/m32r/ChangeLog
sim/m32r/aclocal.m4
sim/m32r/configure
sim/m32r/configure.ac
sim/m32r/sim-if.c
sim/m4/sim_ac_option_endian.m4
sim/m4/sim_ac_output.m4
sim/m68hc11/ChangeLog
sim/m68hc11/aclocal.m4
sim/m68hc11/configure
sim/m68hc11/configure.ac
sim/m68hc11/interp.c
sim/mcore/ChangeLog
sim/mcore/aclocal.m4
sim/mcore/configure
sim/mcore/configure.ac
sim/microblaze/ChangeLog
sim/microblaze/aclocal.m4
sim/microblaze/configure
sim/microblaze/configure.ac
sim/mips/ChangeLog
sim/mips/aclocal.m4
sim/mips/configure
sim/mips/configure.ac
sim/mn10300/ChangeLog
sim/mn10300/aclocal.m4
sim/mn10300/configure
sim/mn10300/configure.ac
sim/mn10300/interp.c
sim/moxie/ChangeLog
sim/moxie/aclocal.m4
sim/moxie/configure
sim/moxie/configure.ac
sim/moxie/interp.c
sim/msp430/ChangeLog
sim/msp430/aclocal.m4
sim/msp430/configure
sim/msp430/configure.ac
sim/msp430/msp430-sim.c
sim/or1k/ChangeLog
sim/or1k/aclocal.m4
sim/or1k/configure
sim/or1k/configure.ac
sim/or1k/sim-if.c
sim/ppc/ChangeLog
sim/ppc/Makefile.in
sim/ppc/configure
sim/ppc/configure.ac
sim/pru/ChangeLog
sim/pru/aclocal.m4
sim/pru/configure
sim/pru/configure.ac
sim/pru/interp.c
sim/riscv/ChangeLog
sim/riscv/aclocal.m4
sim/riscv/configure
sim/riscv/configure.ac
sim/riscv/interp.c
sim/rl78/ChangeLog
sim/rl78/configure
sim/rx/ChangeLog
sim/rx/configure
sim/sh/ChangeLog
sim/sh/aclocal.m4
sim/sh/configure
sim/sh/configure.ac
sim/v850/ChangeLog
sim/v850/aclocal.m4
sim/v850/configure
sim/v850/configure.ac
sim/v850/interp.c

index 109d5d8a9d254b33770ea569cbc698f12f34ff3b..9740e1311bc44851bfe03fc2fcdb440fde3afb7c 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <simon.marchi@polymtl.ca>
 
        * common/Make-common.in (COMPILE, libsim.a, run$(EXEEXT),
index 3ba80a463812f8f6d915c7ba4ba275e1c8bbc03d..f77abe38d8ad44a18548ca424da50a91826e4845 100644 (file)
@@ -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 \
index ea1611dd3299649b22707fc7bf6849cc8321a5f7..a522fcf0ef77235a58b41a5de0d39d5a19906058 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 3a18f37e928f9d3b75feec03327d5d9eb0cef5c0..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 7ac149a5f9dbd9eddb12828b14f7788ea2ef2ef2..849e957f827783c9b91d1326195e8a529477cdaf 100644 (file)
@@ -24,6 +24,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN
-
 SIM_AC_OUTPUT
index f21cf0813e378f489a079dd82f64152a560a6b9b..773ba0fc6cfc173e571c056dacd3c0209d31ebe6 100644 (file)
@@ -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])
index b4a42be575ef7a7ee0cc4f83c7022f506bf1cee0..8bb9bffbfb0fc2c9d5a3abaf33565c27edf1be33 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 3a18f37e928f9d3b75feec03327d5d9eb0cef5c0..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index ec8a87e7d397c53155c541dd97f8110f1d244aa7..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN
-
 SIM_AC_OUTPUT
index 08f05583c25d3246708f7c69dbaa372d4b2bf984..156e7f26e566c13bdc18c02b80122d09edcb1d6c 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 8cd4d23a479bdaa7355fecf297d51b6aa58363de..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 1626fadaa973cedf5a6e1cda2ec2d5c3a9f3ce2a..2bd72731b5553486e52b72c52cbb3295d7498755 100644 (file)
@@ -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)
index da2ef6e2a4ebb1eacce46651028fbda7a1225ce1..fa97d8e6a761a460e162a7f60a7a4c0eb7adeb4d 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 529d860d8722b6f01b5e5808b0c3cfb00873a703..4957db847636ada65f6d713371617afc1a539a49 100644 (file)
@@ -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])
index b19f154fcb8e72b3769b3cbc051aba91c4a9c9c7..d4aa3a21f0cd2002dbb958a1b0341a456f0127a9 100755 (executable)
@@ -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
 
 
 
-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
index ddc7bc6e03991912d5443ef5a0a5b91981d50846..9b17dc4212fe692b6001c7ff468340c55bd228f0 100644 (file)
@@ -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 \
index 10de001d7ce75630d78cf8592c3eab47b729a331..216cefe2c21c558a76333c0e858ebb55968a4548 100644 (file)
@@ -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)
index 2b768356b690b92949e198886304852a9de84aaa..5e2b222438d369e114db255972033ca34a638b70 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 8298e1f682fda1aa32612ea00598a4d211096f63..d3a56933952162c0036c336bdeccc5371c465d59 100644 (file)
@@ -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])
index 102f1b867dc56880431fdd92ed0583afa218d184..a0ed8ab4c37787ab6749933077df620bef82b014 100755 (executable)
@@ -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
 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
index 4e00c131609091215aac1924b4561dcd219cc708..d2ec00c5a34c559aa21f3491b82df36df385fbb4 100644 (file)
@@ -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)
index abb2ec6799523f42a41691e28e62b0152b449b88..0d260eb71238a304282db7c6e80dd6391027fd52 100644 (file)
@@ -1,3 +1,11 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * cgen-trace.c: Include sim/callback.h.
index 0ab9e79e8fdf7d038595bdc8c29b7a695da9de60..7a6a2030a47b5ac6a0b112029887c3c79f0e2ce7 100644 (file)
@@ -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) \
index c9005f449fe66ca7e9c7a6a25328bcaeb7cec71a..fc6b09a7238d13ebf779e57ebe2878d6e2779229 100644 (file)
@@ -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));
 
index 2b6ed3d0b7d4cd4caf4eeee200d2c18ed3c318f1..5b1713cff706af6618d926606d353575db7652d3 100644 (file)
 
    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 \
index 6e8768649411c7285aa8143e5a139c7221253097..af6b591d9eef2a5410843ad878adff3d0274d5f0 100644 (file)
 /* How to route I/O */
 #undef WITH_STDIO
 
+/* Sim endian settings */
+#undef WITH_TARGET_BYTE_ORDER
+
 /* Sim trace settings */
 #undef WITH_TRACE
 
index 5bfbd601fe55548a41ac6b99b36dbc7027a388eb..959fa9037ade6be57688ee64c7f1d179caa1938f 100755 (executable)
@@ -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; }
index 129e9421ec1dd9a8e0ddb7f48a3ddf18215d09bc..4ba2921ebaf35eb305f65a1b59e23ed40f12f7a7 100644 (file)
@@ -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
index 231b5350e48749d7daef21a826a86e6c16d6b50b..dc4c1e8b239c3857ce7860439dd61a23d85a4000 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 8cd4d23a479bdaa7355fecf297d51b6aa58363de..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 7f6b07fe286acd6c0b820170c192dbf3d742bcfe..6e3438c9d809ccd7161c9497eeecd0529459a1f3 100644 (file)
@@ -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)
     {
index 24084199f734daa1659851870c2492bc49d07741..61d064cd067eb63148be24c75222b13e24e7b3ad 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * traps.c: Include sim/callback.h.
index 4fb0bd753f47c82f1eab0a73def6f761baed82aa..612939868c20b0127409b912cdf487a79b07c7aa 100644 (file)
@@ -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])
index 21171f0d3f4dd2cca5f1e0f2235d5b14a29500e8..cd6fe7831750f5ff61228c3b8763ba30a78769c8 100755 (executable)
@@ -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
 
 
 
-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
index cc5bb4922f18a5b30c4a10aab23dd55ac420333e..48c4bbeabac20ffe9e64799ac73f98e38ed04267 100644 (file)
@@ -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)
index c6dcc23c938aac7d3dc23dc45521d133d14e59a3..c183856fa4c8ae929a24ecc3075cc656c2c70d7a 100644 (file)
@@ -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)
     {
index 1154ab74b4be6b1c7a6b55d93cf9ab7233b9ad4f..d5881766da7fa3762bc1f3b65136cfb418f93dc8 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 3a18f37e928f9d3b75feec03327d5d9eb0cef5c0..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index ec8a87e7d397c53155c541dd97f8110f1d244aa7..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN
-
 SIM_AC_OUTPUT
index 72e69c332931f40dcf009fa8e35c061729dbcc27..24d1aacb7d71a3c53c34f842bba80715e2150d8a 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 2493f9603a171c4321f4761532ddfe3f286e69f0..2b10dc4be1dacd8651970074ba6a8f927663a660 100755 (executable)
@@ -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
index 7737e9ce2b5109f6448df0f71ad70511ab84f3ed..4f2c8c58715174519e7463993bb81314a49c6c33 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 8cd4d23a479bdaa7355fecf297d51b6aa58363de..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 784c9cbc5755746ec1ee2dfc09a18abf8b7c0a45..57b1bee7cd9d167b31b4e49406c50a93478e6b77 100644 (file)
@@ -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)
index 80b33cd6d8eb50255051b93eff487a5db2a508bb..264d33e926c2b83ba25a5182d8371059be4186ce 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * traps.c: Include sim/callback.h.
index 4fb0bd753f47c82f1eab0a73def6f761baed82aa..612939868c20b0127409b912cdf487a79b07c7aa 100644 (file)
@@ -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])
index cf39e6e5392525b8cc2fe2f830dc84f5217f6d1c..a578200c5b9a4dea2f38855ceea3fbb6e1f636b2 100755 (executable)
@@ -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
 
 
 
-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
index fcc2e8836bb74d21c151c8af2d0c0d47dae20cd8..39d8de4a5b8e9fb06dd22bee154df279a14e6fbe 100644 (file)
@@ -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)
index 0ad5f626e45cafc740aa800b7bc8b4b66c5704a3..758e17a3fc5ae47c3a4b72c200ba5d23eb747a8e 100644 (file)
@@ -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)
index db9ea4f592b3073f6ee9796117eee6c9989263b6..bb7ea80d8f4578c404cb84d1a48de11bec0606d5 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 8cd4d23a479bdaa7355fecf297d51b6aa58363de..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 8a44a472f6054e7325ceef10ae47c24a6017a488..77ed8f8eb897969c37bb947998d420168e0b35fe 100644 (file)
@@ -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)
index e12242ccd3b77b79a305aed2ffc93158f7418688..57ada187fb7eb9e8b4c2bd50e3d448a447bfcfef 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * compile.c: Include sim/callback.h.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 8b13326a0a9c2fa45c3f6b45c281b682159026fd..565eadfe3b144cb1b1aa8770f0af6e65699c60b7 100644 (file)
@@ -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)
     {
index c7b857cdc8262ce7a02766dfdfeed38bc80db814..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 7e2a166307ed0b6ae05ca4919e744e1c1d5ea0cf..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(BIG)
-
 SIM_AC_OUTPUT
index d9b288365d048032a220fa0fc76ded80efde9da8..63797deb9eca9f4094e5adb4e89e82da7c2fe073 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 4fb0bd753f47c82f1eab0a73def6f761baed82aa..612939868c20b0127409b912cdf487a79b07c7aa 100644 (file)
@@ -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])
index 0c73323d249064e0562f3acb9b1dd7f367879afc..a6467398ff78875b91941b5e3ef68aef79a34780 100755 (executable)
@@ -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
 
 
 
-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
index c61c9480d5e5f3f4c44d667c857a986bf1beed67..4afa1b3501d8c70632e15b5cdab651c298b38cf5 100644 (file)
@@ -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)
index 82ac53f2d0bdb40a94beaedfc55a8b0472900453..1129cee914579086978ba85eb76ab51382112e02 100644 (file)
@@ -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)
index c239fafdcdfa0e0367dd4f055b97bff41d97294b..57cbf6502317e4edfe870ea3f95452d9d1668f64 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 4fb0bd753f47c82f1eab0a73def6f761baed82aa..612939868c20b0127409b912cdf487a79b07c7aa 100644 (file)
@@ -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])
index 5a80fc32f9d2aac6f44a9fa6c163e5fb477a1001..6c1d03d51715429c06c7e9678f6de0bcb522ffa5 100755 (executable)
@@ -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
 
 
 
-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
index 4a2037468dee8b2ce45136b1ffa2c1ce0137e5cd..06c655696420bc1210a1d73e8cc44ab330cdd7bb 100644 (file)
@@ -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)
index fba2d638f42bc9e65ba39549be8e6d5cbc09326f..0142868834d52d2f4be0a2609f7805fd7166c32e 100644 (file)
@@ -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)
index add2dae2b8f53e9b40ab7b329ec5008ce2d342df..18a2882e8588ed883d7e3f2ab06fbe0b630f35f5 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 571fdbcfc56052aa6c38c1f9f035b3022573907f..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
index 48b8f1ea7d2fa3294137264cba0c94f7d9053d87..9ff4abc9b898fccb4efe6e503c43e1f22ec9bc28 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 4fb0bd753f47c82f1eab0a73def6f761baed82aa..612939868c20b0127409b912cdf487a79b07c7aa 100644 (file)
@@ -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])
index 33f8f39471f10bf9dec05b21afa5d6fd044a10f9..1f12c92e04b8e8e45aa47ce4d2ae70eaa64f009f 100755 (executable)
@@ -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
 
 
 
-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
index a5cea83849e7bfd403d9042a5ff67ef88d276c2f..9377081e938abeb7524e906473ceb888f5fb062d 100644 (file)
@@ -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)
index bea6505d74046636ccd8c708830dbaf598ba2f4b..3d8db0332fd6f3ae5c0b609982515cc7f42b70ff 100644 (file)
@@ -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)
index e5a5b61dc178fb6d0c1f5f0d928e541d041f2d45..01467a06c163213d688740ce3631802a34877dbe 100644 (file)
@@ -15,51 +15,20 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 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
index b18f2540f70b9f11df1fe3cd8b46c025e3204f0e..db6c3ffbbfe98cad0fe61bb4e4aa145317b14f93 100644 (file)
@@ -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)
index 0c1aa1146e8d99933682f738557a2dc979cdfef0..3b87798225f14b2a30e3272e06bd2a4f251a700c 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * sim-main.h: Delete sim/callback.h include.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index fb519749618d3750a94656195560a8d3967f7f53..1ed8c04f089174a2723562d003245587ada7289c 100755 (executable)
@@ -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
 
 
 
-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
index b2685040f61ef5a11125c358ae0bfcf83fe02ce3..986d8addfd866e07edfc0db2caa34f67c1ca9c88 100644 (file)
@@ -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)
 
index d4b2531abea0f6a8d3880aa014ee36d5c68cfb69..7d28f40d71dd811a73e1bc4f5356d0fda614d073 100644 (file)
@@ -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)
     {
index f7abd659df2ff9b34ff7b51b198557c6e42a5068..cf7d270e6ad0b078075195a1c7527bd2caf7fae6 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 3a18f37e928f9d3b75feec03327d5d9eb0cef5c0..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index ec8a87e7d397c53155c541dd97f8110f1d244aa7..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN
-
 SIM_AC_OUTPUT
index c2536582c5f161f98ab4973102cf90a56ad1424e..5d0224b36ce40a39dba40f1b9b4555fd5eebf637 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 3a18f37e928f9d3b75feec03327d5d9eb0cef5c0..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index ec8a87e7d397c53155c541dd97f8110f1d244aa7..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN
-
 SIM_AC_OUTPUT
index c582abc074479758a585c9fc1f75fba41f5234ae..05d6461676452e5d854f7dffadcfd4c5d5132350 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * interp.c (dotrace): Make comment const.
index b61eb2e31dd7dddb1171a5496dedb06d09d3241c..cd86d4d77051bb841f7675e836f0d9f8710633fa 100644 (file)
@@ -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])
index d7fdbf3164435fac33c838c18926bf9528092ae2..55041fdffadba763e9fe2abf7883909f3844d162 100755 (executable)
@@ -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
index f0b26b4f0acbaf9448eda8eb1b59a1c24a130baa..03d8f5169e767e6da51d74b242cd0e5c176f630c 100644 (file)
@@ -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
 #
index 0e2c36f5672db2ffc168d5ad47a0bf46f1e45914..6f6dceda0530cbc6d1900f4e3d959db0eda509ea 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * mn10300_sim.h (u642dw, dw2u64): Change INLINE to INLINE2.
index 8121fe66c14a87692e02cb28a896fbd8f47212a9..61a92c9578aa28d09f542807a5cd5fa55288d3e2 100644 (file)
@@ -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])
index 4dee9eb8391284774fc28699c2ac43672178dbab..d24ac1df39e565f5d5486dee72118bb523bcf898 100755 (executable)
@@ -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
 
 
 
-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
index 6754136f6d961e5481568b1480daa62cbe0b6239..1083c062df68c4d6c923316cbfc895a8d2b38ced 100644 (file)
@@ -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)
index 541d4b14668cc81cd76d11cd54263e23e2064a3a..b793d3c019feecec143e52a83a563ec5dc3b23d4 100644 (file)
@@ -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;
index bc157933282bc3e6e4626a0d0cdc991bfbd2c94f..a0f5ccc29889b12cefa94dbc421ddc3f7a18ba1c 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 6fa5b49f07c842bb7465ea3ad20115063eb829cc..26ccbb3d01e04bfe49da2dfa03d056d8fcdffdc6 100755 (executable)
@@ -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
 
 
 
-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
index 75a6f37ed2657431051f244390083e1dddfd7019..c7475b799a6f9596b012a3b1e5f0f6d1a84d7f4b 100644 (file)
@@ -6,6 +6,4 @@ SIM_AC_COMMON
 
 AC_CHECK_TOOL(DTC, dtc)
 
-SIM_AC_OPTION_ENDIAN(BIG)
-
 SIM_AC_OUTPUT
index caf9e43deda5b83649d4233801821ba279260e23..c70215f8c7a4066e9083ce6b3d6d354a57af3af5 100644 (file)
@@ -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)
     {
index 092a4f703134f52500f95cb06c0157da4bfd5e37..a78d476516c9d74a7aa0a60574caffa4c6f2d3df 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 9cab54296b62508df7432a49a3bb64d7d88e8062..4f2c0ace70bbdd18f771374149d0926c4a60367a 100644 (file)
@@ -23,6 +23,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 58a54698993f988bacd5cae794743c68d214a7dd..ed0393317c1b03fca37aa2d465e62ded701c0445 100644 (file)
@@ -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);
index b163a587ae132e729148f050931cbb736be9fb97..4140fd6e6a5552b4f31f5f68e1a599bb36e31f81 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 8298e1f682fda1aa32612ea00598a4d211096f63..d3a56933952162c0036c336bdeccc5371c465d59 100644 (file)
@@ -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])
index 1d772d6b4e298bdc1364dc9eb7ba9ee278672db4..d73662434ab0a0f1077c898e3fe0069ee8fc0061 100755 (executable)
@@ -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
 
 
 
-
-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
index e09fee1ac13d81cddb3fb9999039c162da1cf9f7..ed8538eb10894971ea4aab5b596029bb58f2b2cd 100644 (file)
@@ -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])
index e6342ee42c0f7b9e8496b86bfc66231d21d55743..06d7dcb61b238a0b47ea1ccad22c095e3d58ef74 100644 (file)
@@ -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)
     {
index 280234af869ea947f95c5f5e50a28a004ea332df..fc3f62f0bc3c887b9c076fc414bf72fb843dbc27 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (ENDIAN_CFLAGS): Delete.
+       * configure.ac: Delete sim-endian.
+       * configure: Regenerate.
+
 2021-06-17  Mike Frysinger  <vapier@gentoo.org>
 
        * igen.c (gen_semantics_h): Rename PAGE_SIZE to MPC860C0_PAGE_SIZE.
index c1135a3a7b0a822e4423db4d2b6f5eb76dc1ee2d..4446922dede3b2ed4532611818e0a2fb9dc1af6b 100644 (file)
@@ -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) \
index 7927bedd1987a394a88ea6cf200c872dc889ae93..930b24a1b5b831b3e739966ecf058178239ad878 100755 (executable)
@@ -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"
index 5867f60b6281babd3f6f1164bcaf1e9681f65008..9d294ae414aa03ad6da1423303127c8597fec859 100644 (file)
@@ -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)
index 4a91a3369f8986974292b256d7b47a8e330e71c8..81033cf2e0a961d207f165ff642033d541579edb 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 99990798944597db0fd5111dcfb38fffb1d58dbe..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
 
 
 
-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
index 1846b26e14b0ffe6c20382908108903e0b306797..8e9577c9ea2574f0f7fbe31d96bc1002913b149c 100644 (file)
@@ -23,6 +23,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-SIM_AC_OPTION_ENDIAN(LITTLE)
-
 SIM_AC_OUTPUT
index 38269df44ce7818510f7d25a2decbb504deca0ab..09045dc4cb0afb9b9e2ae19727b9a1d29863a597 100644 (file)
@@ -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)
index bbbd8de753e780146dd98d835669f901c9779a42..5c7973f5f95f6caaa99cd9d3934e65a95856c3ca 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 6677e0f80a8780067dc7b3f084469c1330aaddc9..5aa36404058161a9fcef26845108478abf735433 100644 (file)
@@ -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])
index aa123f50c22c88034820946643460b4e375a7f2c..cdbedcceabc3111d02bfa8f618d8723139b3d1ec 100755 (executable)
@@ -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
 
 
 
-
-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
index 421b5ba7ef545485038b945648b5857897044e0b..e866c8f8f4a0de833a9bf830a0b4bd15a83f446a 100644 (file)
@@ -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
index f3754da1ed8a9c4c94a5eb8251275a03a5a0dd55..8b96677634f9e4d83226f7ce8421fa5a5831f42c 100644 (file)
@@ -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)
     {
index 7a1976cea02a205b6b687320dcc41a86ba7678a8..a2e2cfbd51a7153fa0ad14bbbc364fc80b8dc15f 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 571fdbcfc56052aa6c38c1f9f035b3022573907f..2c8a6e0abab41163a65cb93bf185b470996d64a2 100755 (executable)
@@ -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
index 76b61b0e0961a1a087e094192ef5903227b8ae34..0b3cbc6efc712ca1ba6c737b726ad711e6f3b6aa 100644 (file)
@@ -1,3 +1,7 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 1e9f11af6e6dc20ebc39c0b78a5eb4347f85ef5d..7200bcb42c483b770a06ef1e17bb6aed6d389fc2 100755 (executable)
@@ -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
index 9bd6b85ad37cf912a38d80b5297b1f17698382bf..950fe1a3f70e11360eadc3eaf4ffa0b2615f6558 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete SIM_AC_OPTION_ENDIAN call.
+       * aclocal.m4, configure: Regenerate.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 88b04d1652fc4d1a583f5e8c66f98f72e3f752ae..f5eee940afc41de22614fb272620924e576d41a7 100644 (file)
@@ -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])
index 00e0b882ad45f5da4e4d13632cc725e0306a550d..661ad09e3cebb69d01875f35219e6f5fdf77a9c8 100755 (executable)
@@ -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
 
 
 
-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
index dd975d3259e6e89b67ce54ff5e517732aa985a87..9bf4a4099ee5c3338ee46e7f61074920e4c7c00b 100644 (file)
@@ -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
index 304ec6156a354c13ca4977ab29b830f37fa55fd4..2af2fc25dfc80c8400e6c18c0af9aab6c9764755 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-17  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 8121fe66c14a87692e02cb28a896fbd8f47212a9..61a92c9578aa28d09f542807a5cd5fa55288d3e2 100644 (file)
@@ -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])
index 28471bfaf38a1367ff1207c2f11ec968b45bae8a..9f83ff1c2a22e2f6802e104e074a0eacb5d90d0c 100755 (executable)
@@ -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
 
 
 
-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
index 6d586f194fd0a9e5f0c201a6b3d3d2416617f64a..c3cd64627c0afb2d23fb8f324c9ca3fafe6a14e5 100644 (file)
@@ -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)
 
index 79c6e0f7ddcc154e91c2419e8d099bbdc07e48a6..92c80a814c69b7d72e8eb8e0b4929b0ae41705e9 100644 (file)
@@ -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;