Commit Graph

38 Commits

Author SHA1 Message Date
Mike Frysinger
fe0adb538f sim: build: delete Make-common.in logic
Now that all (other than ppc) build in the top-level, this logic is
unused, so punt it all.
2023-01-13 17:34:53 -05:00
Mike Frysinger
e732fe9b4f sim: build: drop support for creating libsim.a in subdirs
Now that all ports have moved to creating libsim.a in the top-level,
drop all the support code to create it in a subdir.
2023-01-10 01:15:26 -05:00
Mike Frysinger
7a1e1f9463 sim: build: drop support for subdir extra deps
Nothing uses this hook anymore, so punt it.  It was largely used to
track generated files (which we do in the top-level now) and extra
header files (which we use automake depgen for now).
2023-01-10 01:15:23 -05:00
Mike Frysinger
33383d1674 sim: build: drop unused SIM_EXTRA_LIBS
Now that all run binaries are linked in the topdir, this subdir libs
variable isn't used anywhere, so punt it.
2023-01-01 17:46:15 -05:00
Mike Frysinger
508de64120 sim: drop mention of & support for subdir configure
Now that no ports use these common configure APIs, delete the logic
and remove it from the documentation.
2023-01-01 17:35:16 -05:00
Mike Frysinger
63bf33ff90 sim: build: move install steps to the top-level
We still have to maintain custom install rules due to how we rename
arch-specific files with an arch prefix in their name, but we can at
least unify the logic in the common dir.
2022-11-05 16:26:08 +07:00
Mike Frysinger
64ae70dde5 sim: nltvals: pull target syscalls out into a dedicated source file
Like we just did for pulling out the errno map, pull out the syscall
maps into a dedicated common file.  Most newlib ports are using the
same syscall map, but not all, which means we have to do a bit more
work to migrate.

This commit adds the maps and switches the ports using the common
default syscall table over to it.  Ports using unique syscall tables
are still using the old targ-map.c logic.

Switching common ports over is easy by checking NL_TARGET, but the
ppc code needs a bit more cleanup here hence its larger diff.
2021-11-28 13:23:57 -05:00
Mike Frysinger
be0387eed0 sim: hw: rework configure option & device selection
The sim-hardware configure option allows builders to select a set of
device models to enable.  But this seems like unnecessary overkill:
the existence of individual device models doesn't affect performance
at all as they are only enabled at runtime if the config uses them,
and individually these are all <5KB a piece.  Stripping off a total
of ~50KB from a ~1MB binary doesn't seem useful, and it's extremely
unlikely anyone will ever bother.

So let's simplify the configure/make logic by turning sim-hardware
into a boolean option like many of the other sim options.  Any ports
that have unique device models will declare them in their Makefile
instead of at configure time.  This will allow us to (eventually)
unify the setting into the common dir.
2021-06-21 21:36:51 -04:00
Mike Frysinger
3eda63f2e4 sim: delete SIM_AC_COMMON macro
Now that we've moved all content out to the common file, this is
empty and can be deleted it entirely.
2021-06-20 00:39:38 -04:00
Mike Frysinger
df68e12b3b sim: create header namespace
The gdb/callback.h & gdb/remote-sim.h headers have nothing to do with
gdb and are really definitions for the libsim API under the sim/ tree.
While gdb uses those headers as a client, it's not specific to it.  So
create a new sim/ namespace and move the headers there.
2021-05-14 00:41:05 -04:00
Mike Frysinger
425b0b1a98 sim: clean up explicit environment build calls
This was enabled by default for all targets, but a few ports still
include an explicit call.  Clean that up, and update the docs.
2021-05-12 00:47:49 -04:00
Mike Frysinger
bd0918c910 sim: nltvals: unify common syscall tables
Since libgloss provides a default syscall table for arches, use that
to provide the default syscall table for ports.  Only the exceptions
need to be enumerated now with the common logic as the default.
2021-04-26 22:39:55 -04:00
Mike Frysinger
9d90335212 sim: simplify hardware m4 macro
Every port using this sets the 1st arg to yes and the 2nd arg to "".
These are the defaults we probably want anyways in order to unify the
codebase, so move them to the macro and only allow ports to declare
extra hardware models.
2021-04-23 21:58:21 -04:00
Mike Frysinger
ed30adf750 sim: delete unused SIM_EXTRA_LIBDEPS
This was last used 15 years ago, so clearly not important enough to
keep around.  Punt it.
2021-02-28 01:39:02 -05:00
Mike Frysinger
f8069d55c1 sim: delete redundant SIM_EXTRA_ALL
We don't need a variable to add a dependency to the "all" target, and
having one doesn't really add value.  Switch to the target directly for
the few ports that actually use this.
2021-02-27 23:50:52 -05:00
Mike Frysinger
136da8cd9c sim: switch to AC_CONFIG_MACRO_DIRS
Rather than hand maintain m4 includes in various autotool files,
use AC_CONFIG_MACRO_DIRS to declare the relevant search paths.
This simplifies the code, makes it more robust, and cleans out
unused logic from configure.
2021-02-13 00:24:20 -05:00
Mike Frysinger
4c0d76b9c4 sim: watchpoints: use common sim_pc_get
Few arches implement STATE_WATCHPOINTS()->pc while all of them implement
sim_pc_get.  Lets switch the sim-watch core for monitoring pc events to
the sim_pc_get API so this module works for all ports, and then we can
delete this old back channel of snooping in the port's cpu state -- the
code needs the pointer to the pc storage so that it can read out bytes
and compare them to the watchrange.

