Commit Graph

3396 Commits

Author SHA1 Message Date
Mike Frysinger 590919de6c sim: arm: add support for MOVW and MOVT instructions
From: Jayant R. Sonar <Jayant.Sonar@kpitcummins.com>

This patch adds simulator support for handling the armv7 instructions
'movw (immediate)' and 'movt'.

Compiler frequently use these instructions to load the 32bit addresses of
global variables, string pointers etc. into the general registers.

In absence of support of these instructions:
1. GDB run simulator fails to print even simple "hello world" string
   on console.
2. Loading of global variable addresses into the registers fail causing
   arithmetic operation failures.

Patch has been regression tested for arm-none-eabi (-march=armv7-a).
2013-05-15 17:49:44 +00:00
Nick Clifton fd7b2a545d * v850.igen (LDSR): Accept but ignore a selID parameter. 2013-05-13 10:52:52 +00:00
Tom Tromey d3685d60d6 gdb
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-05-10 16:10:40 +00:00
Joel Brobecker b21c850d8f Move ChangeLog entry from sim/ to sim/ppc/...
... where it belongs.
2013-05-06 10:26:41 +00:00
Hafiz Abid Qadeer 3fd5675a52 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
revert:
	2013-04-19  Nathan Froyd  <froydnj@codesourcery.com>
	* ppc-instructions (isel): New instruction.
2013-05-03 14:03:57 +00:00
Hafiz Abid Qadeer 8bf54274ec 2013-04-19 Nathan Froyd <froydnj@codesourcery.com>
* ppc-instructions (isel): New instruction.
2013-04-19 18:17:32 +00:00
Mike Frysinger 73e76d2003 sim: frv/m32r: back out hard failure when dv-sockser is not available
These sims have optional support for the dv-sockser model, so do not make
them hard failures.  The Makefile made it seem like they didn't actually
support things dynamically, but a further code dive into the source and
the Makefile shows that things work out.
2013-03-31 00:39:35 +00:00
Mike Frysinger 1517bd2742 sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify things
There's no need to put the majority of the logic into the 3rd arg of the
AC_ARG_ENABLE.  Coupled with the lack of indentation, it makes it hard to
follow, error prone to update, and duplicates code (with the 4th arg).

So pull the logic out of the 3rd arg and outside of the AC_ARG_ENABLE
macro.  This allows us to gut the 4th arg entirely, merge with the code
that followed the macro, and fix bugs related to the new dv-sockser in
the process.

Hopefully building the various sims with the default sim-hardware
settings, as well as with explicit --{dis,en}able-sim-hardware flags,
should all just work now.
2013-03-26 18:00:04 +00:00
Joel Sherrill 256139f50b 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Use $SIM_DV_SOCKSER_O.
	* configure: Regenerated.
2013-03-23 15:08:07 +00:00
Joel Sherrill 94c63d78f6 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Fail if dv-sockser.o not available.
	Error when --disable-sim-hardware is specified.
	* configure: Regenerated.
2013-03-23 15:07:30 +00:00
Joel Sherrill fb61c40add 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Fail if dv-sockser.o not available.
	Error when --disable-sim-hardware is specified.
	* tconfig.in: Conditionalize use of dv_sockser_install.
	* configure: Regenerated.
	* config.in: Regenerated.
2013-03-23 15:06:59 +00:00
Joel Sherrill 3be3151681 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Address use of dv-sockser.o.
	* tconfig.in: Conditionalize use of dv_sockser_install.
	* configure: Regenerated.
	* config.in: Regenerated.
2013-03-23 15:05:07 +00:00
Joel Sherrill 3fd38161b3 2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* acinclude.m4: Add SIM_DV_SOCKSER_O which is empty  on hosts
	which do not support dv-sockser.o.  Add always as option to
	first argument to SIM_AC_OPTION_HARDWARE. Fail if hardware
	is always required to be enabled by simulator.
2013-03-23 15:03:01 +00:00
Steve Ellcey 3cb2ab1a46 gdb:
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-03-15 17:53:44 +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 67d7515b0a * simops.c (v850_rotl): New function.
(v850_bins): New function.
	* simops.h: Add prototypes fir v850_rotl and v850_bins.
	* v850-dc: Add entries for V850e3v5.
	* v850.igen: Add support for v850e3v5.
	(ld.dw, st.dw, rotl, bins): New patterns.
