2010-09-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
[deliverable/binutils-gdb.git] / sim / erc32 / sis.h
index 2a895c0277df5a39cfae1f531ad0e2e36aa964c1..fcabf9dc111a9bab64637f1e9f2d0f30b5cb81e4 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "end.h"
 
@@ -53,7 +53,9 @@ typedef double  float64;      /* 64-bit float */
 
 /* FIXME: what about host compilers that don't support 64-bit ints? */
 typedef unsigned long long uint64; /* 64-bit unsigned int */
-typedef long long int64;       /* 64-bit signed int */
+typedef long long int64;          /* 64-bit signed int */
+
+#define UINT64_MAX 18446744073709551615ULL
 
 struct pstate {
 
@@ -108,22 +110,22 @@ struct pstate {
     float32         freq;      /* Simulated processor frequency */
 
 
-    uint32          tottime;
-    uint32          ninst;
-    uint32          fholdt;
-    uint32          holdt;
-    uint32          icntt;
-    uint32          finst;
-    uint32          simstart;
-    uint32          starttime;
-    uint32          tlimit;    /* Simulation time limit */
-    uint32          pwdtime;   /* Cycles in power-down mode */
-    uint32          nstore;    /* Number of load instructions */
-    uint32          nload;     /* Number of store instructions */
-    uint32          nannul;    /* Number of annuled instructions */
-    uint32          nbranch;   /* Number of branch instructions */
+    uint64          tottime;
+    uint64          ninst;
+    uint64          fholdt;
+    uint64          holdt;
+    uint64          icntt;
+    uint64          finst;
+    uint64          simstart;
+    uint64          starttime;
+    uint64          tlimit;    /* Simulation time limit */
+    uint64          pwdtime;   /* Cycles in power-down mode */
+    uint64          nstore;    /* Number of load instructions */
+    uint64          nload;     /* Number of store instructions */
+    uint64          nannul;    /* Number of annuled instructions */
+    uint64          nbranch;   /* Number of branch instructions */
     uint32          ildreg;    /* Destination of last load instruction */
-    uint32          ildtime;   /* Last time point for load dependency */
+    uint64          ildtime;   /* Last time point for load dependency */
 
     int             rett_err;  /* IU in jmpl/restore error state (Rev.0) */
     int             jmpltime;
@@ -132,14 +134,14 @@ struct pstate {
 struct evcell {
     void            (*cfunc) ();
     int32           arg;
-    uint32          time;
+    uint64          time;
     struct evcell  *nxt;
 };
 
 struct estate {
     struct evcell   eq;
     struct evcell  *freeq;
-    uint32          simtime;
+    uint64          simtime;
 };
 
 struct irqcell {
@@ -168,8 +170,8 @@ extern int  memory_read PARAMS ((int32 asi, uint32 addr, uint32 *data,
                                     int32 sz, int32 *ws));
 extern int     memory_write PARAMS ((int32 asi, uint32 addr, uint32 *data,
                                    int32 sz, int32 *ws));
-extern int     sis_memory_write PARAMS ((uint32 addr, char *data,
-                                         uint32 length));
+extern int     sis_memory_write PARAMS ((uint32 addr,
+                                   const unsigned char *data, uint32 length));
 extern int     sis_memory_read PARAMS ((uint32 addr, char *data,
                                         uint32 length));
 
@@ -186,7 +188,7 @@ extern void init_signals PARAMS ((void));
 struct disassemble_info;
 extern void    dis_mem PARAMS ((uint32 addr, uint32 len,
                                 struct disassemble_info *info));
-extern void    event PARAMS ((void (*cfunc) (), int32 arg, uint32 delta));
+extern void    event PARAMS ((void (*cfunc) (), int32 arg, uint64 delta));
 extern void    set_int PARAMS ((int32 level, void (*callback) (), int32 arg));
 extern void    advance_time PARAMS ((struct pstate  *sregs));
 extern uint32  now PARAMS ((void));
@@ -205,7 +207,7 @@ extern void init_regs PARAMS ((struct pstate *sregs));
 
 /* interf.c */
 extern int     run_sim PARAMS ((struct pstate *sregs,
-                                unsigned int icount, int dis));
+                                uint64 icount, int dis));
 
 /* float.c */
 extern int     get_accex PARAMS ((void));
This page took 0.024752 seconds and 4 git commands to generate.