Commit Graph

122 Commits

Author SHA1 Message Date
H.J. Lu 72f4393d8c Remove leading/trailing white spaces in ChangeLog 2015-07-24 04:16:47 -07:00
Mike Frysinger 8d0978fb4b sim: use AS_HELP_STRING everywhere
This helps standardize the configure --help output.
2015-06-23 15:02:08 -04: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 a348708291 sim: drop -DTRACE from configure
No code uses this anymore and the symbol conflicts with the new TRACE
helper.  Punt it from configure.
2015-06-12 10:40:46 -04:00
Mike Frysinger 296730a52b sim: erc32: restore attribution 2015-05-17 17:15:36 +08:00
Joel Brobecker 17d88f73c0 Switch erc32 simulator copyright headers to FSF.
Permission was granted by Jiri Gaisler, who has a copyright assignment
on file for GDB.

sim/erc32/ChangeLog:

        * configure.ac: Add copyright header.
        * erc32.c: Change copyright holder to FSF.  Reformat.
        * exec.c, float.c, func.c, interf.c, sis.c, sis.h: Likewise.
        * help.c, startsim: Add copyright header.
2015-05-08 07:23:15 -07:00
Nick Clifton 0a13382c8e Fix problems in the sim sources discovered by running the cppcheck static analysis tool.
erc32	PR 18273
	* sis.c (main): Remove unreachable code.

m68hc11	* gencode.c (gen_fetch_operands): Remove unreachable code.

ppc	* hw_htab.c (htab_map_binary): Fix overlap check.

common	* sim-fpu.c (INLINE_SIM_FPU): Fix static analysis warning by
	increasing parenthesis around casts to signed values.
2015-04-29 16:02:02 +01:00
Nick Clifton de7669bfa5 Fix typos in sim sources exposed by static analysis.
bfin	PR 18273
	* bfin-sim.c (decode_dsp32alu_0): Remove spurious check for
	s == 1.

erc32	PR 18273
	* exec.c (add32): Fix typo in check for overflow.

igen	PR 18273
	* misc.c (a2i): Fix typos checking for uppercase letters.
2015-04-24 15:43:21 +01:00
Jiri Gaisler d3e9b40afb sim/erc32: Switched emulated memory to host endian order.
Change data ordering in emulated memory from target order (big endian)
to host order. Improves performance and simplifies most memory
operations. Requires some byte twisting during stores on little
endian hosts (intel). Also removed support for little-endian binaries.
2015-04-19 02:29:44 -04:00
Mike Frysinger bf12d44ee0 sim: fix the PKGVERSION define
This should be SIM, not GDB.
2015-04-13 02:41:10 -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
Jiri Gaisler 510d27512c sim/erc32: Fix a few compiler warnings 2015-03-28 03:05:35 -04:00
Jiri Gaisler 102b920e11 sim/erc32: Use memory_iread() function for instruction fetching.
Use separate memory_iread() function for instruction fetching.
Speeds up execution and allows addition of an MMU at a later stage.
2015-03-28 03:00:19 -04:00
Mike Frysinger 5831e29bc1 sim: erc32: strip paren from return statements 2015-03-28 02:57:08 -04:00
Mike Frysinger 523ba8f92e sim: erc32/h8300/m68hc11: trim unused functions
These funcs are only used with the old run.o, and these sims use nrun.o,
so drop these stub funcs.
2015-03-24 00:48:40 -04:00
Jiri Gaisler b9f9ea2f5d sim/erc32: Removed type mismatch compiler warnings 2015-03-17 18:58:14 -04:00
Jiri Gaisler 638fcdad6a sim/erc32: Added -v command line switch for verbose output 2015-03-17 18:51:44 -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
Jiri Gaisler 9c5f41df36 sim/erc32: use SIM_AC_OPTION_HOSTENDIAN to probe for host endianess 2015-03-16 01:16:35 -04:00
Mike Frysinger 465fb143c8 sim: make nrun the default run program
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-14 07:02:58 -04:00
Mike Frysinger 5cddc23a3a sim: drop duplicate header checks
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific
sim ports need not do it themselves.
2015-03-14 06:04:29 -04:00
Jiri Gaisler 5634e839cc sim/erc32: Use readline.h for readline types and functions.
Use gdb's readline.h for readline types.
2015-02-22 15:57:25 -05:00
Jiri Gaisler 96d6709579 sim/erc32: Fix incorrect simulator performance report 2015-02-21 23:27:24 -05:00
Jiri Gaisler bb6ead917c sim/erc32: Remove unused defines in Makefile and switch off statistics 2015-02-21 23:22:10 -05:00
Jiri Gaisler 0172ee3adc sim/erc32: Use fenv.h for host FPU access 2015-02-21 23:20:09 -05:00
Jiri Gaisler 20a0ffe33a sim/erc32: Perform pseudo-init if binary linked to non-zero address.
Binaries produced by most erc32 tool-chains do not include
system initialization. sis will detect this and initialize
necessary registers for memory and timer control.
2015-02-21 23:18:23 -05:00
Jiri Gaisler df9bc4163b sim/erc32: Corrected wrong CPU implementation and version ID in psr 2015-02-21 23:11:36 -05:00
Jiri Gaisler 53b5af48f6 sim/erc32: Disassembly in stand-alone mode did not work.
The API to print_insn_sparc() has changed over the years ...
2015-02-21 23:10:57 -05:00
Alan Modra 2974be626b Fix --diable-shared --enable-plugins build breakage
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-19 21:59:56 +09:30
Roland McGrath faa743bb1b Regenerate sim configury. 2014-08-15 15:51:50 -07:00
Mike Frysinger 60d847df0b sim: constify arg to sim_do_command
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-10 22:57:29 -04:00
Mike Frysinger b2b255bdf3 sim: constify prog_name
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-05 01:42:44 -05:00
Sergio Durigan Junior 40776d1927 sim/erc32/ChangeLog:
2013-10-09  Sergio Durigan Junior  <sergiodj@redhat.com>

	PR sim/16018:
	* float.c (set_fsr): Add missing "break" statements.  Reindent
	code.