2013-01-28 10:06:51 +00:00
Anthony Green 9c9e1b263d Remove debug output 2013-01-17 09:44:53 +00:00
Nick Clifton 04e65a62c6 * rx.c (decode_opcode): Handle RXO_satr. 2013-01-16 10:45:22 +00:00
Nick Clifton 853678261b * interp.c (sim_open): Add support for bfd_arch_v850_rh850
architecture type.  Add support for bfd_mach_v850e2 and
	bfd_mach_v850e2v3 machine numbers.
        * v850.igen (dbtrap): Add support for SIM_OPEN_DEBUG.
        (cmpf.d): Correct order of operands.
        (cmpf.s): Likewise.
        (trncf.dul): New pattern.
        (trncf.duw): New pattern.
        (trncf.sul): New pattern.
        (trncf.suw): New pattern.
        * v850-dc: Correct bitfield selection for TRNCF.SW and CVTF.SW.
2013-01-10 09:57:02 +00:00
Nick Clifton 69276d0264 * mem.c (MDBL): Correct value.
(MDBH): Correct value.
2013-01-08 15:05:00 +00:00
Joel Brobecker 8acc9f485b Update years in copyright notice for the GDB files.
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.
2013-01-01 06:41:43 +00:00
Joel Brobecker 048a61aa6b Revert GPL version change in sim/bfin/aclocal.m4
sim/bfin/ChangeLog:

        * aclocal.m4: Revert the previous change changing
        the license from GPL v2 or later to GPL v3 or later
        (this file was generated).
2012-12-20 05:01:54 +00:00
Joel Brobecker d2cec11135 Revert GPL version change in linux-fixed-code.s.
sim/bfin/ChangeLog:

	* linux-fixed-code.s: Revert the previous change changing
	the license from GPL v2 or later to GPL v3 or later.
2012-12-20 04:18:53 +00:00
Joel Brobecker 19a3671ce8 Update sim's COPYING files.
sim/arm/ChangeLog:

	* COPYING: Update to GPL version 3.

sim/ppc/ChangeLog:

	* COPYING: Update to GPL version 3.
2012-12-19 07:19:14 +00:00
Joel Brobecker 51b318dec8 [sim] Update old contact info in GPL license notices
sim/ChangeLog:

        Update old contact info in GPL license notices.
2012-12-19 07:18:22 +00:00
Joel Brobecker 3fd725ef34 Update sim copyright headers from GPLv2-or-later to GPLv3-or-later.
gdb/sim/ChangeLog:

        Update the non-FSF-copyrighted files in sim to GPLv3 or later.
2012-12-19 07:12:02 +00:00
H.J. Lu 6bb11ab3b2 Fix sim build when configured with --enable-plugins
* 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-11-20 14:41:26 +00:00
Stephane Carrez 2d1ef085ab * MAINTAINERS: Update my email address. 2012-11-05 22:08:10 +00:00
Steve Ellcey 37cb8f8e70 2012-10-04 Chao-ying Fu <fu@mips.com>
Steve Ellcey  <sellcey@mips.com>

	* mips/mips3264r2.igen (rdhwr): New.
2012-10-03 21:11:46 +00:00
Steve Ellcey c429cfcf4b Forgot to include ChangeLog in last checkin. 2012-09-24 18:04:03 +00:00
Steve Ellcey cc2202431b 2012-09-24 Steve Ellcey <sellcey@mips.com>
* mips/basic.exp: Add mips*-mti-elf* target.
	* configure.ac: Add mips*-mti-elf* target.
	* configure: Regenerate.
2012-09-24 18:03:18 +00:00
Nick Clifton d99ff40fae * v850.igen (W,WWWW): Correct computation of register number.
(JR32): Remove unnecessary comma.
	(cmovf.s): Register 0 is an invalid source register.
	(maddf.s): Remove bogus intermediary rounding.
	(nmaddf.s): Likewise.
	(trncf.sl): Remove bogus initial rounding.
	(trncf.dw): Likewise.
	(trncf.sl): Likewise.
	(trncf.sw): Likewise.
2012-09-13 08:09:26 +00:00
Anthony Green 78ca4e81ff Adjust for branch target encoding change 2012-09-08 01:26:07 +00:00
Joel Sherrill 87c8644f8b 2012-09-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Always link against dv-sockser.o.
	* configure: Regenerate.
2012-09-04 21:40:46 +00:00
Nick Clifton f253d86d7f PR sim/14540
* armsupp.c (ARMul_MRC): Return 0 if access to the MRC instruction
	is denied.
