Add tracing support; Fix some problems with hardwired sizes
This commit is contained in:
parent
1decafee51
commit
ead4a3f157
@ -1,3 +1,26 @@
|
||||
Wed Sep 11 16:44:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* simops.c: Add tracing support. Use SEXTxx macros instead of
|
||||
doing hardwired shifts.
|
||||
|
||||
* configure.in (--enable-sim-cflags): Add switch to add additional
|
||||
flags to simulator buld. If --enable-sim-cflags=trace, turn on
|
||||
tracing.
|
||||
* configure: Regenerate.
|
||||
|
||||
* Makefile.in: Don't require a VPATH capable make if configuring
|
||||
in the same directory. Don't use CFLAGS for configuration flags.
|
||||
Add flags from --enable-sim-cflags. Support canadian cross
|
||||
builds. Rebuild whole simulator if include files change.
|
||||
|
||||
* interp.c (v850_debug): New global for debugging.
|
||||
(lookup_hash,sim_size,sim_set_profile): Use
|
||||
printf_filtered callback, instead of calling printf directly.
|
||||
(sim_{open,trace}): Enable tracing if -t and compiled for tracing.
|
||||
|
||||
* v850_sim.h: Use limits.h to set the various sized types.
|
||||
(SEXT{5,7,16,22}): New macros.
|
||||
|
||||
Mon Sep 9 20:50:46 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* interp.c (hash): Make this an inline function
|
||||
|
@ -11,11 +11,24 @@ AC_C_BIGENDIAN
|
||||
|
||||
. ${srcdir}/../../bfd/configure.host
|
||||
|
||||
AC_ARG_ENABLE(sim-cflags,
|
||||
[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator],
|
||||
[case "${enableval}" in
|
||||
yes) sim_cflags="-O2";;
|
||||
trace) sim_cflags="-O2 -DDEBUG=3";;
|
||||
no) sim_cflags="";;
|
||||
*) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||
esac
|
||||
if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
|
||||
echo "Setting sim cflags = $sim_cflags" 6>&1
|
||||
fi],[sim_cflags=""])dnl
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(HDEFINES)
|
||||
AR=${AR-ar}
|
||||
AC_SUBST(AR)
|
||||
AC_PROG_RANLIB
|
||||
AC_SUBST(sim_cflags)
|
||||
|
||||
# Put a plausible default for CC_FOR_BUILD in Makefile.
|
||||
AC_C_CROSS
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define MEM_SIZE 18 /* V850 memory size is 18 bits XXX */
|
||||
|
||||
host_callback *v850_callback;
|
||||
int v850_debug;
|
||||
|
||||
|
||||
uint32 OP[4];
|
||||
@ -75,7 +76,7 @@ lookup_hash (ins)
|
||||
{
|
||||
if (h->next == NULL)
|
||||
{
|
||||
printf ("ERROR looking up hash for %x\n",ins);
|
||||
(*v850_callback->printf_filtered) (v850_callback, "ERROR looking up hash for %x\n", ins);
|
||||
exit(1);
|
||||
}
|
||||
h = h->next;
|
||||
@ -248,7 +249,7 @@ sim_size (power)
|
||||
State.mem = (uint8 *)calloc(1,1<<MEM_SIZE);
|
||||
if (!State.mem)
|
||||
{
|
||||
fprintf (stderr,"Memory allocation failed.\n");
|
||||
(*v850_callback->printf_filtered) (v850_callback, "Memory allocation failed.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@ -283,7 +284,14 @@ sim_open (args)
|
||||
struct simops *s;
|
||||
struct hash_entry *h;
|
||||
if (args != NULL)
|
||||
printf ("sim_open %s\n",args);
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (strcmp (args, "-t") == 0)
|
||||
d10v_debug = DEBUG;
|
||||
else
|
||||
#endif
|
||||
(*d10v_callback->printf_filtered) (d10v_callback, "ERROR: unsupported option(s): %s\n",args);
|
||||
}
|
||||
|
||||
/* put all the opcodes in the hash table */
|
||||
for (s = Simops; s->func; s++)
|
||||
@ -317,14 +325,14 @@ void
|
||||
sim_set_profile (n)
|
||||
int n;
|
||||
{
|
||||
printf ("sim_set_profile %d\n",n);
|
||||
(*v850_callback->printf_filtered) (v850_callback, "sim_set_profile %d\n", n);
|
||||
}
|
||||
|
||||
void
|
||||
sim_set_profile_size (n)
|
||||
int n;
|
||||
{
|
||||
printf ("sim_set_profile_size %d\n",n);
|
||||
(*v850_callback->printf_filtered) (v850_callback, "sim_set_profile_size %d\n", n);
|
||||
}
|
||||
|
||||
void
|
||||
@ -396,15 +404,18 @@ sim_resume (step, siggnal)
|
||||
int
|
||||
sim_trace ()
|
||||
{
|
||||
printf ("sim_trace\n");
|
||||
return 0;
|
||||
#ifdef DEBUG
|
||||
v850_debug = DEBUG;
|
||||
#endif
|
||||
sim_resume (0, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
sim_info (verbose)
|
||||
int verbose;
|
||||
{
|
||||
printf ("sim_info\n");
|
||||
(*v850_callback->printf_filtered) (v850_callback, "sim_info\n");
|
||||
}
|
||||
|
||||
void
|
||||
@ -480,7 +491,7 @@ void
|
||||
sim_do_command (cmd)
|
||||
char *cmd;
|
||||
{
|
||||
printf("sim_do_command: %s\n",cmd);
|
||||
(*v850_callback->printf_filtered) (v850_callback, "sim_do_command: %s\n", cmd);
|
||||
}
|
||||
|
||||
int
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user