summaryrefslogtreecommitdiff
path: root/sim
Commit message (Collapse)AuthorAgeFilesLines
* Add support to GDB for the Renesas rl78 architecture.Kevin Buettner2012-02-043-0/+579
|
* sim: headers: use abs_srcdir to find helper scriptsMike Frysinger2012-01-062-2/+9
| | | | | | | | | Trying to run `headers` in an out-of-tree build fails atm due to the relative srcdir paths being used in a location other than where they were setup to be used from. Get abs_srcdir from configure and use that instead where applicable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-04531-772/+577
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* Update the copyright header of various files...Joel Brobecker2012-01-0212-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to follow the correct syntax (according to the gospel of gnulib's update-copyright). In other words: - no comma after the last year; - FSF spelled exactly "Free Software Foundation, Inc.", with the comma and the period at the end. sim/common/ChangeLog: * dv-sockser.h, sim-assert.h, sim-fpu.c: Reformat the copyright header. sim/m32c/ChangeLog: * blinky.S, gloss.S, sample.S: Reformat copyright header. sim/mn10300/ChangeLog: * sim-main.h: Reformat copyright header. sim/ppc/ChangeLog: * dp-bit.c: Reformat copyright header. gdb/ChangeLog: * gdb/common/gdb_thread_db.h, gdb/dbxread.c, gdb/environ.c, gdb/gcore.h, gdb/rs6000-tdep.h, gdb/s390-nat.c, gdb/tic6x-tdep.c: Reformat the copyright header. gdb/gdbserver/ChangeLog: * terminal.h: Reformat copyright header. gdb/testsuite/ChangeLog: * dg-extract-results.sh, gdb.arch/gcore.c, gdb.arch/gdb1558.c, gdb.arch/i386-gnu-cfi.c, gdb.base/complex.c, gdb.base/cvexpr.c, gdb.base/gcore.c, gdb.base/gdb1555-main.c, gdb.base/gdb1555.c, gdb.base/gdb1821.c, gdb.base/long_long.c, gdb.base/restore.c, gdb.base/sepdebug.c, gdb.base/type-opaque-lib.c, gdb.base/type-opaque-main.c, gdb.cp/maint.exp, gdb.cp/namespace1.cc, gdb.cp/pr9631.cc, gdb.cp/psmang1.cc, gdb.cp/psmang2.cc, gdb.cp/try_catch.cc, gdb.cp/virtfunc.cc, gdb.hp/gdb.base-hp/reg.exp, gdb.mi/basics.c, gdb.mi/mi-stack.c, gdb.mi/mi-var-child.c, gdb.mi/mi2-var-child.exp, gdb.mi/var-cmd.c, gdb.threads/thread_check.c: Reformat copyright header.
* sim: erc32: fix linking against local readline on modern (ncurses) systemsMike Frysinger2011-12-313-21/+52
| | | | | | | | | | | | | | | | | | | | 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>
* sim: cr16: add ifdefs around undefined syscallsMike Frysinger2011-12-302-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>
* Work around Solaris bourne shell limitation when building the simJoel Brobecker2011-12-192-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building the sim on a sparc-solaris 2.8 machine fails when configured with no extra sim hardware: > for hw in ; do \ > echo "extern const struct hw_descriptor > dv_${hw}_descriptor[];" ; \ > done >> tmp-hw.h > echo 'const char version[] = "'"`sed q > /[...]/../../gdb/version.in`"'";' > >> version.c-tmp > /bin/sh: -c: line 1: syntax error near unexpected token `;' > /bin/sh: -c: line 1: `for hw in ; do \' > make[3]: *** [hw-config.h] Error 2 The same thing happens with the version of bash that we got from Sun as well (which is very old: 2.03.0(1)-release). The problems comes from the fact that both shells are buggy, and reject the following script: for hw in ; do [...] done The above is what sim/common/Makefile.in tries to execute when generating hw-config.h. In order to allow users to build out of the box on these machines, this patch works around this bug. It does rely on the fact that none of the tokens in SIM_HW contain whitespaces. sim/common/ChangeLog: * Make-common.in (hw-config.h): Work around bug in Solaris 2.8 system bourne shell.
* sim: bfin: lookup target strings when tracing system callsMike Frysinger2011-12-032-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>
* sim: export cb_get_string for people to useMike Frysinger2011-12-032-3/+8
| | | | | | | | The common sim code provides a useful "get_string" function which reads a C string out of the target's memory space. So rename and export it for other people to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: generate build dependencies on the flyMike Frysinger2011-12-0378-233/+7988
| | | | | | | | 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>
* Record Mike Frysinger as a sim Global Maintainer.Joel Brobecker2011-11-292-0/+9
| | | | | | | sim/ChangeLog: * maintainers (global maintainers): new section. add mike frysinger.
* [sim]DJ Delorie2011-11-2918-0/+8641
| | | | | | | | | * configure.tgt: Add rl78 support. * configure: Regenerate. * rl78: New directory. * MAINTAINERS: Add myself as RL78 maintainer. [gdb] * NEWS: Mention RL78 simulator.
* sim: dv-cfi: check for posix_fallocateMike Frysinger2011-11-075-3/+13
| | | | | | | | | Some systems (like OS X) do not have posix_fallocate. Add a configure check for it before we try to use it. This is less work than trying to support old systems. URL: http://sourceware.org/bugzilla/show_bug.cgi?id=13161 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: mn10300: fix typo in if checkMike Frysinger2011-11-072-2/+7
| | | | | | | The code looks like it should be doing a bit check, not logical. URL: http://sourceware.org/bugzilla/show_bug.cgi?id=9302 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 2011-02-11 Ben Golding <ben_golding@yahoo.co.uk>Tom Tromey2011-11-032-0/+5
| | | | * events.c: add #include <stdlib.h> for free(). Fix PR build/13372.
* sim: dv-cfi: check for log2 support in libm when enabledMike Frysinger2011-10-1914-1/+321
| | | | | | | 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>
* [sim]: Only print the profile info title once.Joel Brobecker2011-10-192-1/+6
| | | | | | | sim/common/ChangeLog: From John Wehle <john@feith.com> (tiny patch) * sim-profile.c (profile_info): Only print the title once.
* sim: rename common/aclocal.m4 to common/acinclude.m4Mike Frysinger2011-10-1855-974/+1099
| | | | | | | | 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>
* sim: move from common.m4 to SIM_AC_COMMONMike Frysinger2011-10-1880-9955/+9569
| | | | | | | | | | 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>
* sim: testsuite: regenerate configureMike Frysinger2011-10-182-0/+5
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 2011-10-14 Alexey Makhalov <makhaloff@gmail.com>Tom Tromey2011-10-142-2/+7
| | | | | * sim-alu.h (ALU32_AND): Clear carry flag. (ALU32_AND): Clear carry flag.
* sim: dv-cfi: include stdbool.hMike Frysinger2011-10-102-0/+5
| | | | | | | | The dv-cfi code uses the bool type but doesn't include the stdbool.h header. I didn't notice for Blackfin targets as the core Blackfin header will include stdbool.h, but most targets don't do this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: dv-cfi: include common headers onlyMike Frysinger2011-10-102-1/+6
| | | | | | | | The "devices.h" header is Blackfin-specific, so trying to build dv-cfi for any other target fails. Include the specific hw headers this file needs directly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: merge changes from common.m4 back into SIM_AC_COMMONMike Frysinger2011-10-052-0/+13
| | | | | | | | Seems some fixes were added to the common.m4 file but not the SIM_AC_COMMON macro. Keep the two in sync since they're supposed to be the same thing. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: use store buffer for VIT_MAX insnsMike Frysinger2011-09-294-2/+63
| | | | | | | | | 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>
* sim: include sim-options.h for command prototypeMike Frysinger2011-07-122-0/+5
| | | | | | | The sim_args_command prototype is in sim-options.h, so pull it in directly rather than assuming a common header does it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: fix broken skel configure.ac exampleMike Frysinger2011-07-122-1/+5
| | | | | | | | | Shell code before AC_INIT will be silently culled, and since the common aclocal.m4 includes inline shell code, the file cannot be included before AC_INIT. So update the example to show people including the file after that rather than before to avoid random breakage. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: use AC_REQUIRE with AC_PROG_CCMike Frysinger2011-07-122-1/+6
| | | | | | | | | | | The autoconf guys point out that our usage of AC_PROG_CC in the SIM_AC_COMMON does not jive with their intended use. http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required So utilize AC_REQUIRE to make the warnings go away and generate the correct code with different autoconf versions. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: m32c/rx: rename configure.in to match rest of the treeMike Frysinger2011-07-114-0/+8
| | | | | | | The sim dir has 30 configure.ac files and 2 configure.in files. So rename the minority to be consistent. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: m32c/rx: fix typo in copyright updatingMike Frysinger2011-07-114-2/+10
|
* * ld-insn.c (print_insn_words): For fields, print conditionals.Hans-Peter Nilsson2011-07-082-0/+32
|
* Tweak heading of last entryHans-Peter Nilsson2011-07-081-1/+1
|
* Correct handling of constant fields.Hans-Peter Nilsson2011-07-084-2/+35
| | | | | | | | | | | | * gen.c (insn_field_cmp): Tweak comment about neither field being an insn_field_string with a cond_eq-to-value condition. (insns_bit_useless) <case insn_field_string, case decode_find_mixed>: Handle cond_eq-to-value fields as insn_field_int. * gen-idecode.c (print_idecode_validate): Handle insn_field_string cond-equal-to-value fields as insn_field_int. * gen-icache.c (print_icache_body): Add comment why constant string fields are handled.
* * Makefile.in ($(SIM_MULTI_OBJ)): Depend on sim-main.hHans-Peter Nilsson2011-07-082-1/+5
| | | | $(SIM_EXTRA_DEPS).
* * Makefile.in (tmp-mach-multi): Exit early when igen fails.Hans-Peter Nilsson2011-07-082-1/+5
|
* Remove all #if 0'd code.Hans-Peter Nilsson2011-07-088-1195/+23
| | | | | | | | | | | | | | | | | | | | | * filter.c: Remove #if 0'd function it_is. (main): Remove #if 0'd code. * gen-engine.c: Remove #if 0'd functions print_jump, print_jump_insn, print_jump_definition, print_jump_internal_function, print_jump_body. (gen_engine_c): Remove #if 0'd code. * gen-idecode.c: Remove #if 0'd functions print_jump print_jump, print_jump_insn, print_jump_definition, print_jump_internal_function, print_jump_until_stop_body. * gen-model.c: Remove #if 0'd functions model_c_or_h_data, model_c_or_h_function, gen_model_h, model_c_insn, model_c_function, gen_model_c and types model_c_passed_data and struct _model_c_passed_data. * gen.c: Remove #if 0'd type constant_field_types and function insn_field_is_constant. (gen_entry_find_opcode_field): Remove #if 0'd code. * ld-insn.c (parse_insn_model_record): Remove #if 0'd code. * misc.h (STRDUP, STRNDUP): Remove #if 0'd macros.
* * MAINTAINERS: Remove Thiemo Seufer.Hans-Peter Nilsson2011-07-082-1/+4
|
* sim: start a unified sim_do_commandMike Frysinger2011-07-0527-182/+91
| | | | | | | | 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>
* sim: bfin: implement stat_map for virtual environments (libgloss)Mike Frysinger2011-07-012-4/+30
| | | | | | | The stat syscalls cannot work without a stat map, so declare one that matches libgloss for virtual environments. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* PR sim/12737Nick Clifton2011-07-015-4/+8
| | | | | | | * sim/arm/iwmmxt/wcmpgt.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wmac.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wsra.cgs: Remove expectation of failure. * sim/arm/xscale/blx.cgs: Remove expectation of failure.
* PR sim/12737Nick Clifton2011-07-012-8/+19
| | | | | | | * iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a signed compare. (WMAC): Extend computed result before adding to result register. (WRSA): Sign extend 32-bit values before shifting.
* sim: bfin: pass up result2/errcode with libgloss syscallsMike Frysinger2011-06-222-2/+7
| | | | | | | Now that the Blackfin libgloss code extracts the 2nd result and the error code from the R1/R2 registers, have the sim fill them up. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* * am33.igen (sub Rm,Rn,Rd): Fix computation of carry flag.Nick Clifton2011-06-202-1/+5
|
* sim: bfin: set ASTAT AV/AVS when shifting accumulators overflowMike Frysinger2011-06-182-0/+12
| | | | | | | | The LSHIFT/ASHIFT insns that work with accumulators lacked AV/AVS handling in the ASTAT register, so add it to match the hardware. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: do not touch ASTAT[V] when shifting accumulatorsMike Frysinger2011-06-182-3/+9
| | | | | | | | If we're shifting accumulators, we don't want to touch the V bit in ASTAT, so add size checks to the ashiftrt/lshiftrt helpers. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: do not extend accumulator in LSHIFT insnsMike Frysinger2011-06-182-1/+6
| | | | | | | | The logical shift insn does not sign extend before shifting, so we shouldn't either. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: tweak saturation handling with TFU/FU modes and MM bitMike Frysinger2011-06-182-14/+35
| | | | | | | | | This too should have been squashed into an earlier change. It covers a few more cases in the V/VS saturation patch when working with TFU and FU modes of dsp insns. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: handle large shift values with accumulator shift insnsMike Frysinger2011-06-182-2/+14
| | | | | | | | | | When the shift magnitude exceeds 32 bits, the values rotate around (since the hardware is actually a barrel shifter). So handle this edge case, update the corresponding AV bit in ASTAT which was missing previously, and tweak the AZ setting based on how the hardware behaves. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: handle odd shift values with shift insnsMike Frysinger2011-06-182-7/+36
| | | | | | | | | | | The shift magnitude is a 5-bit signed value. When it is between 0 and 15, then we do the requested shift, but when it is outside of that, we have to do the opposite. That means we flip between lshift and ashiftrt to match the hardware. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sim: bfin: add tests for recent dsp fixesMike Frysinger2011-06-1814-0/+2502
| | | | | Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>