aboutsummaryrefslogtreecommitdiff
path: root/sim/mcore
AgeCommit message (Collapse)AuthorFilesLines
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-17sim: syscall: add common sim_syscall helpersMike Frysinger2-19/+8
Many ports have the same sim syscall logic, so add some helpers to handle all the common details. The arches still have to deal with the unpacking and packing of the syscall arguments, but the rest of the sim<->callback glue is now shared.
2015-06-17sim: syscall: unify memory helpersMike Frysinger2-24/+10
Almost every port implements these two callbacks in the same way, so unify them in the common layer.
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-21sim: mcore: clean up printf warningsMike Frysinger2-8/+13
These printf statements are showing "word" objects which are typedefed from long, so make sure to use l with %x when printing them to avoid warnings from gcc.
2015-04-21sim: mcore: convert to common memory/verbose functionsMike Frysinger2-319/+59
Re-use the existing memory core that handles reads/writes. The verbose command is converted to the common --verbose flag since only a few call sites use it now.
2015-04-21sim: mcore: drop watchpoint/dumpmem/clearstats supportMike Frysinger2-73/+12
In preparation for converting to the common memory framework, the custom commands get in our way. But when we realize that gdb support has been dropped for mcore, it makes things a bit easier: the main runner does not let you run arbitrary commands once simulation starts. So lets disable watchpoint support until it can be converted to the common watchpoint logic. There's already an ifdef to let us do that. We straight up drop support for the dumpmem command (no other sim supports this, and if it's a feature people want, we can add a common func) and the clearstats command (not a big deal -- just restart your simulation). We leave in place the verbose check points as a follow up commit will cut that over to common logic.
2015-04-21sim: mcore: switch to common syscall handlingMike Frysinger3-140/+37
Now that libgloss has a header tracking the syscalls for this arch, we can update the database to include it for the symbolic constants/maps. Then we can switch the mcore syscall callbacks over to the common ones.
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 Frysinger3-7/+12
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-16sim: avr/mcore/moxie: fill out sim-cpu pc fetch/store helpersMike Frysinger2-0/+21
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: update zlib handlingMike Frysinger3-84/+17
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-29sim: mcore/microblaze: delete dead codeMike Frysinger2-16/+4
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-29sim: mcore: convert to nrunMike Frysinger4-119/+182
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-29sim: mcore: use common configure optionsMike Frysinger4-2/+442
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-29sim: mcore: drop sbrk supportMike Frysinger2-39/+9
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-16sim: mcore/microblaze: strip trailing whitespaceMike Frysinger2-135/+139
No functional changes here.
2015-03-16sim: mcore/microblaze: clean up a bitMike Frysinger4-126/+187
Fix some various warnings and enable the extra warnings options.
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: mcore/moxie: clean up makefiles a bitMike Frysinger2-5/+5
Clean out stub targets and rules that get autogenerated.
2015-03-14sim: make nrun the default run programMike Frysinger2-0/+10
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-26/+15
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific sim ports need not do it themselves.
2015-02-20sim: drop unused headersMike Frysinger3-96/+8
These look like left over hacks from the days where we had to protect ourselves from the compiler and C library. None of these checks are relevant, and we have common configure logic to do header tests. Punt them all now.
2015-02-19sim: drop unused sim_kill functionMike Frysinger2-7/+4
This has been deprecated for a long time and no one calls it.
2015-02-20sim: ChangeLog: Correct the related items position and format.Chen Gang1-0/+4
Move several items from sim/ChangeLog to sim/*/ChangeLog. Also remove the incorrect white space in sim/common/ChangeLog.
2015-02-11sim/mcore/interp.c: Include "unistd.h".Chen Gang2-0/+5
The related warnings: gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -I. -I../../../binutils-gdb/sim/mcore -I../common -I../../../binutils-gdb/sim/mcore/../common -I../../include -I../../../binutils-gdb/sim/mcore/../../include -I../../bfd -I../../../binutils-gdb/sim/mcore/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/mcore/../../opcodes -g -O2 -c -o interp.o -MT interp.o -MMD -MP -MF .deps/interp.Tpo ../../../binutils-gdb/sim/mcore/interp.c ../../../binutils-gdb/sim/mcore/interp.c: In function ‘handle_trap1’: ../../../binutils-gdb/sim/mcore/interp.c:559:22: warning: implicit declaration of function ‘link’ [-Wimplicit-function-declaration] cpu.gr[RET1] = link ((char *) a[0], (char *) a[1]); ^ ../../../binutils-gdb/sim/mcore/interp.c:585:22: warning: implicit declaration of function ‘access’ [-Wimplicit-function-declaration] cpu.gr[RET1] = access ((char *) a[0], a[1]); ^ 2015-02-11 Chen Gang <gang.chen.5i5j@gmail.com> * interp.c: Include "unistd.h".
2015-02-03sim: Be sure of calling freeargv() after successfully call buildargv().Chen Gang1-0/+3
Or there will be memory leak. 2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com> * mcore/interp.c (sim_do_command): Call freeargv() before return.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker3-3/+3
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-02-17sim: delete duplicate SIGINT handlingMike Frysinger2-10/+6
Many of the simulators change the SIGINT handler. E.g., moxie/interp.c: sigsave = signal (SIGINT, interrupt); However, this is unnecessary. remote-sim.h already provides an API for asynchronously stopping a sim; and both gdb and the drivers (run.c and nrun.c at least, I didn't check the others) install a SIGINT handler which calls this method. URL: https://sourceware.org/bugzilla/show_bug.cgi?id=16450 Reported-by: Tom Tromey <tromey@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker3-3/+3
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-01-01Update years in copyright notice for the GDB files.Joel Brobecker3-5/+3
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-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-20 PR 14072Hans-Peter Nilsson2-0/+6
* interp.c: Include config.h before system header files.
2012-03-24[PATCH] sim: make sure to include strsignal prototypeMike Frysinger4-126/+225
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 Brobecker3-6/+5
gdb/ChangeLog: Copyright year update in most files of the GDB Project.