Files
binutils-gdb/sim/bpf/ChangeLog
Mike Frysinger ba307cddcf 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.
2021-06-12 21:14:50 -04:00

182 lines
4.4 KiB
Plaintext

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.
2021-06-12 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
2021-06-09 Mike Frysinger <vapier@gentoo.org>
* bpf.c (bpf_engine_run_full): Change current_target_byte_order to
CURRENT_TARGET_BYTE_ORDER.
(bpf_engine_run_fast): Likewise.
* mloop.in: Likewise.
2021-06-09 Mike Frysinger <vapier@gentoo.org>
* sim-if.c (sim_open): Delete cgen_init call.
2021-05-17 Mike Frysinger <vapier@gentoo.org>
* sim-main.h (struct sim_state): Delete.
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* bpf-helpers.c, bpf.c, sim-if.c, traps.c: Include defs.h.
2021-05-16 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
2021-05-04 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-05-01 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
2021-04-26 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, config.in, configure: Regenerate.
2021-04-22 Tom Tromey <tom@tromey.com>
* configure, config.in: Rebuild.
2021-04-22 Tom Tromey <tom@tromey.com>
* Makefile.in (arch.o, cpu.o, sim-if.o, traps.o): Remove.
(mloop-le.o, mloop-be.o, decode-le.o, decode-be.o, sim-le.o)
(sim-be.o): Use COMPILE and POSTCOMPILE.
(SIM_EXTRA_DEPS): Add eng-le.h, eng-be.h.
2021-04-21 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4: Regenerate.
2021-04-21 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Regenerate.
2021-04-18 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-04-12 Mike Frysinger <vapier@gentoo.org>
* sim-if.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all.
2021-04-08 Tom Tromey <tom@tromey.com>
* bpf.c (bpf_def_model_init): Use new-style declaration.
2021-04-02 Mike Frysinger <vapier@gentoo.org>
* aclocal.m4, configure: Regenerate.
2021-02-28 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-02-21 Mike Frysinger <vapier@gentoo.org>
* configure.ac (AC_CONFIG_MACRO_DIRS): Replace common with m4.
* aclocal.m4, configure: Regenerate.
2021-02-13 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Replace sinclude with AC_CONFIG_MACRO_DIRS.
* aclocal.m4, configure: Regenerate.
2021-02-06 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-01-31 Mike Frysinger <vapier@gentoo.org>
* mloop.in (xextract-scache): Call SEM_ARGBUF.
2021-01-31 Mike Frysinger <vapier@gentoo.org>
* decode-be.c (bpfbf_ebpfbe_decode): Change TRACE_EXTRACT to
CGEN_TRACE_EXTRACT.
* decode-le.c (bpfbf_ebpfle_decode): Likewise.
2021-01-11 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Call SIM_AC_OPTION_WARNINGS.
* configure: Regenerate.
2021-01-11 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
2021-01-09 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2021-01-08 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
2020-11-01 Simon Marchi <simon.marchi@polymtl.ca>
* configure: Re-generate.
2020-09-08 David Faust <david.faust@oracle.com>
* sem-be.c: Regenerate.
* sem-le.c: Likewise.
2020-09-03 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf.c: Include bpf-helpers.h.
* bpf-helpers.h: Provide a prototype for bpf_trace_printk.
* configure.ac: Set simulator bitsize to 64.
* configure (includedir): Regenerate.
* sim-if.c: Include stdlib.h.
* traps.c: Likewise.
2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
David Faust <david.faust@oracle.com>
* arch.c: Likewise.
* arch.h: Likewise.
* cpu.c: Likewise.
* cpu.h: Likewise.
* cpuall.h: Likewise.
* decode-be.c: Likewise.
* decode-be.h: Likewise.
* decode-le.c: Likewise.
* decode-le.h: Likewise.
* defs-be.h: Likewise.
* defs-le.h: Likewise.
* sem-be.c: Likewise.
* sem-le.c: Likewise.
2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
David Faust <david.faust@oracle.com>
* Makefile.in: New file.
* bpf-helpers.c: Likewise.
* bpf-helpers.def: Likewise.
* bpf-helpers.h: Likewise.
* bpf-sim.h: Likewise.
* bpf.c: Likewise.
* config.in: Likewise.
* configure.ac: Likewise.
* decode.h: Likewise.
* eng.h: Likewise.
* mloop.in: Likewise.
* sim-if.c: Likewise.
* sim-main.h: Likewise.
* traps.c: Likewise.
* configure: Generate.
* aclocal.m4: Likewise.