Age | Commit message (Collapse) | Author | Files | Lines |
|
The SIM_AC_COMMON macro already checks for a bunch of headers, so specific
sim ports need not do it themselves.
|
|
Since sim-endian.c doesn't actually use sim_io funcs, it's weird to
include the sim-io.h header here. It's doing so only for the assert
header. So lets relocate the include to the right place.
|
|
Add a trailing semi-colon to the sed print command as the BSD sed
implementation wants it. It's a nop otherwise and works fine on
GNU/etc... implementations too.
|
|
|
|
The use of $< ends up picking the wrong object out of the depend
list. Specify the input name directly to avoid fragility.
On BSD systems, we need to make sure all options come before the
non-options (i.e. the files).
Reported-by: Chris Johns <chrisj@rtems.org>
URL: https://sourceware.org/bugzilla/show_bug.cgi?id=13160
|
|
Since sizeof returns a size_t, use %zu to display it.
|
|
* sim-main.h (reg64_t): New type.
(v850_regs): Add selID_sregs field.
(VR, SAT16, SAT32, ABS16, ABS32 ): New macros.
* v850-dc: Add fields for v850e3v5 instructions.
* v850.igen (cvtf.dl): Use correctly signed local value.
(cvtf.dw, cvtf.sw, trncf.dul, trncf.dl, trncf.sul, trncf.sw):
Likewise.
* interp.c: Fix old style function declarations.
* simops.c: Likewise.
|
|
* v850.igen: Add more e3v5 support.
(FMAF.S): New pattern.
(FMSF.S): New pattern.
(FNMAF.S): New pattern.
(FNMSF.S): New pattern.
(cnvq15q30): New pattern.
(cnvq30q15): New pattern.
(cnvq31q62): New pattern.
(cnvq62q31): New pattern.
(dup.h): New pattern.
(dup.w): New pattern.
(expq31): New pattern.
(modadd): New pattern.
(mov.dw): New pattern.
(mov.h): New pattern.
(mov.w): New pattern.
(pki16i32): New pattern.
(pki16ui8): New pattern.
(pki32i16): New pattern.
(pki64i32): New pattern.
(pkq15q31): New pattern.
(pkq30q31): New pattern.
(pkq31q15): New pattern.
(pkui8i16): New pattern.
(vabs.h): New pattern.
(vabs.w): New pattern.
(vadd.dw): New placeholder pattern.
(vadd.h): New placeholder pattern.
(vadd.w): New placeholder pattern.
(vadds.h): New placeholder pattern.
(vadds.w): New placeholder pattern.
(vaddsat.h): New placeholder pattern.
(vaddsat.w): New placeholder pattern.
(vand): New pattern.
(vbiq.h): New placeholder pattern.
(vbswap.dw): New placeholder pattern.
(vbswap.h): New placeholder pattern.
(vbswap.w): New placeholder pattern.
(vcalc.h): New placeholder pattern.
(vcalc.w): New placeholder pattern.
(vcmov): New placeholder pattern.
|
|
* msp430-sim.c (sim_open): Allocate memory regions matching those
declared in the libgloss/msp430 linker scripts.
Allow sim_load_file to fail.
(get_op): Test the correct address bit when checking for out of
range addresses.
Include the address in the error message when an illegal access to
the hardware multiplier is detected.
(put_op): Test the correct address bit when checking for out of
range addresses.
|
|
Use gdb's readline.h for readline types.
|
|
* sis.c (main) load binary file from argv parameters
|
|
|
|
|
|
|
|
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.
|
|
|
|
The API to print_insn_sparc() has changed over the years ...
|
|
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.
|
|
This has been deprecated for a long time and no one calls it.
|
|
Move several items from sim/ChangeLog to sim/*/ChangeLog. Also remove
the incorrect white space in sim/common/ChangeLog.
|
|
Commit 07774fccc3280323f43db9ed204f628503b34663 update the microblaze
opcodes table to avoid C++ collisions, but missed updating the sim.
That caused it to fail to build due to missing keywords.
|
|
The related warnings:
gcc ../../../binutils-gdb/sim/mcore/../common/gentmap.c -o gentmap -g -O -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
../../../binutils-gdb/sim/mcore/../common/gentmap.c: In function ‘main’:
../../../binutils-gdb/sim/mcore/../common/gentmap.c:119:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
if (strcmp (argv[1], "-h") == 0)
^
2015-02-13 Chen Gang <gang.chen.5i5j@gmail.com>
* gentmap.c: Include "string.h".
|
|
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".
|
|
Or there will be memory leak.
2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
* microblaze/interp.c (sim_do_command): Call freeargv() before
return.
|
|
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.
|
|
After successfully call buildargv(), the code need to be sure of calling
freeargv() in any cases.
2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
* common/sim-options.c (sim_args_command): Call freeargv() when
failure occurs.
|
|
This should fix a build failure reported on x86_64-mingw32 by Daniel
Calcoen due to conflicting declarations of "open". This patch just
renames the static global in sim/rx/gdb-if.c into "rx_sim_is_open".
sim/rx/ChangeLog:
* gdb-if.c (open): Rename to...
(rx_sim_is_open): This. Replace all uses of "open" by uses of
"rx_sim_is_open" throughout.
Tested by rebuilding on x86_64-linux.
|
|
... using automake 1.11.1, which is the version we're currently
using throughout, instead of 1.11.3. This should be a no-op in
practice, but will help automake/aclocal version-related
differences to cloud real changes being made.
sim/common/ChangeLog:
* aclocal.m4, configure: Regenerate using automake 1.11.1.
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
|
|
|
|
|
|
|
|
|
|
On Windows, a recent gnulib update imported the lstat module, and
this caused a remote-sim.c build failure in struct host_callback_struct:
In file included from /[...]/gdb/remote-sim.c:34:0:
/[...]/gdb/../include/gdb/callback.h:93:9: error: duplicate member '_stati64'
int (*lstat) (host_callback *, const char *, struct stat *);
^
What happens it that gnulib's stat.h makes the following defines:
/* Large File Support on native Windows. */
#if 1
# define stat _stati64
#endif
and then:
#if 1
# if ! 0
/* mingw does not support symlinks, therefore it does not have lstat. But
without links, stat does just fine. */
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define lstat stat
# endif
So, the following fields in struct host_callback_struct...
int (*stat) (host_callback *, const char *, struct stat *);
int (*fstat) (host_callback *, int, struct stat *);
int (*lstat) (host_callback *, const char *, struct stat *);
... get translated to...
int (*_stati64) (host_callback *, const char *, struct _stati64 *);
int (*_fstati64) (host_callback *, int, struct _stati64 *);
int (*_stati64) (host_callback *, const char *, struct _stati64 *);
... which causes two fields to have the same name.
This patch fixes the issue by renaming the stat-related fields
by adding a "to_" prefix, similar to what is done in GDB's
target_ops vector.
include/gdb/ChangeLog:
* callback.h (struct host_callback_struct) <to_stat>: Renamed
from "stat".
<to_fstat>: Renamed from "fstat".
<to_lstat>: Renamed from "lstat".
sim/common/ChangeLog:
* sim-io.c (sim_io_stat, sim_io_fstat): Adjust calls to "stat"
and "fstat" callbacks by calls to "to_stat" and "to_fstat" (resp)
callbacks following renaming in callback.h.
* syscall.c (cb_syscall): Likewise. Adjust calls to "lstat"
callback by call to "to_lstat" callback
sim/cris/ChangeLog:
* traps.c (cris_break_13_handler): Adjust call to "fstat" callback
by call to "to_fstat" following renaming in callback.h.
sim/h8300/ChangeLog:
* compile.c (sim_resume): Adjust calls to "stat" and "fstat"
callbacks by calls to "to_stat" and "to_fstat" (resp) callbacks
following renaming in callback.h.
|
|
It seems that the implementation of the SH fabs and fneg insns in the
simulator is not correct. They use the FP_UNARY macro which checks the
FPSCR.PR setting and raises an exception if PR = 1 (double precision)
and the register number is not even (i.e. a valid DF reg number).
For normal unary FP insns this is fine. However, fneg and fabs perform
the same (integer) operations regardless of the FPSCR.PR setting.
This issue initially popped up here
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63260
I've checked some of the failing tests mentioned in GCC PR 63260 above
with the patch applied and the failures go away.
sim/sh/ChangeLog (tiny patch):
* gencode.c (fabs, fneg): Implement as integer operation
instead of using the FP_UNARY macro.
|
|
sim/ppc/ChangeLog:
* ChangeLog, ChangeLog.00, hw_com.c, ld-cache.h, ppc-instructions:
Change immediatly to immediately.
|
|
sim/igen/ChangeLog:
* igen/ld-cache.h, igen/table.h: Change immediatly to immediately.
|
|
|
|
GDB and SIM both have functions called "debug_printf", which conflicts
at link time. This commit shadows SIM's debug_printf with a macro so
that SIM's symbol ends up being called "sim_debug_printf".
sim/common/ChangeLog:
* sim-trace.h (debug_printf): New define.
|
|
2014-08-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* basics.h, device.c, device.h, hw_htab.c, hw_memory.c:
Correct spelling in comments.
|
|
The situation here is similar to that of the other nearby (previous)
sims fixed; it fails at the dv_sockser_install declaration in
sim/m32r/tconfig.in. But, as opposed to e.g. frv, this *does* have a
definition of UART_INCHAR_ADDR et al. It's somewhat tempting to keep
sim-hardware enabled here but, I'm disabling it for the same reasons
as for frv. Unsurprisingly (as m32r seems to be the template), the
same confusing lines are in sim/m32r/Makefile.in as in
sim/frv/Makefile.in at that time, deleted in 73e76d20. Again, commit
73e76d20 (for m32r as well as for frv) attempted to move the
non-existing dv-sockser.o use to $(m32r_extra_objs) but missed that
AC_SUBST would only affect @m32r_extra_objs@ and not
$(m32r_extra_objs) per se so nothing happened. As for frv, I'm
removing the $(m32r_extra_objs) too, to avoid confusion. Make
check-sim for m32r-elf shows no regressions (5 failures; 100 expected
passes) compared to bf3d9781ec049 (before the recent config.in regen,
after sim-hardware mostly-enabled) and eed23bb4a1 (before the
sim-hardware mostly-enabled; 2013-03-23).
sim/m32r:
* configure.ac: Default simulator hardware to off again. Remove
dead m32r_extra_objs substitution.
* configure: Regenerate.
* Makefile.in: Remove unused frv_extra_objs.
|
|
See nearby (previous) commit for the iq2000 sim; this similarly fails
at the dv_sockser_install declaration in sim/sh64/tconfig.in. I'm
disabling simulator hardware to be consistent with the state before
94c63d78f (2013-03-23) and with the actions for the frv sim and the
iq2000 sim. Make check-sim for sh64-elf shows no regressions (25
failures; 357 expected passes) compared to bf3d9781ec049 (before the
recent config.in regen, after sim-hardware mostly-enabled) and
eed23bb4a1 (before the sim-hardware mostly-enabled; 2013-03-23).
sim/sh64:
* configure.ac: Default simulator hardware to off again
without emitting errors when off or dv-sockser.o unavailable.
* configure: Regenerate.
|
|
See nearby (previous) commit for the frv sim; this similarly fails at
the dv_sockser_install declaration in sim/iq2000/tconfig.in. There's
no HAVE_DV_SOCKSER conditionals here and no other dv-sockser.o
artefacts so maybe there is no further fallout, but I'm going to
disable sim-hardware just be consistent with the state before
94c63d78f (2013-03-23) and with the actions for the frv sim. Make
check-sim for iq2000-elf shows no failures but that's in no small part
because it has no test-suite.
sim/iq2000:
* configure.ac: Default simulator hardware to off again
without emitting errors when off or dv-sockser.o unavailable.
* configure: Regenerate.
|
|
At 2974be626, frv-elf fails at the dv_sockser_install declaration in
sim/frv/tconfig.in. But, with the trivial #include's added (see other
sims tconfig.in, like cris or mn10300), it *still* fails building
sim/frv/devices.c because of a missing UART_INCHAR_ADDR. I have no
insight into what'd be a valid value, except that there's a definition
in m32r, which was probably used as a template with frv not finished.
Simulated hardware should not have been be enabled, and was indeed not
enabled by default before 94c63d78f (2013-03-23), where it seems to
have been enabled for no simulator-specific reason. Except
dv-sockser.o wasn't enabled even then: sim/frv/config.in wasn't
regenerated, so HAVE_DV_SOCKSER was never defined. Maybe people were
fooled by this in sim/frv/Makefile.in at that time (these two lines
were later deleted, in 73e76d20):
CONFIG_DEVICES = dv-sockser.o
CONFIG_DEVICES =
(As it seems people have missed it before: the second line overrides
the first...) I'm guessing these lines were part of the
never-completed hardware-support. Commit 73e76d20 attempted to move
the imagined dv-sockser.o from $(CONFIG_DEVICES) to $(frv_extra_objs)
but missed that AC_SUBST would only affect @frv_extra_objs@ (not
$(frv_extra_objs) per se) so nothing happened regarding sockser:
dv-sockser.o was not compiled and HAVE_DV_SOCKSER was not defined.
I'm removing the $(frv_extra_objs) too, to avoid confusion. The best
action seems to be disabling all hardware support by default again
until a specific sim maintainer finishes the work.
Make check-sim for frv-elf shows no failures after this.
sim/frv:
* configure.ac: Default simulator hardware to off again. Remove
dead frv_extra_objs substitution.
* configure: Regenerate.
* Makefile.in: Remove unused frv_extra_objs.
|
|
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.
|
|
state structure.
* msp430-sim.c: Move static hardware multiply support variables
from here...
* msp430-sim.h (msp430_cpu_state): ... into here ...
* msp430-sim.c (get_op, put_op): ... and update references to use
the msp430_cpu_state structure.
|
|
|
|
2014-07-01 Chen Gang <gang.chen.5i5j@gmail.com>
* sim/microblaze/interp.c: Use long int format instead of int
format to avoid compiling warnings.
|
|
* msp430-sim.c (get_op): Handle reads of low result register when
in MAC mode.
(put_op): Copy MAC result into result words.
Handle writes to the low result register.
|