aboutsummaryrefslogtreecommitdiff
path: root/sim/cr16
AgeCommit message (Collapse)AuthorFilesLines
2015-11-15sim: sim-close: unify sim_close logicMike Frysinger2-7/+4
Other than the nice advantage of all sims having to declare one fewer common function, this also fixes leakage in pretty much every sim. Many were not freeing any resources, and a few were inconsistent as to the ones they did. Now we have a single module that takes care of all the logic for us. Most of the non-cgen based ones could be deleted outright. The cgen ones required adding a callback to the arch-specific cleanup func. The few that still have close callbacks are to manage their internal state. We do not convert erc32, m32c, ppc, rl78, or rx as they do not use the common sim core.
2015-11-10sim: cr16/d10v: localize translation funcsMike Frysinger2-3/+9
These functions are only used in the interp module, so there's no point in exporting them and declaring them in the external sim interface.
2015-07-24Remove leading/trailing white spaces in ChangeLogH.J. Lu1-4/+4
2015-06-23sim: use AS_HELP_STRING everywhereMike Frysinger2-13/+28
This helps standardize the configure --help output.
2015-06-12sim: update configure.in->configure.ac docsMike Frysinger2-1/+5
A few places still refer to the configure.in file; update them.
2015-06-12sim: drop -DTRACE from configureMike Frysinger2-3/+7
No code uses this anymore and the symbol conflicts with the new TRACE helper. Punt it from configure.
2015-04-18sim: unify SIM_CPU definitionMike Frysinger2-2/+4
Since every target typedefs this the same way, move it to the common code. We have to leave Blackfin behind here for now because of inter-dependencies on types and headers: sim-base.h includes sim-model.h which needs types in machs.h which needs types in bfim-sim.h which needs SIM_CPU.
2015-04-18sim: unify sim_cia definitionMike Frysinger2-1/+4
Almost every target defines sim_cia the same way -- either using the address_word type directly, or a type of equivalent size. The only odd one out is sh64 (who has 32bit address_word and 64bit cia), and even that case doesn't seem to make sense. We'll put off clean up though of sh64 and at least set up a sensible default for everyone.
2015-04-17sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}Mike Frysinger2-3/+4
The CIA_{GET,SET} macros serve the same function as CPU_PC_{GET,SET} except the latter adds a layer of indirection via the sim state. This lets models set up different functions at runtime and doesn't reach so directly into the arch-specific cpu state. It also doesn't make sense to have two sets of macros that do exactly the same thing, so lets standardize on the one that gets us more.
2015-04-17sim: arm/cr16/d10v/h8300/microblaze/sh: fill out sim-cpu pc fetch/store helpersMike Frysinger2-0/+26
This makes the common sim-cpu logic work.
2015-04-15sim: unify sim-cpu usageMike Frysinger3-6/+5
Now that all the targets are utilizing CPU_PC_{FETCH,STORE}, and the cpu state is multicore, and the STATE_CPU defines match, we can move it all to the common code.
2015-04-13sim: fix the PKGVERSION defineMike Frysinger2-2/+6
This should be SIM, not GDB.
2015-04-06sim: move sim-engine.o/sim-hrw.o to the common listMike Frysinger2-1/+4
This makes these two objects available to all sims by default.
2015-04-02Regenerate configure in simH.J. Lu1-2/+2
* 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-01Regenerate configure in simH.J. Lu1-4/+6
* 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-01sim: run: punt!Mike Frysinger2-2/+4
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-01sim: update zlib handlingMike Frysinger2-84/+13
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-03-31sim: cr16/d10v: restore generated headers depMike Frysinger2-0/+6
While cleaning up stale make rules, one too many were deleted. The build system autogenerates static rules, but not generated files.
2015-03-30sim: cr16: convert to nrunMike Frysinger6-147/+188
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-30sim: cr16: delete NEED_UI_LOOP_HOOK handlingMike Frysinger3-20/+8
This hook is used only when linked into gdb, and cr16 doesn't have a gdb port anymore. Punt it.
2015-03-30sim: cr16: delete dead codeMike Frysinger2-238/+10
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-29sim: cr16: clean up misc warningsMike Frysinger6-488/+509
2015-03-29sim: cr16: use common configure optionsMike Frysinger6-9/+454
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-16sim: rename tconfig.in to tconfig.hMike Frysinger3-10/+10
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-14sim: make nrun the default run programMike Frysinger2-1/+11
We want people to stop using the run.c frontend, but it's hard to notice when it's still set as the default. Lets flip things so nrun.c is the default, and users of run.c will get an error by default. We turn that error into a warning for existing sims so we don't break them -- this is mostly meant for people starting new ports.
2015-03-14sim: drop duplicate header checksMike Frysinger4-28/+15
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific sim ports need not do it themselves.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker6-6/+6
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-08-19Fix --diable-shared --enable-plugins build breakageAlan Modra2-2/+64
Directories that don't use libtool need to add -ldl (on most *nix hosts) to provide dlopen for libbfd. config/ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to LIBS via AC_SEARCH_LIBS. gdb/ * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. * config.in: Regenerate. sim/ppc/ * configure.ac: Invoke AC_PLUGINS. * config.in: Regenerate. and regen lots of configure files.
2014-08-15Regenerate sim configury.Roland McGrath3-9/+52
2014-03-10sim: constify arg to sim_do_commandMike Frysinger2-1/+5
It is rare for people to want to modify the cmd arg. In general, they really shouldn't be, but a few still do. For those who misbehave, dupe the string locally so they can bang on it.
2014-03-05sim: constify prog_nameMike Frysinger2-1/+5
There's no need for the prog_name handed down to the core to be mutable, so add const markings to it and all the related funcs.
2014-03-04sim: convert old style prototypesMike Frysinger2-7/+8
Most of these prototypes have been killed off, but we have a few left in the sim tree. Clean them up so we can enable the -W flag for it.
2014-01-07remove PARAMS from simTom Tromey4-23/+23
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-01Update Copyright year range in all files maintained by GDB.Joel Brobecker6-6/+6
2013-09-23Regenerate sim configure files to pick up support for powerpc64le inAlan Modra2-5/+15
libtool.m4.
2013-06-05sim: use AM_MAINTAINER_MODEMike Frysinger3-13/+72
I noticed the sim code is using an old implementation of the maintainer logic. I cut it over to the new macro (like gdb has been doing). In practice, it makes no difference currently as nothing in the sim tree uses it, but I have a follow up commit for the Blackfin tree that needs it.
2013-05-10gdbTom Tromey2-1/+6
Freddie Chopin <freddie_chopin@op.pl> PR build/15414: * configure: Rebuild. * configure.ac (build_warnings): Do not use -Wformat-nonliteral with -Wno-format. sim/common * acinclude.m4 (SIM_AC_OPTION_WARNINGS): Do not use -Wformat-nonliteral with -Wno-format. sim/bfin * configure: Rebuild. sim/cr16 * configure: Rebuild. sim/cris * configure: Rebuild. sim/d10v * configure: Rebuild. sim/igen * configure: Rebuild. sim/m68hc11 * configure: Rebuild. sim/mips * configure: Rebuild. sim/mn10300 * configure: Rebuild. sim/v850 * configure: Rebuild.
2013-03-15gdb:Steve Ellcey1-1/+1
2013-03-15 Steve Ellcey <sellcey@mips.com> * remote-sim.c (sim_command_completer): Make char arguments const. include: 2013-03-15 Steve Ellcey <sellcey@mips.com> * gdb/remote-sim.h (sim_command_completer): Make char arguments const. sim: 2013-03-15 Steve Ellcey <sellcey@mips.com> * arm/wrapper.c (sim_complete_command): Make char arguments const. * avr/interp.c (sim_complete_command): Ditto. * common/sim-options.c (sim_complete_command): Ditto. * cr16/interp.c (sim_complete_command): Ditto. * erc32/interf.c (sim_complete_command): Ditto. * m32c/gdb-if.c (sim_complete_command): Ditto. * microblaze/interp.c (sim_complete_command): Ditto. * ppc/sim_calls.c (sim_complete_command): Ditto. * rl78/gdb-if.c (sim_complete_command): Ditto. * rx/gdb-if.c (sim_complete_command): Ditto. * sh/interp.c (sim_complete_command): Ditto.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker6-6/+6
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-11-20Fix sim build when configured with --enable-pluginsH.J. Lu1-1/+8960
* common/Make-common.in: Use lt_cv_dlopen_libs under PLUGINS condition. * common/acinclude.m4: Define lt_cv_dlopen_libs. * arm/configure: Regenerate. * avr/configure: Regenerate. * bfin/configure: Regenerate. * common/configure: Regenerate. * cr16/configure: Regenerate. * cris/configure: Regenerate. * d10v/configure: Regenerate. * erc32/configure: Regenerate. * frv/configure: Regenerate. * h8300/configure: Regenerate. * igen/configure: Regenerate. * iq2000/configure: Regenerate. * lm32/configure: Regenerate. * m32c/configure: Regenerate. * m32r/configure: Regenerate. * m68hc11/configure: Regenerate. * mcore/configure: Regenerate. * microblaze/configure: Regenerate. * mips/configure: Regenerate. * mn10300/configure: Regenerate. * moxie/configure: Regenerate. * ppc/configure: Regenerate. * rl78/configure: Regenerate. * rx/configure: Regenerate. * sh/configure: Regenerate. * sh64/configure: Regenerate. * testsuite/configure: Regenerate. * v850/configure: Regenerate.
2012-08-30sim: cr16: improve trap handlingMike Frysinger4-2/+31
2012-08-30sim: cr16: add sim_complete_command stubMike Frysinger2-0/+9
2012-06-17sim: cr16: include config.h rather than sysdep.h from bfdMike Frysinger2-1/+8
2012-06-15Define PACKAGE macro in all sims' config.h.Joel Brobecker3-0/+19
Some of the common includes in include/gdb such as callback.h include bfd.h. But there was a recent change in bfd-in.h to require that config.h be included before bfd.h can be included: /* PR 14072: Ensure that config.h is included first. */ #if !defined PACKAGE && !defined PACKAGE_VERSION #error config.h must be included before this header #endif PACKAGE_VERSION is always defined by default by the AC_INIT autoconf macro, but PACKAGE isn't. This patch updates the SIM_AC_COMMON macro to define it, and then regenerates all configure scripts and config.in files. sim/common/changeLog: * acinclude.m4 (SIM_AC_COMMON): Define PACKAGE. * config.in, configure: Regenerate. sim/ChangeLog: * configure: Regenerate. sim/arm/ChangeLog: * config.in, configure: Regenerate. sim/avr/ChangeLog: * config.in, configure: Regenerate. sim/bfin/ChangeLog: * config.in, configure: Regenerate. sim/cr16/ChangeLog: * config.in, configure: Regenerate. sim/cris/ChangeLog: * config.in, configure: Regenerate. sim/d10v/ChangeLog: * config.in, configure: Regenerate. sim/erc32/ChangeLog: * config.in, configure: Regenerate. sim/frv/ChangeLog: * config.in, configure: Regenerate. sim/h8300/ChangeLog: * config.in, configure: Regenerate. sim/iq2000/ChangeLog: * config.in, configure: Regenerate. sim/lm32/ChangeLog: * config.in, configure: Regenerate. sim/m32c/ChangeLog: * config.in, configure: Regenerate. sim/m32r/ChangeLog: * config.in, configure: Regenerate. sim/m68hc11/ChangeLog: * config.in, configure: Regenerate. sim/mcore/ChangeLog: * config.in, configure: Regenerate. sim/microblaze/ChangeLog: * config.in, configure: Regenerate. sim/mips/ChangeLog: * config.in, configure: Regenerate. sim/mn10300/ChangeLog: * config.in, configure: Regenerate. sim/moxie/ChangeLog: * config.in, configure: Regenerate. sim/ppc/ChangeLog: * configure: Regenerate. sim/rl78/ChangeLog: * config.in, configure: Regenerate. sim/rx/ChangeLog: * config.in, configure: Regenerate. sim/sh/ChangeLog: * config.in, configure: Regenerate. sim/sh64/ChangeLog: * config.in, configure: Regenerate. sim/v850/ChangeLog: * config.in, configure: Regenerate. sim/testsuite/ChangeLog: * configure: Regenerate.
2012-05-24gdb/Pedro Alves2-3/+9
2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. include/gdb/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/arm/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/avr/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/common/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/cr16/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/d10v/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/erc32/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/m32c/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/ppc/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rl78/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rx/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-03-24[PATCH] sim: make sure to include strsignal prototypeMike Frysinger4-153/+270
Before POSIX standardized strsignal(), old systems would hide the prototype unless the normal extension defines were enabled. So use the AC_USE_SYSTEM_EXTENSIONS helper for that. Then make sure we include string.h ourselves in nrun.c rather than relying on implicit includes via other sim headers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker6-6/+6
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-12-30sim: cr16: add ifdefs around undefined syscallsMike Frysinger2-0/+17
The cr16 libgloss port does not define these syscall numbers, so trying to use them results in build failures [1]. The cr16 code already uses ifdefs around a bunch of syscalls, so extend that style to cover the ones that are currently missing. Now we can at least compile. [1] http://sourceware.org/ml/gdb-patches/2011-06/msg00118.html Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-03sim: generate build dependencies on the flyMike Frysinger3-0/+319
Lift the code that GDB is using to generate dependencies on the fly and port it over to the sim. Now people shouldn't have to manually maintain these in their Makefile's. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-18sim: rename common/aclocal.m4 to common/acinclude.m4Mike Frysinger2-1/+5
Automake likes to dump macros automatically used into the aclocal.m4 file, but the common/aclocal.m4 naming prevents that. So rename it to the more normal "acinclude.m4" so the aclocal tool can work. Signed-off-by: Mike Frysinger <vapier@gentoo.org>