This also fixes the logic on multi-cpu sims by removing the limitation
of only being able to watch CPU0's state.
2021-02-06 12:12:51 -05:00
Mike Frysinger
d4e3adda12 sim: watchpoints: change sizeof_pc to sizeof(sim_cia)
Existing ports already have sizeof_pc set to the same size as sim_cia,
so simply make that part of the core code.  We already assume this in
places by way of sim_pc_{get,set}, and this is how it's documented in
the sim-base.h API.

There is code to allow sims to pick different register word sizes from
address sizes, but most ports use the defaults for both (32-bits), and
the few that support multiple register sizes never change the address
size (so address defaults to register).  I can't think of any machine
where the register hardware size would be larger than the address word
size either.  We have ABIs that behave that way (e.g. x32), but the
hardware is still equivalent register sized.
2021-01-30 10:14:21 -05:00
Mike Frysinger
5e25901fcc sim: common: delete configure & Makefile
This was mostly orphaned a while back, but left behind so people could
still run `make headers`.  Merge that one target to the top sim dir and
delete all the build logic.  This should avoid confusing people further.
2021-01-18 12:23:18 -05:00
Mike Frysinger
68895f7d7e sim: README-HACKING: clean up stale run references
The run.c interface was deleted long ago and everyone moved to nrun.c
(which is also the default), so no one needs to declare this anymore.
2021-01-12 04:13:11 -05:00
Mike Frysinger
50df264dae sim: clean up stale AC_PREREQ refs
This was purged from the tree when we upgraded to autoconf-2.69,
but a few references in the sim tree were missed.
2021-01-09 09:27:29 -05:00
Mike Frysinger
46f900c065 sim: require a C11 compiler
With GDB requiring a C++11 compiler now, this hopefully shouldn't
be a big deal.  It's been 10 years since C11 came out, so should
be plenty of time to upgrade.

This will allow us to start cleaning up random header logic and
many of our non-standard custom types.
2021-01-08 15:45:42 -05:00
Mike Frysinger
1b393626ce sim: punt WITH_DEVICES & tconfig.h support
No arch is using this anymore, and we want all new ports using the
hardware framework instead.  Punt WITH_DEVICES and the two callbacks
device_io_{read,write}_buffer.

We can also punt the tconfig.h file as no port is using it anymore.
This fixes in-tree builds that get confused by picking up the wrong
one (common/ vs <port>/) caused by commit ae7d0cac8c.

Any port that needs to set up a global define can use their own
sim-main.h file that they must provide regardless.
2015-12-26 20:38:31 -05:00
Mike Frysinger
306f4178ef sim: update configure.in->configure.ac docs
A few places still refer to the configure.in file; update them.
2015-06-12 12:11:21 -04:00
Mike Frysinger
ae7d0cac8c sim: rename tconfig.in to tconfig.h
Rather than manually include tconfig.h when we think we'll need it (which
is error prone as it can define symbols we expect from config.h), have it
be included directly by config.h.  Since we know we have to include that
header everywhere already, this will make sure tconfig.h isn't missed.

