Commit Graph

3537 Commits

Author SHA1 Message Date
Mike Frysinger 122bbfb52a sim: move sim-engine.o/sim-hrw.o to the common list
This makes these two objects available to all sims by default.
2015-04-06 23:56:47 -04:00
Mike Frysinger 20cc975360 sim: moxie: fix running after nrun conversion
The nrun conversion was slightly incorrect in how it stopped when an
exception occurred.  We still set cpu.asregs.exception, but nothing
was checking it anymore.  Convert all of that to sim_engine_halt.

To keep things from regressing again, add a basic testsuite too.
2015-04-05 04:37:44 -04:00
Mike Frysinger 024305f7f2 sim: mn10300: add a basic testsuite 2015-04-05 03:52:08 -04:00
Mike Frysinger aad84fa6ae sim: m68hc11: add a basic testsuite 2015-04-05 03:17:44 -04:00
Mike Frysinger eed64ce675 sim: iq2000: add a basic testsuite 2015-04-05 02:28:44 -04:00
Mike Frysinger e56dbbb92f sim: lm32: add a basic testsuite 2015-04-05 01:58:00 -04:00
Mike Frysinger b366059a5b sim: d10v: fix signal updates
Way back in aba6488e0b, a bunch of signal
defines were changed to TARGET_SIGNAL_xxx.  For d10v, the transition was
incomplete which lead to sim_stop_reason using the new set but sim_resume
still using the old set.  Which meant in some cases, the sim would never
actually stop.

Convert all the remaining SIGxxx defines in here to TARGET_SIGNAL_xxx.
This has the nice side effect of fixing the testsuite.
2015-04-02 20:40:11 -04:00
H.J. Lu 7fed4b0be6 Regenerate configure in sim
* arm/configure: Regenerated.
	* avr/configure: Likewise.
	* bfin/configure: Likewise.
	* common/configure: Likewise.
	* cr16/configure: Likewise.
	* cris/configure: Likewise.
	* d10v/configure: Likewise.
	* erc32/configure: Likewise.
	* frv/configure: Likewise.
	* ft32/configure: Likewise.
	* h8300/configure: Likewise.
	* igen/configure: Likewise.
	* iq2000/configure: Likewise.
	* lm32/configure: Likewise.
	* m32c/configure: Likewise.
	* m32r/configure: Likewise.
	* m68hc11/configure: Likewise.
	* mcore/configure: Likewise.
	* microblaze/configure: Likewise.
	* mips/configure: Likewise.
	* mn10300/configure: Likewise.
	* moxie/configure: Likewise.
	* msp430/configure: Likewise.
	* ppc/configure: Likewise.
	* rl78/configure: Likewise.
	* rx/configure: Likewise.
	* sh/configure: Likewise.
	* sh64/configure: Likewise.
	* v850/configure: Likewise.
2015-04-02 05:43:07 -07:00
Mike Frysinger 1a8faa2aa6 sim: clean up SIM_EXTRA_OBJS references
This variable was deleted in previous commits and is not used anymore.
Prune any stray references to it.
2015-04-02 00:51:40 -04:00
H.J. Lu 79730a3b26 Fix sim build
* common/Make-common.in (CSEARCH): Remove $(ZLIBINC).
	(BFD_LIB): Remove $(ZLIB).
	(CONFIG_LIBS): Add $(ZLIB).
	* ppc/Makefile.in (ZLIBINC): Removed.
	(INCLUDES): Remove $(ZLIBINC).
	(BFD_LIB): Remove $(ZLIB).
2015-04-01 10:27:43 -07:00
H.J. Lu 0ceaf1ec96 Regenerate configure in sim
* arm/configure: Regenerated.
	* avr/configure: Likewise.
	* bfin/configure: Likewise.
	* common/configure: Likewise.
	* cr16/configure: Likewise.
	* cris/configure: Likewise.
	* d10v/configure: Likewise.
	* erc32/configure: Likewise.
	* frv/configure: Likewise.
	* ft32/configure: Likewise.
	* h8300/configure: Likewise.
	* igen/configure: Likewise.
	* iq2000/configure: Likewise.
	* lm32/configure: Likewise.
	* m32c/configure: Likewise.
	* m32r/configure: Likewise.
	* m68hc11/configure: Likewise.
	* mcore/configure: Likewise.
	* microblaze/configure: Likewise.
	* mips/configure: Likewise.
	* mn10300/configure: Likewise.
	* moxie/configure: Likewise.
	* msp430/configure: Likewise.
	* ppc/configure: Likewise.
	* rl78/configure: Likewise.
	* rx/configure: Likewise.
	* sh/configure: Likewise.
	* sh64/configure: Likewise.
	* v850/configure: Likewise.
