summaryrefslogtreecommitdiff
path: root/sim/bfin
AgeCommit message (Collapse)AuthorFilesLines
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-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 Tromey1-4/+4
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 Brobecker75-75/+75
2013-09-23Regenerate sim configure files to pick up support for powerpc64le inAlan Modra2-5/+15
libtool.m4.
2013-06-24sim: bfin: note missing parallel handling of SEARCHMike Frysinger2-0/+18
The SEARCH insn is an oddball when it comes to parallel usage. It places a big limit on what other insns it can run in parallel with, but we don't currently track the amount of state needed to verify this (since no other insn really requires this). Add a note for now in case we get around to it.
2013-06-24sim: bfin: handle invalid HLs encoding in dsp shift insnsMike Frysinger2-5/+16
For many of the 32bit dsp shift related insns, we were just ignoring the HLs field. The hardware does not though and will reject the insn if it's set incorrectly. Update the sim to match.
2013-06-19sim: bfin: stricter insn decodingMike Frysinger2-50/+86
We wrote a test case that tries every single 32bit opcode on the hardware and compared it to the sim. There were a bunch of places in the sim where we weren't strict enough (requiring certain parts of the opcode be set) so we were treating a lot of invalid opcodes as valid ones. This sprinkles out a lot additional checks in the dsp32alu class. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-06-17sim: bfin: add flush/HWERR todoMike Frysinger2-0/+8
2013-06-10sim: bfin: only regen linux-fixed-code.h in maintainer modeMike Frysinger2-1/+6
Since many people don't have a Blackfin toolchain available, only try to regenerate the header file when in maintainer mode. This file rarely changes, and when it does, we commit the generated output, so there's almost never a need to run directly on an end system.
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-26sim: rewrite SIM_AC_OPTION_HARDWARE a bit to simplify thingsMike Frysinger3-32/+87
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-232013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill3-28/+28
* configure.ac: Use $SIM_DV_SOCKSER_O. * configure: Regenerated.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker75-75/+75
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-12-20Revert GPL version change in sim/bfin/aclocal.m4Joel Brobecker2-1/+7
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-20Revert GPL version change in linux-fixed-code.s.Joel Brobecker2-1/+6
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-19[sim] Update old contact info in GPL license noticesJoel Brobecker1-2/+1
sim/ChangeLog: Update old contact info in GPL license notices.
2012-12-19Update sim copyright headers from GPLv2-or-later to GPLv3-or-later.Joel Brobecker2-2/+2
gdb/sim/ChangeLog: Update the non-FSF-copyrighted files in sim to GPLv3 or later.
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-01sim: bfin: set bfrom alias field to correct sizeMike Frysinger2-10/+17
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-01sim: bfin: update return value in bfin_reg_{fetch,store}Mike Frysinger2-4/+10
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-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-04-09sim: bfin: new PINT modelMike Frysinger7-1/+386
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-09sim: bfin: new GPIO modelMike Frysinger7-1/+352
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-09sim: bfin: fix ASTAT issues in immediate shiftsMike Frysinger2-17/+64
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-09sim: bfin: fix ASTAT/correctness issues with arithmetic shiftsMike Frysinger2-10/+67
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-09sim: bfin: more parallel insn checksMike Frysinger2-18/+84
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-09sim: bfin: keep track of the exact position of parallel insnsMike Frysinger3-44/+75
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-08sim: bfin: drop excess space in negation insnMike Frysinger2-1/+5
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-01sim: bfin: throw VEC_ILGAL_I with 32bit insn in group1/group2 slotsMike Frysinger2-0/+8
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-01sim: bfin: simplify field width processing and fix build warningsMike Frysinger2-10/+6
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-01sim: bfin: fix unused bfrom handling for BF535Mike Frysinger2-1/+5
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-01sim: bfin: fix build warning/style with auxvt_sizeMike Frysinger2-2/+7
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-03-31sim: bfin: fix typo in BF54x SIC initMike Frysinger2-1/+5
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-31sim: bfin: include devices.h to fix build warningsMike Frysinger2-0/+5
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-24[PATCH] sim: make sure to include strsignal prototypeMike Frysinger4-150/+267
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-19sim: bfin: fix corner case Logical shift issuesMike Frysinger2-45/+64
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-19sim: bfin: ebiu_amc: push down hardcoded base addressesMike Frysinger2-2/+12
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-19sim: bfin: use ARRAY_SIZEMike Frysinger2-1/+6
Rather than hardcode the constant, use ARRAY_SIZE to get it. Should be no functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-04sim: bfin: drop old linux/mii.h workaroundsMike Frysinger5-23/+35
We had some workarounds for old linux/mii.h headers, but it breaks with newer ones. So tweak the checks a bit to work with newer ones. We'll worry about older systems once someone complains. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker71-71/+71
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-12-03sim: bfin: lookup target strings when tracing system callsMike Frysinger2-10/+41
Parsing target addresses is hard if not generally useless, so use the new cb_get_string function to lookup the associated strings as well. Now the trace output is quickly useful instead of just marginally so. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-03sim: generate build dependencies on the flyMike Frysinger4-34/+306
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-19sim: dv-cfi: check for log2 support in libm when enabledMike Frysinger2-0/+52
The dv-cfi model uses log2() internally, so make sure we automatically link in libm when required. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-18sim: rename common/aclocal.m4 to common/acinclude.m4Mike Frysinger4-8/+18
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-18sim: move from common.m4 to SIM_AC_COMMONMike Frysinger3-364/+353
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-09-29sim: bfin: use store buffer for VIT_MAX insnsMike Frysinger2-2/+6
The VIT_MAX insns can be used in parallel, so we need to use the store buffer so we don't clobber the output register before we get a chance to do a memory store with it. Reported-by: Kai Iskratsch <kai@stella.at> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-05sim: start a unified sim_do_commandMike Frysinger2-7/+4
Since sim_do_command for many people simply calls sim_args_command, start a unified version of it. For people who handle their own options, they could switch to this by using sim_add_option_table instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org>