It should also be fine as tconfig.h is supposed to be simple and only set
up a few core defines for the target.

This allows us to stop symlinking it in place all the time and just use
it straight out of the respective source directory.
2015-03-16 01:23:52 -04:00
Tom Tromey
bdca5ee4bc remove PARAMS from sim
This removes the last uses of PARAMS from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

	* README-HACKING: Don't use PARAMS.
	* arm/wrapper.c: Don't use PARAMS.
	* bfin/sim-main.h: Don't use PARAMS.
	* common/callback.c: Don't use PARAMS.
	* common/cgen-trace.c: Don't use PARAMS.
	* common/run-sim.h: Don't use PARAMS.
	* common/run.c: Don't use PARAMS.
	* common/sim-base.h: Don't use PARAMS.
	* common/sim-load.c: Don't use PARAMS.
	* common/sim-options.h: Don't use PARAMS.
	* common/sim-trace.c: Don't use PARAMS.
	* common/sim-trace.h: Don't use PARAMS.
	* common/sim-utils.h: Don't use PARAMS.
	* cr16/cr16_sim.h: Don't use PARAMS.
	* cr16/gencode.c: Don't use PARAMS.
	* cr16/interp.c: Don't use PARAMS.
	* cr16/simops.c: Don't use PARAMS.
	* d10v/d10v_sim.h: Don't use PARAMS.
	* d10v/gencode.c: Don't use PARAMS.
	* d10v/interp.c: Don't use PARAMS.
	* d10v/simops.c: Don't use PARAMS.
	* erc32/erc32.c: Don't use PARAMS.
	* erc32/exec.c: Don't use PARAMS.
	* erc32/float.c: Don't use PARAMS.
	* erc32/func.c: Don't use PARAMS.
	* erc32/sis.c: Don't use PARAMS.
	* erc32/sis.h: Don't use PARAMS.
	* mips/interp.c: Don't use PARAMS.
	* mips/sim-main.h: Don't use PARAMS.
	* sh/interp.c: Don't use PARAMS.
	* v850/sim-main.h: Don't use PARAMS.
	* v850/v850_sim.h: Don't use PARAMS.
2014-01-07 09:17:05 -07:00
Mike Frysinger
aba193a514 sim: add more hacking notes
I found the documentation lacking in many places, so I tried filling in a
lot of holes that I personally fell into.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-12 21:44:46 +00:00
Andrew Cagney
c93abbccf2 * Makefile.in (ChangeLog): New makefile variable.
* README-HACKING: Mention the ChangeLog makefile variable.
2002-06-06 16:33:45 +00:00
Stan Shebs
c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs
071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Andrew Cagney
fbf1f3f1f6 Add d10v and v850 to gennltvals.sh and regenerate.
Add a howto.
1998-11-24 07:59:01 +00:00
Tom Tromey
b29daf0287 * Makefile.in (autoconf-common autoheader-common): Don't pass -l
to autoconf and autoheader.
1998-04-26 21:44:25 +00:00
Tom Tromey
c2816431f1 * Makefile.in (autoconf-common autoheader-common): Pass `-l
../common' to autoconf and autoheader.  Unconditionally run
	autoconf in every subdir.
	(autoconf-changelog autoheader-changelog): Unconditionally run
	commands in every subdir.
	(autoconf-install autoheader-install): Likewise.
1998-04-24 21:00:29 +00:00
Andrew Cagney
b83adf4eeb Doc C language guidelines. 1997-09-03 07:34:59 +00:00
David Edelsohn
51037f28cf Add note on TAGS support. 1997-09-02 22:07:54 +00:00
Andrew Cagney
96527c4ea6 Add autoheader counterpart to autoconf-common et.al. 1997-04-03 02:22:52 +00:00
David Edelsohn
b04500b2c4 * Makefile.in (autoconf-install): New target. 1997-04-02 23:10:34 +00:00
Andrew Cagney
b69cc8ab14 New target - autoconf-changelog 1997-04-02 04:52:31 +00:00