2013-10-09 21:42:11 +00:00
Alan Modra bf3d9781ec Regenerate sim configure files to pick up support for powerpc64le in
libtool.m4.
2013-09-23 00:32:27 +00:00
Mike Frysinger 31e6ad7d64 sim: use AM_MAINTAINER_MODE
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-06-05 01:42:13 +00:00
Joel Brobecker 7b7f7f41a8 Fix erc32 simulator out-of-tree build failure.
sim/erc32/ChangeLog:

        * Makefile.in: Include build directory in search path to find
        config.h
2013-03-14 23:33:57 +00:00
Nick Clifton 4232dbd154 oops - acxidentally omitted from previous delta. 2012-08-16 08:38:45 +00:00
Joel Brobecker 9a210f3097 sim/erc32/sys.h: Include "config.h".
This file includes "gdb/callback.h", which includes "bfd.h", which
itself verifies that "config.h" was included earlier.

sim/erc32/ChangeLog:

        * sys.h: Include "config.h".
2012-06-15 17:20:30 +00:00
Joel Brobecker 5f3ef9d035 Define PACKAGE macro in all sims' config.h.
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-06-15 17:20:10 +00:00
Pedro Alves a493e3e2e4 gdb/
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-05-24 16:51:47 +00:00
Mike Frysinger e6ab98cd1c sim: add bugzilla marking 2012-03-27 04:18:05 +00:00
Mike Frysinger 2232061b1c [PATCH] sim: make sure to include strsignal prototype
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-03-24 05:38:43 +00:00
Mike Frysinger b909d38dfa sim: erc32: fix linking against local readline on modern (ncurses) systems
The current erc32 configure script only searches for -ltermcap to provide
any termcap funcs (which readlines needs).  When building against a local
readline (which is static), we hit link failures like so:
  gcc ...-I/-D flags... -o sis \
    sis.o exec.o erc32.o func.o help.o float.o \
    ../../bfd/libbfd.a ../../opcodes/libopcodes.a \
    ../../libiberty/libiberty.a -lz -lnsl \
    ../../readline/libreadline.a -lm
  ../../readline/libreadline.a(display.o): In function 'cr':
  .../readline/display.c:2486: undefined reference to 'tputs'
  collect2: ld returned 1 exit status
  make[2]: *** [sis] Error 1

Use AC_SEARCH_LIBS from gdb's configure.ac as suggested by Joel Brobecker
to check for additional termcap providers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-31 07:06:47 +00:00
Mike Frysinger db2e4d67e7 sim: generate build dependencies on the fly
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-12-03 18:23:51 +00:00
Mike Frysinger 9c082ca86e sim: rename common/aclocal.m4 to common/acinclude.m4
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>
2011-10-18 00:31:00 +00:00
Mike Frysinger 6ffe910a7e sim: move from common.m4 to SIM_AC_COMMON
Now that the sourceware tree generally requires autoconf-2.64, update
the sim tree to require that too.

This allows us to drop the long standing SIM_AC_COMMON/common.m4
workaround as autoconf 2.64+ seems to work for me.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-18 00:17:24 +00:00
Mike Frysinger ce6f492fff sim: erc32: ignore --sysroot that gdb passes down 2011-06-09 15:33:03 +00:00
Joel Brobecker 248d2a8fdc Add `sim_complete_command' definition to erc32 sim
This patch fixes a build failure at link time due to
sim_complete_command being undefined.  There was a recent change
that added this function to all the ports that do not use the
common/ subdir.  But somehow, the erc32 port got missed.

sim/erc32/ChangeLog:

        * interf.c (sim_complete_command): New stub function.
2011-06-01 17:35:02 +00:00
Andrew Burgess dae477fed8 http://sourceware.org/ml/gdb-patches/2010-11/msg00112.html
gdb/ChangeLog
	* remote-sim.c (gdbsim_store_register): Update API to
	sim_store_register to check more error conditions.
include/gdb/ChangeLog
	* remote-sim.h (sim_store_register): Update the API
	documentation for this function.
sim/erc32/ChangeLog
sim/h8300/ChangeLog
sim/m32c/ChangeLog
sim/mn10300/ChangeLog
sim/ppc/ChangeLog
sim/rx/ChangeLog
sim/v850/ChangeLog
	* ???.c (sim_store_register): Update return value to
	match new API.
2011-01-11 14:19:34 +00:00
Joel Brobecker 2464c810c2 Fix erc32 sim build failure due to missing stdint.h.
* sis.h: Remove #include <stdint.h>.
        (uint64, int64): Redefine without using stdint.h.
        (UINT64_MAX): Define.
2010-05-20 23:10:24 +00:00