From ba307cddcf7e42c5099632dcbad598d8f96044f4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 7 Jun 2021 00:54:20 -0400 Subject: [PATCH] sim: overhaul alignment settings management Currently, the sim-config module will abort if alignment settings haven't been specified by the port's configure.ac. This is a bit weird when we've allowed SIM_AC_OPTION_ALIGNMENT to seem like it's optional to use. Thus everyone invokes it. There are 4 alignment settings, but really only 2 matters: strict and nonstrict. The "mixed" setting is just the default ("unset"), and "forced" isn't used directly by anyone (it's available as a runtime option for some ports). 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, then the build won't work (see above as if SIM_AC_OPTION_ALIGNMENT wasn't called). If default settings are provided, then that is used, but we allow the user to override at runtime. Otherwise, the "wire" settings are used and user runtime options to change are ignored. Most ports specify a default, or set the "wire" to nonstrict. A few set "wire" to strict, but it's not clear that's necessary as it doesn't make the code behavior, by default, any different. It might make things a little faster, but we should provide the user the choice of the compromises to make: force a specific mode at compile time for faster runtime, or allow the choice at runtime. More likely it seems like an oversight when these ports were initially created, and/or copied & pasted from existing ports. With all that backstory, let's get to what this commit does. First kill off the idea of a compile-time default alignment and set it to nonstrict in the common code. For any ports that want strict alignment by default, that code is moved to sim_open while initializing the sim. That means WITH_DEFAULT_ALIGNMENT can be completely removed. Moving the default alignment to the runtime also allows removal of setting the "wire" settings at configure time. Which allows removing of all arguments to SIM_AC_OPTION_ALIGNMENT and moving that call to common code. The macro logic can be reworked to not pass WITH_ALIGNMENT as -D CPPFLAG and instead move it to config.h. All of these taken together mean we can hoist the macro up to the top level and share it among all sims so behavior is consistent among all the ports. --- sim/ChangeLog | 6 +++ sim/Makefile.in | 1 + sim/aarch64/ChangeLog | 5 +++ sim/aarch64/aclocal.m4 | 1 - sim/aarch64/configure | 62 ++----------------------------- sim/aarch64/configure.ac | 5 --- sim/aarch64/interp.c | 5 +++ sim/aclocal.m4 | 1 + sim/arm/ChangeLog | 5 +++ sim/arm/aclocal.m4 | 1 - sim/arm/configure | 58 ++--------------------------- sim/arm/configure.ac | 1 - sim/arm/wrapper.c | 3 ++ sim/avr/ChangeLog | 5 +++ sim/avr/aclocal.m4 | 1 - sim/avr/configure | 58 ++--------------------------- sim/avr/configure.ac | 1 - sim/avr/interp.c | 3 ++ sim/bfin/ChangeLog | 5 +++ sim/bfin/aclocal.m4 | 1 - sim/bfin/configure | 58 ++--------------------------- sim/bfin/configure.ac | 1 - sim/bfin/interp.c | 3 ++ sim/bpf/ChangeLog | 4 ++ sim/bpf/aclocal.m4 | 1 - sim/bpf/configure | 58 ++--------------------------- sim/bpf/configure.ac | 1 - sim/common/ChangeLog | 8 ++++ sim/common/Make-common.in | 2 - sim/common/sim-config.c | 8 +--- sim/common/sim-config.h | 11 +----- sim/config.h.in | 3 ++ sim/configure | 24 ++++++++++++ sim/configure.ac | 1 + sim/cr16/ChangeLog | 4 ++ sim/cr16/aclocal.m4 | 1 - sim/cr16/configure | 58 ++--------------------------- sim/cr16/configure.ac | 1 - sim/cris/ChangeLog | 4 ++ sim/cris/aclocal.m4 | 1 - sim/cris/configure | 58 ++--------------------------- sim/cris/configure.ac | 1 - sim/d10v/ChangeLog | 5 +++ sim/d10v/aclocal.m4 | 1 - sim/d10v/configure | 58 ++--------------------------- sim/d10v/configure.ac | 1 - sim/d10v/interp.c | 3 ++ sim/example-synacor/ChangeLog | 5 +++ sim/example-synacor/aclocal.m4 | 1 - sim/example-synacor/configure | 58 ++--------------------------- sim/example-synacor/configure.ac | 1 - sim/example-synacor/interp.c | 3 ++ sim/frv/ChangeLog | 5 +++ sim/frv/aclocal.m4 | 1 - sim/frv/configure | 58 ++--------------------------- sim/frv/configure.ac | 1 - sim/frv/sim-if.c | 3 ++ sim/ft32/ChangeLog | 5 +++ sim/ft32/aclocal.m4 | 1 - sim/ft32/configure | 58 ++--------------------------- sim/ft32/configure.ac | 1 - sim/ft32/interp.c | 3 ++ sim/h8300/ChangeLog | 4 ++ sim/h8300/aclocal.m4 | 1 - sim/h8300/configure | 58 ++--------------------------- sim/h8300/configure.ac | 1 - sim/iq2000/ChangeLog | 5 +++ sim/iq2000/aclocal.m4 | 1 - sim/iq2000/configure | 58 ++--------------------------- sim/iq2000/configure.ac | 1 - sim/iq2000/sim-if.c | 3 ++ sim/lm32/ChangeLog | 5 +++ sim/lm32/aclocal.m4 | 1 - sim/lm32/configure | 58 ++--------------------------- sim/lm32/configure.ac | 1 - sim/lm32/sim-if.c | 3 ++ sim/m32r/ChangeLog | 5 +++ sim/m32r/aclocal.m4 | 1 - sim/m32r/configure | 58 ++--------------------------- sim/m32r/configure.ac | 1 - sim/m32r/sim-if.c | 3 ++ sim/m4/sim_ac_option_alignment.m4 | 53 +++++--------------------- sim/m68hc11/ChangeLog | 4 ++ sim/m68hc11/aclocal.m4 | 1 - sim/m68hc11/configure | 58 ++--------------------------- sim/m68hc11/configure.ac | 1 - sim/mcore/ChangeLog | 4 ++ sim/mcore/aclocal.m4 | 1 - sim/mcore/configure | 58 ++--------------------------- sim/mcore/configure.ac | 1 - sim/microblaze/ChangeLog | 4 ++ sim/microblaze/aclocal.m4 | 1 - sim/microblaze/configure | 58 ++--------------------------- sim/microblaze/configure.ac | 1 - sim/mips/ChangeLog | 4 ++ sim/mips/aclocal.m4 | 1 - sim/mips/configure | 58 ++--------------------------- sim/mips/configure.ac | 1 - sim/mn10300/ChangeLog | 4 ++ sim/mn10300/aclocal.m4 | 1 - sim/mn10300/configure | 58 ++--------------------------- sim/mn10300/configure.ac | 1 - sim/moxie/ChangeLog | 4 ++ sim/moxie/aclocal.m4 | 1 - sim/moxie/configure | 58 ++--------------------------- sim/moxie/configure.ac | 1 - sim/msp430/ChangeLog | 4 ++ sim/msp430/aclocal.m4 | 1 - sim/msp430/configure | 58 ++--------------------------- sim/msp430/configure.ac | 1 - sim/or1k/ChangeLog | 4 ++ sim/or1k/aclocal.m4 | 1 - sim/or1k/configure | 58 ++--------------------------- sim/or1k/configure.ac | 1 - sim/ppc/ChangeLog | 6 +++ sim/ppc/Makefile.in | 2 - sim/ppc/configure | 20 ---------- sim/ppc/configure.ac | 14 ------- sim/pru/ChangeLog | 5 +++ sim/pru/aclocal.m4 | 1 - sim/pru/configure | 58 ++--------------------------- sim/pru/configure.ac | 1 - sim/pru/interp.c | 3 ++ sim/riscv/ChangeLog | 4 ++ sim/riscv/aclocal.m4 | 1 - sim/riscv/configure | 58 ++--------------------------- sim/riscv/configure.ac | 1 - sim/sh/ChangeLog | 5 +++ sim/sh/aclocal.m4 | 1 - sim/sh/configure | 58 ++--------------------------- sim/sh/configure.ac | 1 - sim/sh/interp.c | 3 ++ sim/v850/ChangeLog | 4 ++ sim/v850/aclocal.m4 | 1 - sim/v850/configure | 58 ++--------------------------- sim/v850/configure.ac | 1 - 136 files changed, 334 insertions(+), 1616 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index b8a2e6c1420..54f2216c42d 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,9 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Call SIM_AC_OPTION_ALIGNMENT. + * m4/sim_ac_option_alignment.m4: Delete wire and default alignment. + * aclocal.m4, config.h.in, configure, Makefile.in: Regenerate. + 2021-06-12 Mike Frysinger * configure.ac: Define PKGVERSION & REPORT_BUGS_TO. diff --git a/sim/Makefile.in b/sim/Makefile.in index 891253a5555..290268cfba2 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -198,6 +198,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/override.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_environment.m4 \ diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index 28d73faa0d4..939ea29d1ff 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/aarch64/aclocal.m4 b/sim/aarch64/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/aarch64/aclocal.m4 +++ b/sim/aarch64/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/aarch64/configure b/sim/aarch64/configure index 10454958d10..5408aad16f2 100755 --- a/sim/aarch64/configure +++ b/sim/aarch64/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,56 +11192,6 @@ else fi fi -## We use NONSTRICT_ALIGNMENT as the default because AArch64 only -## enforces 4-byte alignment, even for 8-byte reads/writes. The -## common core does not support this, so we opt for non-strict -## alignment instead. -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="NONSTRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/aarch64/configure.ac b/sim/aarch64/configure.ac index 1c212dc2c95..381682fb5f0 100644 --- a/sim/aarch64/configure.ac +++ b/sim/aarch64/configure.ac @@ -25,11 +25,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -## We use NONSTRICT_ALIGNMENT as the default because AArch64 only -## enforces 4-byte alignment, even for 8-byte reads/writes. The -## common core does not support this, so we opt for non-strict -## alignment instead. -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT,NONSTRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c index fd35f4fa683..18c2fc0eacb 100644 --- a/sim/aarch64/interp.c +++ b/sim/aarch64/interp.c @@ -330,6 +330,11 @@ sim_open (SIM_OPEN_KIND kind, SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* We use NONSTRICT_ALIGNMENT as the default because AArch64 only enforces + 4-byte alignment, even for 8-byte reads/writes. The common core does not + support this, so we opt for non-strict alignment instead. */ + current_alignment = NONSTRICT_ALIGNMENT; + /* Perform the initialization steps one by one. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK || sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK diff --git a/sim/aclocal.m4 b/sim/aclocal.m4 index 1dde78fcde5..f21cf0813e3 100644 --- a/sim/aclocal.m4 +++ b/sim/aclocal.m4 @@ -1171,6 +1171,7 @@ m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/lead-dot.m4]) 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_environment.m4]) diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 83e174af847..4d3632e7426 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * wrapper.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/arm/aclocal.m4 b/sim/arm/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/arm/aclocal.m4 +++ b/sim/arm/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/arm/configure b/sim/arm/configure index f85ae472329..5408aad16f2 100755 --- a/sim/arm/configure +++ b/sim/arm/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/arm/configure.ac b/sim/arm/configure.ac index 88fac82e7b4..7638b6d8e11 100644 --- a/sim/arm/configure.ac +++ b/sim/arm/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index a1147e402cc..e697d55a6b5 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -801,6 +801,9 @@ sim_open (SIM_OPEN_KIND kind, SIM_DESC sd = sim_state_alloc (kind, cb); SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index a5033fc1be3..1a18e995478 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/avr/aclocal.m4 b/sim/avr/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/avr/aclocal.m4 +++ b/sim/avr/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/avr/configure b/sim/avr/configure index c7dbbaae5ad..32b83276196 100755 --- a/sim/avr/configure +++ b/sim/avr/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/avr/configure.ac b/sim/avr/configure.ac index 92046a1762d..9d6e1e6ded7 100644 --- a/sim/avr/configure.ac +++ b/sim/avr/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/avr/interp.c b/sim/avr/interp.c index d456c39390a..1626fadaa97 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1684,6 +1684,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, SIM_DESC sd = sim_state_alloc_extra (kind, cb, sizeof (struct avr_sim_state)); SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 224ec728d78..52ba04fc651 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/bfin/aclocal.m4 b/sim/bfin/aclocal.m4 index bf8ea926588..529d860d872 100644 --- a/sim/bfin/aclocal.m4 +++ b/sim/bfin/aclocal.m4 @@ -111,7 +111,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_alignment.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]) diff --git a/sim/bfin/configure b/sim/bfin/configure index c115c2ec3cd..26366a4179d 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -635,6 +635,7 @@ sim_reserved_bits sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks SDL_LIBS SDL_CFLAGS @@ -758,8 +759,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -774,7 +774,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_default_model enable_werror enable_build_warnings @@ -1425,9 +1424,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-default-model=model Specify default model to simulate --enable-werror treat compile warnings as errors @@ -10768,7 +10764,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10771 "configure" +#line 10767 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10874,7 +10870,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10877 "configure" +#line 10873 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11216,52 +11212,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_default_model="bf537" # Check whether --enable-sim-default-model was given. diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index 18e82fae66b..e2d53bcc7ca 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_DEFAULT_MODEL(bf537) SIM_AC_OPTION_WARNINGS SIM_AC_OPTION_HARDWARE(\ diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 34357201934..2e9696f8bfe 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -720,6 +720,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, SIM_DESC sd = sim_state_alloc_extra (kind, callback, sizeof (struct bfin_board_data)); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog index f6d65305e0d..fdbd0ee2d3b 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/bpf/aclocal.m4 b/sim/bpf/aclocal.m4 index be3ce4306dd..8298e1f682f 100644 --- a/sim/bpf/aclocal.m4 +++ b/sim/bpf/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/bpf/configure b/sim/bpf/configure index 0c69d9031fd..55da6166cb8 100755 --- a/sim/bpf/configure +++ b/sim/bpf/configure @@ -633,6 +633,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_reserved_bits sim_float +sim_alignment cgen_breaks cgen cgendir @@ -756,8 +757,7 @@ sim_hw_objs sim_hw_cflags sim_endian sim_default_model -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -773,7 +773,6 @@ enable_maintainer_mode enable_sim_inline enable_sim_bitsize enable_sim_endian -enable_sim_alignment enable_sim_scache enable_sim_default_model enable_werror @@ -1422,9 +1421,6 @@ Optional Features: --enable-sim-bitsize=N Specify target bitsize (32 or 64) --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10761,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 10764 "configure" +#line 10760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10867,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 10870 "configure" +#line 10866 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11268,52 +11264,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac index a0f8576fc39..4e00c131609 100644 --- a/sim/bpf/configure.ac +++ b/sim/bpf/configure.ac @@ -6,7 +6,6 @@ SIM_AC_COMMON SIM_AC_OPTION_BITSIZE([64]) SIM_AC_OPTION_ENDIAN([], [LITTLE]) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL([bpf-def]) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 25cf3392329..ff0f4e22323 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,11 @@ +2021-06-12 Mike Frysinger + + * Make-common.in: Delete SIM_ALIGNMENT. + * sim-config.c (sim_config): Change WITH_DEFAULT_ALIGNMENT to + NONSTRICT_ALIGNMENT. + (sim_config_print): Delete WITH_DEFAULT_ALIGNMENT logic. + * sim-config.h (WITH_DEFAULT_ALIGNMENT): Delete. + 2021-06-12 Mike Frysinger * defs.h: Include ../config.h. Undefine PACKAGE* defines. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index f32026e179d..999b1eea00a 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -82,7 +82,6 @@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ -SIM_ALIGNMENT = @sim_alignment@ SIM_BITSIZE = @sim_bitsize@ SIM_DEFAULT_MODEL = @sim_default_model@ SIM_ENDIAN = @sim_endian@ @@ -222,7 +221,6 @@ CGEN_INCLUDE_DEPS = \ CONFIG_CFLAGS = \ @DEFS@ \ $(SIM_DEFAULT_MODEL) \ - $(SIM_ALIGNMENT) \ $(SIM_BITSIZE) \ $(SIM_ENDIAN) \ $(SIM_FLOAT) \ diff --git a/sim/common/sim-config.c b/sim/common/sim-config.c index df99d6a957f..c9005f449fe 100644 --- a/sim/common/sim-config.c +++ b/sim/common/sim-config.c @@ -253,8 +253,9 @@ sim_config (SIM_DESC sd) #endif if (current_alignment == 0) current_alignment = WITH_ALIGNMENT; + /* If the port hasn't specified an alignment, default to not enforcing. */ if (current_alignment == 0) - current_alignment = WITH_DEFAULT_ALIGNMENT; + current_alignment = NONSTRICT_ALIGNMENT; /* verify the alignment */ if (CURRENT_ALIGNMENT == 0) @@ -331,11 +332,6 @@ sim_config_print (SIM_DESC sd) sim_io_printf (sd, "WITH_ALIGNMENT = %s\n", config_alignment_to_a (WITH_ALIGNMENT)); -#if defined (WITH_DEFAULT_ALIGNMENT) - sim_io_printf (sd, "WITH_DEFAULT_ALIGNMENT = %s\n", - config_alignment_to_a (WITH_DEFAULT_ALIGNMENT)); -#endif - #if defined (WITH_XOR_ENDIAN) sim_io_printf (sd, "WITH_XOR_ENDIAN = %d\n", WITH_XOR_ENDIAN); #endif diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h index 6ab8d1a97ec..2b6ed3d0b7d 100644 --- a/sim/common/sim-config.h +++ b/sim/common/sim-config.h @@ -195,11 +195,11 @@ extern char *simulator_sysroot; /* Alignment: - A processor architecture may or may not handle miss aligned + A processor architecture may or may not handle misaligned transfers. As alternatives: both little and big endian modes take an exception - (STRICT_ALIGNMENT); big and little endian models handle mis aligned + (STRICT_ALIGNMENT); big and little endian models handle misaligned transfers (NONSTRICT_ALIGNMENT); or the address is forced into alignment using a mask (FORCED_ALIGNMENT). @@ -220,13 +220,6 @@ extern enum sim_alignments current_alignment; #define WITH_ALIGNMENT 0 #endif -#if !defined (WITH_DEFAULT_ALIGNMENT) -#define WITH_DEFAULT_ALIGNMENT 0 /* fatal */ -#endif - - - - #define CURRENT_ALIGNMENT (WITH_ALIGNMENT \ ? WITH_ALIGNMENT \ : current_alignment) diff --git a/sim/config.h.in b/sim/config.h.in index 65f9da0194f..a1d4f782431 100644 --- a/sim/config.h.in +++ b/sim/config.h.in @@ -437,6 +437,9 @@ /* Version number of package */ #undef VERSION +/* Sim alignment settings */ +#undef WITH_ALIGNMENT + /* Sim assert settings */ #undef WITH_ASSERT diff --git a/sim/configure b/sim/configure index 2a9a9b62511..bb3c54cae3d 100755 --- a/sim/configure +++ b/sim/configure @@ -755,6 +755,7 @@ enable_silent_rules enable_sim enable_example_sims enable_targets +enable_sim_alignment enable_sim_assert enable_sim_debug enable_sim_environment @@ -1433,6 +1434,9 @@ Optional Features: --enable-sim Enable the GNU simulator --enable-example-sims enable example GNU simulators --enable-targets alternative target configurations + --enable-sim-alignment=align + Specify strict, nonstrict or forced alignment of + memory accesses --enable-sim-assert Specify whether to perform random assertions --enable-sim-debug=opts Enable debugging flags (for developers of the sim itself) @@ -6645,6 +6649,26 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to force sim alignment" >&5 +$as_echo_n "checking whether to force sim alignment... " >&6; } +sim_alignment= +# Check whether --enable-sim-alignment was given. +if test "${enable_sim_alignment+set}" = set; then : + enableval=$enable_sim_alignment; case "${enableval}" in + yes | strict | STRICT) sim_alignment="STRICT_ALIGNMENT";; + no | nonstrict | NONSTRICT) sim_alignment="NONSTRICT_ALIGNMENT";; + forced | FORCED) sim_alignment="FORCED_ALIGNMENT";; + *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5;; +esac +fi + +cat >>confdefs.h <<_ACEOF +#define WITH_ALIGNMENT ${sim_alignment:-0} +_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 whether to enable sim asserts" >&5 $as_echo_n "checking whether to enable sim asserts... " >&6; } diff --git a/sim/configure.ac b/sim/configure.ac index 8022a11bc91..e7f3f535ef5 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -108,6 +108,7 @@ AM_CONDITIONAL([SIM_ENABLE_IGEN], [test "$sim_igen" = "yes"]) dnl Standard (and optional) simulator options. dnl Eventually all simulators will support these. +SIM_AC_OPTION_ALIGNMENT SIM_AC_OPTION_ASSERT SIM_AC_OPTION_DEBUG SIM_AC_OPTION_ENVIRONMENT diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 52a2cca4db5..6e5470f996f 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/cr16/aclocal.m4 b/sim/cr16/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/cr16/aclocal.m4 +++ b/sim/cr16/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/cr16/configure b/sim/cr16/configure index a5721fa6f00..7cdfa3edcac 100755 --- a/sim/cr16/configure +++ b/sim/cr16/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac index f4dc9c1314d..8cd4d23a479 100644 --- a/sim/cr16/configure.ac +++ b/sim/cr16/configure.ac @@ -5,6 +5,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 15d2baa642b..bde34bb9303 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/cris/aclocal.m4 b/sim/cris/aclocal.m4 index 948b36884ed..4fb0bd753f4 100644 --- a/sim/cris/aclocal.m4 +++ b/sim/cris/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/cris/configure b/sim/cris/configure index c65a228786c..d830d68ffd1 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize +sim_alignment cgen_breaks cgen cgendir @@ -756,8 +757,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -772,7 +772,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_scache enable_werror enable_build_warnings @@ -1420,9 +1419,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-werror treat compile warnings as errors @@ -10759,7 +10755,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10762 "configure" +#line 10758 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10865,7 +10861,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10868 "configure" +#line 10864 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11207,52 +11203,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index b5eaea7b8ad..cc5bb4922f1 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_WARNINGS(no) SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx) diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index aef1a22325f..2254eae0028 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/d10v/aclocal.m4 b/sim/d10v/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/d10v/aclocal.m4 +++ b/sim/d10v/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/d10v/configure b/sim/d10v/configure index 4e99517c5be..017c6c0068f 100755 --- a/sim/d10v/configure +++ b/sim/d10v/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/d10v/configure.ac b/sim/d10v/configure.ac index 81145209455..ec8a87e7d39 100644 --- a/sim/d10v/configure.ac +++ b/sim/d10v/configure.ac @@ -5,6 +5,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index b587cc18654..c0cdc034700 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -755,6 +755,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_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/example-synacor/ChangeLog b/sim/example-synacor/ChangeLog index 9ffd18128f2..88008b1a95b 100644 --- a/sim/example-synacor/ChangeLog +++ b/sim/example-synacor/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/example-synacor/aclocal.m4 b/sim/example-synacor/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/example-synacor/aclocal.m4 +++ b/sim/example-synacor/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/example-synacor/configure b/sim/example-synacor/configure index 55cf6655acc..7cdfa3edcac 100755 --- a/sim/example-synacor/configure +++ b/sim/example-synacor/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/example-synacor/configure.ac b/sim/example-synacor/configure.ac index 13b311197e3..8cd4d23a479 100644 --- a/sim/example-synacor/configure.ac +++ b/sim/example-synacor/configure.ac @@ -5,6 +5,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/example-synacor/interp.c b/sim/example-synacor/interp.c index eaf8f1fdf97..784c9cbc575 100644 --- a/sim/example-synacor/interp.c +++ b/sim/example-synacor/interp.c @@ -82,6 +82,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, int i; SIM_DESC sd = sim_state_alloc (kind, callback); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 6fc7d02690e..c231ad1ed68 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * sim-if.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/frv/aclocal.m4 b/sim/frv/aclocal.m4 index 948b36884ed..4fb0bd753f4 100644 --- a/sim/frv/aclocal.m4 +++ b/sim/frv/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/frv/configure b/sim/frv/configure index bc3aa9cbeb5..346e0bdfb1b 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize +sim_alignment cgen_breaks sim_trapdump cgen @@ -757,8 +758,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -773,7 +773,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_scache enable_sim_default_model enable_werror @@ -1422,9 +1421,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10762,7 +10758,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 10761 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10868,7 +10864,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 10867 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11210,52 +11206,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index e5bbdbfba22..fcc2e8836bb 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(fr500) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 8ac9665f4cf..0ad5f626e45 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -54,6 +54,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd, unsigned long elf_flags = 0; SIM_DESC sd = sim_state_alloc (kind, callback); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 1b29987d2ef..57889b6b98f 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/ft32/aclocal.m4 b/sim/ft32/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/ft32/aclocal.m4 +++ b/sim/ft32/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/ft32/configure b/sim/ft32/configure index b56ec1a4e6e..32b83276196 100755 --- a/sim/ft32/configure +++ b/sim/ft32/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/ft32/configure.ac b/sim/ft32/configure.ac index 658a0a459d0..9d6e1e6ded7 100644 --- a/sim/ft32/configure.ac +++ b/sim/ft32/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index 5fc9ea24658..8a44a472f60 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -808,6 +808,9 @@ sim_open (SIM_OPEN_KIND kind, size_t i; SIM_DESC sd = sim_state_alloc (kind, cb); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index ec06f33335b..d4e7cd09637 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/h8300/aclocal.m4 b/sim/h8300/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/h8300/aclocal.m4 +++ b/sim/h8300/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/h8300/configure b/sim/h8300/configure index d5e2c9c1a43..590f5e7154a 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 43250f81741..7e2a166307e 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -5,6 +5,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index bd72159b4a8..a19e06d9e80 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * sim-if.c (sim_open): + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/iq2000/aclocal.m4 b/sim/iq2000/aclocal.m4 index 948b36884ed..4fb0bd753f4 100644 --- a/sim/iq2000/aclocal.m4 +++ b/sim/iq2000/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/iq2000/configure b/sim/iq2000/configure index 5a3b811f1d2..88eb6f6a85e 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize +sim_alignment cgen_breaks cgen cgendir @@ -756,8 +757,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -772,7 +772,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_scache enable_sim_default_model enable_werror @@ -1420,9 +1419,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10759,7 +10755,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10762 "configure" +#line 10758 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10865,7 +10861,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10868 "configure" +#line 10864 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11207,52 +11203,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index 623fa192d74..c61c9480d5e 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(iq2000) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index 679d5164033..82ac53f2d0b 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -60,6 +60,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, int i; SIM_DESC sd = sim_state_alloc (kind, callback); + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index b511c3f4336..3223d90b097 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * sim-if.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/lm32/aclocal.m4 b/sim/lm32/aclocal.m4 index 948b36884ed..4fb0bd753f4 100644 --- a/sim/lm32/aclocal.m4 +++ b/sim/lm32/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/lm32/configure b/sim/lm32/configure index 9b732c9fd65..679488d42f0 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize +sim_alignment cgen_breaks cgen cgendir @@ -756,8 +757,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -772,7 +772,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_scache enable_sim_default_model enable_werror @@ -1420,9 +1419,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10759,7 +10755,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10762 "configure" +#line 10758 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10865,7 +10861,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10868 "configure" +#line 10864 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11207,52 +11203,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index 63548874a11..4a2037468de 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(lm32) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index 3d4ee35d746..fba2d638f42 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -91,6 +91,9 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, int i; unsigned long base, limit; + /* Set default options before parsing user options. */ + current_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 4d0e94741e9..69795b334f6 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * sim-if.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/m32r/aclocal.m4 b/sim/m32r/aclocal.m4 index 948b36884ed..4fb0bd753f4 100644 --- a/sim/m32r/aclocal.m4 +++ b/sim/m32r/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/m32r/configure b/sim/m32r/configure index 3dc94f6d72b..d045b29cbee 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_float sim_bitsize +sim_alignment cgen_breaks sim_extra_cflags traps_obj @@ -758,8 +759,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_default_model -sim_alignment' +sim_default_model' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -774,7 +774,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_scache enable_sim_default_model enable_werror @@ -1422,9 +1421,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-scache=size Specify simulator execution cache size --enable-sim-default-model=model @@ -10761,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 10764 "configure" +#line 10760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10867,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 10870 "configure" +#line 10866 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11209,52 +11205,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_scache="16384" # Check whether --enable-sim-scache was given. diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index 8ab55bc155a..a5cea83849e 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL(m32r/d) SIM_AC_OPTION_WARNINGS(no) diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index e08a5d461af..bea6505d740 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -54,6 +54,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_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/m4/sim_ac_option_alignment.m4 b/sim/m4/sim_ac_option_alignment.m4 index dcfa47984a6..409fbfc1a43 100644 --- a/sim/m4/sim_ac_option_alignment.m4 +++ b/sim/m4/sim_ac_option_alignment.m4 @@ -15,52 +15,19 @@ dnl along with this program. If not, see . dnl dnl Specify the alignment restrictions of the target architecture. dnl Without this option all possible alignment restrictions are accommodated. -dnl arg[1] is hardwired target alignment -dnl arg[2] is default target alignment AC_DEFUN([SIM_AC_OPTION_ALIGNMENT], -wire_alignment="[$1]" -default_alignment="[$2]" -[ +[dnl +AC_MSG_CHECKING([whether to force sim alignment]) +sim_alignment= AC_ARG_ENABLE(sim-alignment, [AS_HELP_STRING([--enable-sim-alignment=align], [Specify strict, nonstrict or forced alignment of memory accesses])], [case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi], -[if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi])dnl + yes | strict | STRICT) sim_alignment="STRICT_ALIGNMENT";; + no | nonstrict | NONSTRICT) sim_alignment="NONSTRICT_ALIGNMENT";; + forced | FORCED) sim_alignment="FORCED_ALIGNMENT";; + *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment");; +esac])dnl +AC_DEFINE_UNQUOTED([WITH_ALIGNMENT], [${sim_alignment:-0}], [Sim alignment settings]) +AC_MSG_RESULT([${sim_alignment:-no}]) ])dnl -AC_SUBST(sim_alignment) diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 9aba1c00a24..65c1d215184 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/m68hc11/aclocal.m4 b/sim/m68hc11/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/m68hc11/aclocal.m4 +++ b/sim/m68hc11/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 999dc489dcf..0236296afd3 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_hardware enable_werror enable_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-hardware=LIST Specify the hardware to be included in the build. --enable-werror treat compile warnings as errors @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - hardware="cfi core pal glue \ m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram" diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac index 57e13e207bd..b2685040f61 100644 --- a/sim/m68hc11/configure.ac +++ b/sim/m68hc11/configure.ac @@ -6,7 +6,6 @@ SIM_AC_COMMON dnl Options available in this module SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HARDWARE(\ m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram) diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 42409236ca4..8864c7a7ab9 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/mcore/aclocal.m4 b/sim/mcore/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/mcore/aclocal.m4 +++ b/sim/mcore/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/mcore/configure b/sim/mcore/configure index 4e99517c5be..017c6c0068f 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/mcore/configure.ac b/sim/mcore/configure.ac index 81145209455..ec8a87e7d39 100644 --- a/sim/mcore/configure.ac +++ b/sim/mcore/configure.ac @@ -5,6 +5,5 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index f3bf6efa1ce..9ec4802ba31 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/microblaze/aclocal.m4 b/sim/microblaze/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/microblaze/aclocal.m4 +++ b/sim/microblaze/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/microblaze/configure b/sim/microblaze/configure index f85ae472329..5408aad16f2 100755 --- a/sim/microblaze/configure +++ b/sim/microblaze/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/microblaze/configure.ac b/sim/microblaze/configure.ac index 88fac82e7b4..7638b6d8e11 100644 --- a/sim/microblaze/configure.ac +++ b/sim/microblaze/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 7883bfa8cdc..60c5e7a11eb 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/mips/aclocal.m4 b/sim/mips/aclocal.m4 index 203d14cc8d2..b61eb2e31dd 100644 --- a/sim/mips/aclocal.m4 +++ b/sim/mips/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/mips/configure b/sim/mips/configure index 42ee0f807db..55ce9af3c4c 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -633,6 +633,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_default_model sim_scache +sim_alignment cgen_breaks XMKMF sim_multi_obj @@ -764,8 +765,7 @@ sim_hw_objs sim_hw_cflags sim_float sim_endian -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -779,7 +779,6 @@ with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_sim_inline -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1432,9 +1431,6 @@ Optional Features: sometimes confusing) to the casual installer --enable-sim-inline=inlines Specify which functions should be inlined - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10776,7 +10772,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10779 "configure" +#line 10775 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10882,7 +10878,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10885 "configure" +#line 10881 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11179,52 +11175,6 @@ fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index f4e67376c12..f0b26b4f0ac 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON dnl Options available in this module -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS(no) SIM_AC_OPTION_RESERVED_BITS(1) diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 9aec01e8d61..9a2c1d1929c 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/mn10300/aclocal.m4 b/sim/mn10300/aclocal.m4 index 9c220ef49f0..8121fe66c14 100644 --- a/sim/mn10300/aclocal.m4 +++ b/sim/mn10300/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 0ac10baeb37..c698a6d3af6 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -634,6 +634,7 @@ LIBOBJS sim_default_model sim_scache sim_float +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1416,9 +1415,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10754,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 10757 "configure" +#line 10753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10860,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 10863 "configure" +#line 10859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11202,52 +11198,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index 55aec73be50..b09159d7d47 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS(no) SIM_AC_OPTION_RESERVED_BITS SIM_AC_OPTION_BITSIZE(32,31) diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 96c040beb97..6126b42ca00 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/moxie/aclocal.m4 b/sim/moxie/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/moxie/aclocal.m4 +++ b/sim/moxie/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/moxie/configure b/sim/moxie/configure index c24729b3826..aa8c895efe8 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks DTC MAINT @@ -754,8 +755,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -770,7 +770,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1415,9 +1414,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10749,7 +10745,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10752 "configure" +#line 10748 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10855,7 +10851,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10858 "configure" +#line 10854 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11290,52 +11286,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac index fb5a91eacf8..75a6f37ed26 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -7,6 +7,5 @@ SIM_AC_COMMON AC_CHECK_TOOL(DTC, dtc) SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OUTPUT diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 5653de65425..24298e65861 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/msp430/aclocal.m4 b/sim/msp430/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/msp430/aclocal.m4 +++ b/sim/msp430/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/msp430/configure b/sim/msp430/configure index c7dbbaae5ad..32b83276196 100755 --- a/sim/msp430/configure +++ b/sim/msp430/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/msp430/configure.ac b/sim/msp430/configure.ac index 0277d7f497e..19839d11822 100644 --- a/sim/msp430/configure.ac +++ b/sim/msp430/configure.ac @@ -24,7 +24,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index bf7296b8026..2cba0f56e57 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/or1k/aclocal.m4 b/sim/or1k/aclocal.m4 index be3ce4306dd..8298e1f682f 100644 --- a/sim/or1k/aclocal.m4 +++ b/sim/or1k/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/or1k/configure b/sim/or1k/configure index 5c1c37843e5..362961efcee 100755 --- a/sim/or1k/configure +++ b/sim/or1k/configure @@ -633,6 +633,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS sim_reserved_bits sim_float +sim_alignment cgen_breaks cgen cgendir @@ -756,8 +757,7 @@ sim_hw_objs sim_hw_cflags sim_endian sim_default_model -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -772,7 +772,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_bitsize enable_sim_scache enable_sim_default_model @@ -1421,9 +1420,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-bitsize=N Specify target bitsize (32 or 64) --enable-sim-scache=size Specify simulator execution cache size @@ -10761,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 10764 "configure" +#line 10760 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10867,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 10870 "configure" +#line 10866 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11209,52 +11205,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - wire_word_bitsize="32" wire_word_msb="31" wire_address_bitsize="32" diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac index 32fb0d49b95..e09fee1ac13 100644 --- a/sim/or1k/configure.ac +++ b/sim/or1k/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(BIG) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_BITSIZE([32], [31], [32]) SIM_AC_OPTION_SCACHE(16384) SIM_AC_OPTION_DEFAULT_MODEL([or1200]) diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 3926430d403..49b3e66f09a 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,9 @@ +2021-06-12 Mike Frysinger + + * Makefile.in: Delete ALIGNMENT_CFLAGS. + * configure.ac: Delete sim-alignment. + * configure: Regenerate. + 2021-06-12 Mike Frysinger * configure.ac: Delete calls to ACX_PKGVERSION & ACX_BUGURL. diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 1996e13279c..5d0dd745a30 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -79,7 +79,6 @@ XOR_ENDIAN_CFLAGS = @sim_xor_endian@ BITSIZE_CFLAGS = @sim_bitsize@ HOSTBITSIZE_CFLAGS = @sim_hostbitsize@ TIMEBASE_CFLAGS = @sim_timebase@ -ALIGNMENT_CFLAGS = @sim_alignment@ FLOAT_CFLAGS = @sim_float@ RESERVED_CFLAGS = @sim_reserved@ MONITOR_CFLAGS = @sim_monitor@ @@ -95,7 +94,6 @@ CONFIG_CFLAGS = \ $(BITSIZE_CFLAGS) \ $(HOSTBITSIZE_CFLAGS) \ $(TIMEBASE_CFLAGS) \ - $(ALIGNMENT_CFLAGS) \ $(FLOAT_CFLAGS) \ $(RESERVED_CFLAGS) \ $(MONITOR_CFLAGS) \ diff --git a/sim/ppc/configure b/sim/ppc/configure index 5f0f7790a36..c7dd1b4876c 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -633,7 +633,6 @@ sim_model sim_monitor sim_reserved sim_float -sim_alignment sim_timebase sim_hostbitsize sim_bitsize @@ -742,7 +741,6 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_sim_alignment enable_sim_assert enable_sim_bitsize enable_sim_config @@ -1400,7 +1398,6 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-sim-alignment=align Specify strict or nonstrict alignment. --enable-sim-assert Specify whether to perform random assertions. --enable-sim-bitsize=n Specify target bitsize (32 or 64). --enable-sim-config=file Override default config file @@ -3120,22 +3117,6 @@ $as_echo "$LINGUAS" >&6; } fi -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - sim_alignment="" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable sim asserts" >&5 $as_echo_n "checking whether to enable sim asserts... " >&6; } sim_assert="1" @@ -5177,7 +5158,6 @@ fi - ac_config_files="$ac_config_files Makefile" diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 56973455e0b..3b93beefbfe 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -19,19 +19,6 @@ ALL_LINGUAS= ZW_GNU_GETTEXT_SISTER_DIR(../../intl) -AC_ARG_ENABLE(sim-alignment, -[ --enable-sim-alignment=align Specify strict or nonstrict alignment.], -[case "${enableval}" in - yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi],[sim_alignment=""])dnl - - AC_MSG_CHECKING([whether to enable sim asserts]) sim_assert="1" AC_ARG_ENABLE(sim-assert, @@ -818,7 +805,6 @@ AC_SUBST(sim_igen_smp) AC_SUBST(sim_bitsize) AC_SUBST(sim_hostbitsize) AC_SUBST(sim_timebase) -AC_SUBST(sim_alignment) AC_SUBST(sim_float) AC_SUBST(sim_reserved) AC_SUBST(sim_monitor) diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 260007dbec0..bb7ff9fb035 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/pru/aclocal.m4 b/sim/pru/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/pru/aclocal.m4 +++ b/sim/pru/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/pru/configure b/sim/pru/configure index c7dbbaae5ad..32b83276196 100755 --- a/sim/pru/configure +++ b/sim/pru/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/pru/configure.ac b/sim/pru/configure.ac index a4db77beec2..79dab8b2403 100644 --- a/sim/pru/configure.ac +++ b/sim/pru/configure.ac @@ -24,7 +24,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS SIM_AC_OUTPUT diff --git a/sim/pru/interp.c b/sim/pru/interp.c index 58ac333c1e6..38269df44ce 100644 --- a/sim/pru/interp.c +++ b/sim/pru/interp.c @@ -745,6 +745,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_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog index 0427805f13b..04cc234f1b3 100644 --- a/sim/riscv/ChangeLog +++ b/sim/riscv/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/riscv/aclocal.m4 b/sim/riscv/aclocal.m4 index 2995da2f4cc..6677e0f80a8 100644 --- a/sim/riscv/aclocal.m4 +++ b/sim/riscv/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/riscv/configure b/sim/riscv/configure index dc3611eb455..36a39e6c375 100755 --- a/sim/riscv/configure +++ b/sim/riscv/configure @@ -634,6 +634,7 @@ LIBOBJS sim_reserved_bits sim_scache sim_float +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_hw_objs sim_hw_cflags sim_endian sim_default_model -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1416,9 +1415,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10753,7 +10749,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 10752 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10859,7 +10855,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 10858 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11201,52 +11197,6 @@ else fi fi -wire_alignment="NONSTRICT_ALIGNMENT" -default_alignment="" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac index e5a07bbc46b..3d678acb47b 100644 --- a/sim/riscv/configure.ac +++ b/sim/riscv/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS # Select the default model for the target. diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index fad906fb58d..c44dbab7276 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + * interp.c (sim_open): Set current_alignment. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/sh/aclocal.m4 b/sim/sh/aclocal.m4 index 6591f2c4d80..88b04d1652f 100644 --- a/sim/sh/aclocal.m4 +++ b/sim/sh/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/sh/configure b/sim/sh/configure index f66af79cfa5..4d3f8cec90a 100755 --- a/sim/sh/configure +++ b/sim/sh/configure @@ -636,6 +636,7 @@ sim_default_model sim_scache sim_float sim_bitsize +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_inline sim_hw sim_hw_objs sim_hw_cflags -sim_endian -sim_alignment' +sim_endian' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_werror enable_build_warnings enable_sim_build_warnings @@ -1414,9 +1413,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-werror treat compile warnings as errors --enable-build-warnings enable build-time compiler warnings if gcc is used --enable-sim-build-warnings @@ -10748,7 +10744,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 10747 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10854,7 +10850,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 10853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11196,52 +11192,6 @@ else fi fi -wire_alignment="STRICT_ALIGNMENT" -default_alignment="STRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/sim/sh/configure.ac b/sim/sh/configure.ac index 4417ba4e561..dd975d3259e 100644 --- a/sim/sh/configure.ac +++ b/sim/sh/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN -SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_WARNINGS(no) SIM_AC_OUTPUT diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 87fb863887f..264e9b1de46 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2358,6 +2358,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_alignment = STRICT_ALIGNMENT; + /* The cpu data is kept in a separately allocated chunk of memory. */ if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK) { diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 9526fca6a96..0536ccb2e52 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2021-06-12 Mike Frysinger + + * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT. + 2021-06-12 Mike Frysinger * aclocal.m4, config.in, configure: Regenerate. diff --git a/sim/v850/aclocal.m4 b/sim/v850/aclocal.m4 index 9c220ef49f0..8121fe66c14 100644 --- a/sim/v850/aclocal.m4 +++ b/sim/v850/aclocal.m4 @@ -110,7 +110,6 @@ m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) m4_include([../m4/sim_ac_common.m4]) -m4_include([../m4/sim_ac_option_alignment.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]) diff --git a/sim/v850/configure b/sim/v850/configure index 5b27076a307..9e1dfa5f4dd 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -634,6 +634,7 @@ LIBOBJS sim_default_model sim_scache sim_float +sim_alignment cgen_breaks MAINT MAINTAINER_MODE_FALSE @@ -753,8 +754,7 @@ sim_hw sim_hw_objs sim_hw_cflags sim_endian -sim_bitsize -sim_alignment' +sim_bitsize' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -769,7 +769,6 @@ enable_libtool_lock enable_maintainer_mode enable_sim_inline enable_sim_endian -enable_sim_alignment enable_sim_reserved_bits enable_sim_bitsize enable_werror @@ -1416,9 +1415,6 @@ Optional Features: Specify which functions should be inlined --enable-sim-endian=endian Specify target byte endian orientation - --enable-sim-alignment=align - Specify strict, nonstrict or forced alignment of - memory accesses --enable-sim-reserved-bits Specify whether to check reserved bits in instruction @@ -10754,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 10757 "configure" +#line 10753 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10860,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 10863 "configure" +#line 10859 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11202,52 +11198,6 @@ else fi fi -wire_alignment="" -default_alignment="NONSTRICT_ALIGNMENT" - -# Check whether --enable-sim-alignment was given. -if test "${enable_sim_alignment+set}" = set; then : - enableval=$enable_sim_alignment; case "${enableval}" in - strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";; - nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";; - forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";; - yes) if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" - else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" - fi - fi;; - no) if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" - else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" - else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" - fi - fi;; - *) as_fn_error $? "\"Unknown value $enableval passed to --enable-sim-alignment\"" "$LINENO" 5; sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi -else - if test x"$default_alignment" != x; then - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" -else - if test x"$wire_alignment" != x; then - sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" - else - sim_alignment= - fi -fi -fi - default_sim_reserved_bits="1" # Check whether --enable-sim-reserved-bits was given. diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac index 9a7c1ec3df4..6d586f194fd 100644 --- a/sim/v850/configure.ac +++ b/sim/v850/configure.ac @@ -5,7 +5,6 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) SIM_AC_COMMON SIM_AC_OPTION_ENDIAN(LITTLE) -SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT) SIM_AC_OPTION_RESERVED_BITS SIM_AC_OPTION_BITSIZE(32,31) -- 2.39.2