2015-04-01 10:15:13 -07:00
Mike Frysinger 269e9c185f sim: m32c: enable warnings & clean up a bunch
This doesn't clean up all the warnings, just most of them.
The ones that are left will require some care to unravel.
2015-04-01 02:22:58 -04:00
Mike Frysinger 0fe84f3fbe sim: run: punt!
Now that all targets have been converted to nrun, we can finally punt
this old inconsistent interface.

A few stray references to the old run were sprinkled about; clean them
up in the process.

We leave behind the run(1) man page mostly so that we get it updated for
the new nrun interface.
2015-04-01 01:22:44 -04:00
Mike Frysinger aadc9410ba sim: update zlib handling
With zlib being mandatory, and the updated m4 configs, we need to regen
and use the new settings w/bfd to avoid linkage errors.
2015-04-01 01:07:57 -04:00
Mike Frysinger b38f7f340b sim: cr16/d10v: restore generated headers dep
While cleaning up stale make rules, one too many were deleted.  The
build system autogenerates static rules, but not generated files.
2015-03-31 01:59:44 -04:00
Mike Frysinger 5a394431de common: cgen-mem/cgen-ops: fix extern inline handling
With newer versions of gcc (5.x), the extern inline we're using with the
cgen-{mem,ops} modules no longer work.  Since this code really wants the
gnu inline semantics, use that attribute explicitly.
2015-03-31 01:58:01 -04:00
Mike Frysinger 2b6ca06237 sim: m68hc11: fix gcc-5 build error w/restrict keyword 2015-03-31 01:54:47 -04:00
Mike Frysinger 49d62f8925 sim: arm: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.
2015-03-30 12:58:24 -04:00
Mike Frysinger dbf8e8afcd sim: arm: delete NEED_UI_LOOP_HOOK handling 2015-03-30 12:58:23 -04:00
Mike Frysinger 58b991b14e sim: arm: clean up misc warnings
Also delete a few unused funcs.
2015-03-30 12:58:23 -04:00
Mike Frysinger c4c9c44f57 sim: arm: use common configure options
In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.
2015-03-30 12:58:23 -04:00
Mike Frysinger 457983e3a3 sim: arm: move COPRO settings to the makefile
These values are the same all the time, so just list them directly in
the Makefile.
2015-03-30 03:06:34 -04:00
Mike Frysinger 99956be1d7 sim: d10v: add missing sim-main.h 2015-03-30 03:06:33 -04:00
Mike Frysinger 541ebcee67 sim: d10v: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.
2015-03-30 02:20:23 -04:00
Mike Frysinger a87686e5aa sim: d10v: delete NEED_UI_LOOP_HOOK handling
This hook is used only when linked into gdb, and d10v doesn't have a gdb
port anymore.  Punt it.
2015-03-30 02:20:23 -04:00
Mike Frysinger 11558abc20 sim: d10v: clean up misc warnings 2015-03-30 02:20:23 -04:00
Mike Frysinger ef9535c6bc sim: d10v: use common configure options
In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.
2015-03-30 02:20:23 -04:00
Mike Frysinger e8713c0f02 sim: d10v: link in missing testsuite
Looks like historical restructuring in this dir lost the d10v-elf subdir
and no one noticed in the meantime.  Re-add it to the testsuite.

