aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/d10v_sim.h
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1996-09-04 17:42:51 +0000
committerMichael Meissner <gnu@the-meissners.org>1996-09-04 17:42:51 +0000
commit7eebfc6296f0830a435a21be0ab37a076c8566bd (patch)
treebb7d99cce94c0f928c238e030e3937971dcb13d9 /sim/d10v/d10v_sim.h
parent10d183a0f044d53e923380e919bc65a783ea6a32 (diff)
downloadgdb-7eebfc6296f0830a435a21be0ab37a076c8566bd.zip
gdb-7eebfc6296f0830a435a21be0ab37a076c8566bd.tar.gz
gdb-7eebfc6296f0830a435a21be0ab37a076c8566bd.tar.bz2
More debug support; Enable -t/-v to work correctly; Add --enable-sim-cflags configure switch
Diffstat (limited to 'sim/d10v/d10v_sim.h')
-rw-r--r--sim/d10v/d10v_sim.h53
1 files changed, 43 insertions, 10 deletions
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 64fa4a9..4913fa8 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -1,26 +1,55 @@
#include <stdio.h>
#include <ctype.h>
+#include <limits.h>
#include "ansidecl.h"
#include "callback.h"
#include "opcode/d10v.h"
-#define DEBUG_TRACE 0x00000001
-#define DEBUG_VALUES 0x00000002
-#define DEBUG_MEMSIZE 0x00000004
+#define DEBUG_TRACE 0x00000001
+#define DEBUG_VALUES 0x00000002
+#define DEBUG_MEMSIZE 0x00000004
+#define DEBUG_INSTRUCTION 0x00000008
-#ifndef DEBUG
-#define DEBUG 0
-#endif
+extern int d10v_debug;
-/* FIXME: host defines */
+#if UCHAR_MAX == 255
typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
typedef signed char int8;
+#else
+#error "Char is not an 8-bit type"
+#endif
+
+#if SHRT_MAX == 32767
+typedef unsigned short uint16;
typedef signed short int16;
+#else
+#error "Short is not a 16-bit type"
+#endif
+
+#if INT_MAX == 2147483647
+typedef unsigned int uint32;
typedef signed int int32;
+
+#elif LONG_MAX == 2147483647
+typedef unsigned long uint32;
+typedef signed long int32;
+
+#else
+#error "Neither int nor long is a 32-bit type"
+#endif
+
+#if LONG_MAX > 2147483647
+typedef unsigned long uint64;
+typedef signed long int64;
+
+#elif __GNUC__
+typedef unsigned long long uint64;
typedef signed long long int64;
+#else
+#error "Can't find an appropriate 64-bit type"
+#endif
+
/* FIXME: D10V defines */
typedef uint16 reg_t;
@@ -44,9 +73,13 @@ enum _ins_type
INS_RIGHT,
INS_LEFT_PARALLEL,
INS_RIGHT_PARALLEL,
- INS_LONG
+ INS_LONG,
+ INS_MAX
};
+extern long ins_type_counters[ (int)INS_MAX ];
+extern long left_nops, right_nops;
+
struct _state
{
reg_t regs[16]; /* general-purpose registers */