2012-09-03 10:13:11 +00:00
Mike Frysinger 3f170f377b sim: cr16: update syscall list 2012-08-30 07:05:19 +00:00
Mike Frysinger 5a06d7c470 sim: cr16: improve trap handling 2012-08-30 06:10:28 +00:00
Mike Frysinger 4881a75b8b sim: cr16: add sim_complete_command stub 2012-08-30 06:09:45 +00:00
Nick Clifton 4232dbd154 oops - acxidentally omitted from previous delta. 2012-08-16 08:38:45 +00:00
Nick Clifton 5272643fad * end.c: Include config.h before system header files.
* erc32.c: Likewise.
	* exec.c: Likewise.
	* float.c: Likewise.
	* func.c: Likewise.
	* help.c: Likewise.
	* interf.c: Likewise.
2012-08-16 07:56:19 +00:00
Kevin Buettner 9256caa604 * wrapper.c (libiberty.h): Include.
(sim_store_register, sim_fetch_register): On success, return
	length, instead of -1.
2012-08-01 14:38:19 +00:00
Mike Frysinger 040a4d109e sim: bfin: set bfrom alias field to correct size
When the sim is built w/out the bfroms, we end up passing a length of 0 when
mapping the rom region which the core sim code rejects.  So add an alias field
equal to the length to avoid that error.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-01 03:31:55 +00:00
Mike Frysinger b5539f23a0 sim: bfin: update return value in bfin_reg_{fetch,store}
The latest gdb sim-remote.c really wants a return value from the fetch/store
register functions, so update the Blackfin sim to avoid the warnings/errors.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-01 03:22:32 +00:00
Joel Brobecker d0a5a356aa include "config.h" instead of BFD's sysdep.h in d10v/interp.c
The change of include file introduces some new warnings about functions
being used without a prototype. So a few more system includes have been
added to compensate for that.

sim/d10v/ChangeLog:

        * interp.c: #include "config.h" instead of "sysdep.h".
        Add conditional include of string.h or strings.h, as well as
        conditional include of stdlib.h.
2012-06-19 22:46:57 +00:00
Mike Frysinger 2668799911 sim: cr16: include config.h rather than sysdep.h from bfd 2012-06-17 23:34:17 +00:00
Mike Frysinger a6c2b87eec sim: moxie: fix build by including config.h first 2012-06-17 23:33:42 +00:00
Hans-Peter Nilsson e8c21678a4 * interp.c: Include config.h first. Do not include sysdep.h. 2012-06-17 18:56:31 +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
Nick Clifton b0f0569128 * wrapper.c (sim_create_inferior): Treat WMMX2 binaries as iWMMXt
binaries (for now).
2012-06-13 10:07:11 +00:00
Michael Eager 8fe6640e15 Move config.h to start of includes. 2012-06-06 21:50:03 +00:00
Michael Eager f5546abd5e Add #include "config.h". 2012-06-06 15:05:23 +00:00
Pedro Alves 2c1fa544e1 2012-05-24 Pedro Alves <palves@redhat.com>
* sim-signal.h (sim_signal_to_target): Rename to ...
	(sim_signal_to_gdb_signal): ... this.
	* sim-signal.c (sim_signal_to_target): Rename to ...
	(sim_signal_to_gdb_signal): ... this.
	* sim-reason.c (sim_stop_reason): Adjust to rename.
2012-05-24 17:38:54 +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
Pedro Alves 2ea286498f 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

	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.
2012-05-24 16:39:15 +00:00
Hans-Peter Nilsson 3550b23619 PR 14072
* interp.c: Include config.h before system header files.
2012-05-20 05:34:23 +00:00
Nick Clifton a6ff997ce8 PR 14072
* wrapper.c: Include config.h before system header files.

	* callback.c: Include config.h before system header files.
	* cgen-trace.c: Likewise.
	* cgen-utils.c: Likewise.
	* gentmap.c: Likewise.

	* sim-if.c: Include config.h before system header files.

	* compile.c: Include config.h before system header files.
	* sim-main.h: Likewise.

	* gdb-if.c: Include config.h before system header files.
	* load.c: Likewise.
	* syscalls.c: Likewise.
	* trace.c: Likewise.

	* interp.c: Include config.h before system header files.
2012-05-19 16:46:16 +00:00
Mike Frysinger 050396e533 sim: bfin: new PINT model
Newer BF54x parts feature an updated GPIO block where all the interrupt
handling is split off, so create a new model for the pin interrupts.

