[binutils-gdb] sim: overhaul alignment settings management
Michael Frysinger
vapier@sourceware.org
Sun Jun 13 01:19:40 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ba307cddcf7e42c5099632dcbad598d8f96044f4
commit ba307cddcf7e42c5099632dcbad598d8f96044f4
Author: Mike Frysinger <vapier@gentoo.org>
Date: Mon Jun 7 00:54:20 2021 -0400
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.
Diff:
---
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 <vapier@gentoo.org>
+
+ * 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 <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * wrapper.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * 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 <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open):
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open):
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * sim-if.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * interp.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * sim-if.c (sim_open):
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * sim-if.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+ * sim-if.c (sim_open): Set current_alignment.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <http://www.gnu.org/licenses/>.
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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
+
+ * configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
+
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
diff --git a/sim/mcore/aclocal.m4 b/sim/mcore/aclocal.m4
inde[...]
[diff truncated at 100000 bytes]
More information about the Gdb-cvs
mailing list