There are some failures, but better some tests get run than none at all.
2015-03-30 01:06:57 -04:00
Mike Frysinger 247ac9ee6e sim: cr16: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.
2015-03-30 00:13:38 -04:00
Mike Frysinger 4b0cc5edf4 sim: cr16: delete NEED_UI_LOOP_HOOK handling
This hook is used only when linked into gdb, and cr16 doesn't have a gdb
port anymore.  Punt it.
2015-03-30 00:10:27 -04:00
Mike Frysinger 1e504675bd sim: cr16: delete dead code
This code is getting in the way of porting to nrun, so just drop it.
If anyone actually cares about this cpu, they can revive it.
2015-03-30 00:08:46 -04:00
Mike Frysinger 5aedb83b9c sim: cr16: clean up misc warnings 2015-03-29 22:41:14 -04:00
Mike Frysinger ca968da465 sim: cr16: use common configure options
In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.
2015-03-29 22:42:33 -04:00
Mike Frysinger 4daf7a7c3a sim: cr16: add _start symbol to tests [BZ #12385]
The current cr16 testsuite sets up _START, but the linker looks for the
_start symbol.  Add the latter as an alias to the former.
2015-03-29 21:02:03 -04:00
Mike Frysinger 2b4bc832a7 sim: microblaze: convert to nrun
This port already was storing its cpu state in the sim_cpu structure, so
converting it over was pretty easy.  It is allocating memory itself still,
but we'll fix that up in the future at some point.
2015-03-29 17:40:30 -04:00
Mike Frysinger 97eca187b3 sim: mcore/microblaze: delete dead code
The mcore port had a few structs/defines that were never used.

Similarly, the microblaze port, because it was copied from mcore, has
that same dead code, and more.  The watchpoint logic was never actually
used.  Punt it all.
2015-03-29 17:25:53 -04:00
Mike Frysinger 191ec03314 sim: microblaze: start a testsuite
Since the sim doesn't have any debug support in it, we can only exit
cleanly.  But this is still better than nothing.

Change the default microblaze sim to not dump the debug load output
when running.  No other does this, and it breaks the testsuite.
2015-03-29 16:45:49 -04:00
Mike Frysinger 744b9a190b sim; testsuite: allow tests to set no output
If a test doesn't write anything at all to stdout, the current test
framework can't support that.  Even if you put a blank output line:
	# output:
the setup happily clobbers that with a default pass/fail string.

Tweak the parsing logic so we only set the output to pass/fail when
the test has no output marker.
2015-03-29 16:41:59 -04:00
Mike Frysinger 92fc6153a6 sim: common: sim-arange: fix extern inline handling
With newer versions of gcc (5.x), the extern inline we're using with the
sim-arange module no longer works.  Since this code really wants the gnu
inline semantics, use that attribute explicitly.

Reported-by: DJ Delorie <dj@redhat.com>
Reported-by: Joel Sherrill <joel.sherrill@oarcorp.com>
2015-03-29 16:02:17 -04:00
Mike Frysinger 6dae8a88bf sim: testsuite: make subdir unconditional
Since the testsuite subdir has to handle dynamic arch values already,
there's no real value in requiring arches to opt in to it.  Most have
a testsuite now anyways, and we're requiring it in the future.
2015-03-29 11:51:13 -04:00
Mike Frysinger 3c0ae30962 sim: microblaze: use common configure options
In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.
2015-03-29 11:51:13 -04:00
Mike Frysinger ea6b7543b4 sim: mcore: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.
2015-03-29 04:14:27 -04:00
Mike Frysinger 525887679c sim: mcore: use common configure options
In preparation for converting to nrun, call the common functions that
are needed.  This doesn't produce any new warnings, and the generated
code should be the same.
2015-03-29 04:14:27 -04:00
Mike Frysinger 36cb69e0ed sim: mcore: add a basic testsuite 2015-03-29 04:14:27 -04:00
Mike Frysinger aac18a6996 sim: mcore: drop sbrk support
The sbrk syscall assumes the sbrk region starts after the bss and the
current implementation requires a bss section to exist.  Since there
is no requirement for programs to have a bss in general, we want to
drop this check.  However, there is still the sbrk syscall that wants
to know about the region.

Since libgloss doesn't actually use the sbrk syscall (it implements
sbrk in its own way), and the sim really shouldn't enforce a specific
memory layout on programs, lets simply delete sbrk support.  Now it
always returns an error.
2015-03-29 04:14:27 -04:00
Mike Frysinger 4f5cce88bf sim: avr: fix _start testsuite symbol
Make sure we use the symbol the linker expects by default, and we export
it so it can be found.
2015-03-29 04:14:27 -04:00
Mike Frysinger 62454d3da2 sim: sh: convert to nrun
A lot of cpu state is stored in global variables, as is memory handling.
The sim_size support needs unwinding at some point.  But at least this
is an improvement on the status quo.
2015-03-28 17:45:31 -04:00
Mike Frysinger 5fa71a1b13 sim: sh: clean up some warnings
Mostly converting old style prototypes.  Also include a few missing
headers, and add static/casts where appropriate.
2015-03-28 17:45:31 -04:00
Mike Frysinger 02131c7ff6 sim: sh: fix broken handling in DSR reg
A missing */ caused a case statement to be incorrect masked out which
also hide an error where the wrong value was being checked.  Fix both.
2015-03-28 17:45:30 -04:00
Mike Frysinger ed4d32c28a sim: sh: clean up gencode
The build line was missing the normal BUILD_xxx flags.  Once we added
that, we get warnings that weren't shown before.  As we fix those, we
notice that the -d option segfaults because it tries to write readonly
memory.  Fix that too as part of the const/prototype clean up.
2015-03-28 17:45:30 -04:00