This is missing the port forwarding aspects, but at least the register
interface should be there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 06:13:06 +00:00
Mike Frysinger 07c5891d6c sim: bfin: new GPIO model
Newer BF54x parts feature an updated GPIO block, so create a new
model for it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 06:11:41 +00:00
Mike Frysinger 740d60f83d sim: bfin: add shift astat tests
These are randomly generated tests to track down issues in ASTAT
handling with shift insns.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 05:59:55 +00:00
Mike Frysinger c0c463826f sim: bfin: fix ASTAT issues in immediate shifts
More ASTAT directed fixes, but this time at the dsp32shift insns.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 05:56:32 +00:00
Mike Frysinger ef0b041e05 sim: bfin: fix ASTAT/correctness issues with arithmetic shifts
This improves some of the arithmetic shifts to better match the
hardware (especially wrt ASTAT behavior).  We hit areas where
the published documentation is thin so we have to rely on tests
run on the hardware to figure out how things should behave.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 05:52:38 +00:00
Mike Frysinger e0dc84cdd4 sim: bfin: more astat tests
These are the randomly generated tests that directed some of the recent
astat related fixes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 05:24:57 +00:00
Mike Frysinger e8c9a03df0 sim: bfin: enable some parallel tests
Now that we check for valid sub-insns in parallel insns, we can
enable the tests that explicitly validate those code paths.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 04:18:56 +00:00
Mike Frysinger ab04c00066 sim: bfin: more parallel insn checks
Now that we keep track of the exact parallel insn slot we're in, we can
make sure that the current insn being decoded is valid for that slot.
This brings us much closer to the hardware in flagging invalid parallel
insn combinations.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 03:59:10 +00:00
Mike Frysinger 99265d6b00 sim: bfin: keep track of the exact position of parallel insns
Some insns need to know which slot they're in to determine whether they
are valid.  So add an enum for each slot, and check that rather than the
overall insn len.  This makes tracking things in the code much clearer.
However, this code is functionally the same, so a follow up patch will
leverage this more to properly flag invalid parallel insn combos.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 03:49:30 +00:00
Mike Frysinger 8faad9bd0f sim: bfin: unify se_all helpers more
Now that we have the se_all helpers together and working, we can see
what pieces are duplicated in each test and unify them in the common
header file.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-09 03:42:43 +00:00
Mike Frysinger a8a0e37c8b sim: bfin: drop excess space in negation insn
The amod1 helper includes a leading space so it can expand into the empty
string when need be, which means the caller need not add spacing itself.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-08 20:48:20 +00:00
Mike Frysinger ffbc20d913 sim: fix spelling typo 2012-04-02 05:21:59 +00:00
Mike Frysinger 1d18e9892e sim: bfin: throw VEC_ILGAL_I with 32bit insn in group1/group2 slots
Parallel insns can only do one 32bit, then two 16bits.  So if we see
a 2nd 32bit insn after the first 32bit in a parallel insn, abort.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-01 04:31:46 +00:00
Mike Frysinger 2fa7a0570b sim: bfin: simplify field width processing and fix build warnings
This fix the build time warning:
warning: format not a string literal, argument types not checked [-Wformat-nonliteral]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-01 04:23:40 +00:00
Mike Frysinger 02bb38cc80 sim: bfin: fix unused bfrom handling for BF535
machs.c: In function 'bfin_model_cpu_init':
machs.c:1657:1: warning: 'bfrom' may be used uninitialized
	in this function [-Wuninitialized]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-01 04:21:03 +00:00
Mike Frysinger e4967d72f9 sim: bfin: fix build warning/style with auxvt_size
Fix warning about mixing decls and code by moving auxvt_size decl
down to the scope where it is used.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-01 02:39:12 +00:00
Mike Frysinger 8d72c97073 sim: bfin: fix typo in BF54x SIC init
The current code triggers a warning:
dv-bfin_sic.c: In function 'bfin_sic_finish':
dv-bfin_sic.c:930:41: warning: operation on 'sic-><U78e8>.bf54x.iwr1'
	may be undefined [-Wsequence-point]

This points out the IWR2 register was not being setup because of a typo.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-31 18:48:20 +00:00
Mike Frysinger a4a66f7132 sim: bfin: include devices.h to fix build warnings
The place where these funcs get defined do not include the header that
declares their prototypes.  Add that to fix -Wmissing-prototypes:

devices.c:59:1: warning: no previous prototype for 'dv_bfin_mmr_invalid'
devices.c:66:1: warning: no previous prototype for 'dv_bfin_mmr_require'
devices.c:99:1: warning: no previous prototype for 'dv_bfin_mmr_check'
devices.c:159:14: warning: no previous prototype for 'dv_get_bus_num'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-31 18:44:43 +00:00
Kevin Buettner 2aaed97917 Commit gdb and sim support for v850e2 and v850e2v3 on behalf of
Rathish C <Rathish.C@kpitcummins.com>.
2012-03-29 00:57:19 +00:00
Mike Frysinger e6ab98cd1c sim: add bugzilla marking 2012-03-27 04:18:05 +00:00
Mike Frysinger a35a332283 sim: add a proper sim_core_trans_addr prototype
The common code has a sim_core_trans_addr() helper that only the m32r code
uses.  Move the inline extern in the m32r code to the proper common header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26 02:18:43 +00:00
Mike Frysinger 44ac5dbe32 sim: bfin: skip .c/.S tests if no compiler is available
Similar to logic in the cris exp, attempt a simple compile and if it fails
(presumably due to the compiler being broken), skip all the related tests.
Fortunately, most tests (~600 out of ~800) are pure assembly, so people should
still get pretty good coverage.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-25 16:51:46 +00:00
Mike Frysinger 45e4eeb430 sim: bfin: disable redundant test that makes 32bit gas angry 2012-03-25 07:56:12 +00:00
Mike Frysinger 8f784a0e6a sim: bfin: fix typos in large constants in tests
Truncate constants that are larger than 32bits but get loaded into 32bit
registers.  These high bits don't get used and don't really make sense.
2012-03-25 06:43:43 +00:00
Hans-Peter Nilsson f914e38494 * nrun.c: Add #ifdef HAVE_CONFIG_H and associated includes stanza
missing in last change.
2012-03-24 09:31:09 +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 ad03ad841d sim: testsuite: regen configure after rl78 addition 2012-03-24 05:37:10 +00:00
Mike Frysinger a9c90fc78f sim: cris: update testsuite output after strsignal change 2012-03-24 05:33:42 +00:00
Mike Frysinger 8fe8b60120 sim: testsuite: regen configure after rl78 addition 2012-03-23 04:30:55 +00:00
Mike Frysinger abcee8fd25 sim: rx: fix warnings with AC_DEFINE
This lets `autoheader` work again.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-23 04:00:59 +00:00
Mike Frysinger ac0aacdffa sim: sync build_warnings handling with gdb
The sim code gets the logic for SIM_AC_OPTION_WARNINGS from gdb, but
it hasn't been updated in a good long while.  Sync with the latest
gdb code.

There is a sim specific change in here: we disable -Werror for now.
This is because all sim code atm contains warnings.  Will probably
have to slowly add a white list of targets which can tolerate this
until everyone is updated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-23 03:27:44 +00:00
Mike Frysinger af209c380f sim: cris: update testsuite output after strsignal change 2012-03-21 04:50:01 +00:00
Mike Frysinger 5c73fae010 sim/testsuite/: split up arch-specific changelogs 2012-03-21 04:46:59 +00:00
Mike Frysinger 565904581b sim: bfin: add exhaustive parallel-insn tests 2012-03-19 05:39:45 +00:00
Mike Frysinger 5f2804c950 sim: bfin: unify se_all*opcodes tests
The current se_all*opcodes tests are very similar in how they work.
In preparation for adding more tests along these lines, unify the
common bits into a framework that others can include and build off
of easily.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 05:34:30 +00:00
Mike Frysinger 6aafca16ed sim: bfin: add tests for new shift behavior 2012-03-19 05:25:50 +00:00
Mike Frysinger dbe9145095 sim: bfin: add tests for new shift behavior 2012-03-19 05:17:50 +00:00
Mike Frysinger e62bb22a4b sim: bfin: fix corner case Logical shift issues
From: Robin Getz <robin.getz@analog.com>

Overflow with shift operations happens independently of saturation, but
we have the logic merged.  Extend the lshift function so that callers
can tell it when to handle each independently, and then do so when it's
needed.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 05:06:23 +00:00
Mike Frysinger 509deab2dc sim: use character classes rather than ranges
A-Z ranges don't work in all locales, so use character classes instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 04:54:48 +00:00
Mike Frysinger 9a5e0c494c sim: nrun: decode signal when crashing
This isn't entirely correct in that it assumes the signal numbering of
the target and host match, but seeing as we already make that assumption
in a few places, this patch doesn't make the situation any worse.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 03:58:36 +00:00
Mike Frysinger 026789b1f8 sim: tests: ignore generated tests 2012-03-19 03:51:09 +00:00
Mike Frysinger 8dbfaed8e2 sim: bfin: ebiu_amc: push down hardcoded base addresses
To make it easier to support ebiu banks at other addresses, move the base to
a runtime parameter rather than structure.  Future work will make this more
dynamic, but I'm waiting for more details first.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 03:09:20 +00:00
Mike Frysinger 191a54be54 sim: bfin: import optimizations from 32bit test into 16bit test
The 32bit allopcodes test had quite a bit of optimization added to it
so that it ran in a reasonable amount of time out of uncached memory.
Port those changes over to the 16bit test so the two share common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-19 02:49:18 +00:00