]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/erc32/func.c
2010-04-20 Tiemen Schut <T.Schut@sron.nl>
[thirdparty/binutils-gdb.git] / sim / erc32 / func.c
index 7691e324283568c4bd2072db5b9164a71770909e..80fbbe1e48b3e18780c83b5c101c51c7bff51567 100644 (file)
@@ -421,7 +421,7 @@ exec_cmd(sregs, cmd)
            }
        } else if (strncmp(cmd1, "cont", clen) == 0) {
            if ((cmd1 = strtok(NULL, " \t\n\r")) == NULL) {
-               stat = run_sim(sregs, -1, 0);
+               stat = run_sim(sregs, UINT64_MAX, 0);
            } else {
                stat = run_sim(sregs, VAL(cmd1), 0);
            }
@@ -472,7 +472,7 @@ exec_cmd(sregs, cmd)
            if ((cmd2 = strtok(NULL, " \t\n\r")) != NULL) {
                stat = run_sim(sregs, VAL(cmd2), 0);
            } else {
-               stat = run_sim(sregs, -1, 0);
+               stat = run_sim(sregs, UINT64_MAX, 0);
            }
            daddr = sregs->pc;
            sim_halt();
@@ -544,7 +544,7 @@ exec_cmd(sregs, cmd)
            reset_all();
            reset_stat(sregs);
            if ((cmd1 = strtok(NULL, " \t\n\r")) == NULL) {
-               stat = run_sim(sregs, -1, 0);
+               stat = run_sim(sregs, UINT64_MAX, 0);
            } else {
                stat = run_sim(sregs, VAL(cmd1), 0);
            }
@@ -560,7 +560,7 @@ exec_cmd(sregs, cmd)
            sim_halt();
        } else if (strncmp(cmd1, "tcont", clen) == 0) {
            sregs->tlimit = limcalc(sregs->freq);
-           stat = run_sim(sregs, -1, 0);
+           stat = run_sim(sregs, UINT64_MAX, 0);
            daddr = sregs->pc;
            sim_halt();
        } else if (strncmp(cmd1, "tgo", clen) == 0) {
@@ -573,7 +573,7 @@ exec_cmd(sregs, cmd)
            sregs->pc = len & ~3;
            sregs->npc = sregs->pc + 4;
            printf("resuming at 0x%08x\n",sregs->pc);
-           stat = run_sim(sregs, -1, 0);
+           stat = run_sim(sregs, UINT64_MAX, 0);
            daddr = sregs->pc;
            sim_halt();
        } else if (strncmp(cmd1, "tlimit", clen) == 0) {
@@ -583,7 +583,7 @@ exec_cmd(sregs, cmd)
                sregs->tlimit / sregs->freq / 1000);
        } else if (strncmp(cmd1, "tra", clen) == 0) {
            if ((cmd1 = strtok(NULL, " \t\n\r")) == NULL) {
-               stat = run_sim(sregs, -1, 1);
+               stat = run_sim(sregs, UINT64_MAX, 1);
            } else {
                stat = run_sim(sregs, VAL(cmd1), 1);
            }
@@ -595,7 +595,7 @@ exec_cmd(sregs, cmd)
            reset_all();
            reset_stat(sregs);
            sregs->tlimit = limcalc(sregs->freq);
-           stat = run_sim(sregs, -1, 0);
+           stat = run_sim(sregs, UINT64_MAX, 0);
            daddr = sregs->pc;
            sim_halt();
        } else
@@ -827,56 +827,13 @@ dis_mem(addr, len, info)
     }
 }
 
-int
-buffer_read_memory(addr, buffer, size, info)
-    bfd_vma         addr;
-    bfd_byte       *buffer;
-    uint32          size;
-    struct disassemble_info *info;
-{
-    if (size == sis_memory_read(addr, buffer, size))
-       return (0);
-    else
-       return (1);
-}
-
-void
-perror_memory(status, addr, info)
-    int32           status;
-    bfd_vma         addr;
-    struct disassemble_info *info;
-{
-
-    printf("Could not read address 0x%08x\n", (unsigned int) addr);
-}
-
-void
-generic_print_address(addr, info)
-    bfd_vma         addr;
-    struct disassemble_info *info;
-{
-
-    printf("0x%x", (unsigned int) addr);
-}
-
-/* Just return the given address.  */
-
-int
-generic_symbol_at_address (addr, info)
-     bfd_vma addr;
-     struct disassemble_info * info;
-{
-  return 1;
-}
-
-
 /* Add event to event queue */
 
 void
 event(cfunc, arg, delta)
     void            (*cfunc) ();
     int32           arg;
-    uint32          delta;
+    uint64          delta;
 {
     struct evcell  *ev1, *evins;
 
@@ -943,7 +900,8 @@ advance_time(sregs)
 
     struct evcell  *evrem;
     void            (*cfunc) ();
-    uint32          arg, endtime;
+    uint32          arg;
+    uint64          endtime;
 
 #ifdef STAT
     sregs->fholdt += sregs->fhold;
@@ -981,7 +939,8 @@ wait_for_irq()
 {
     struct evcell  *evrem;
     void            (*cfunc) ();
-    int32           arg, endtime;
+    int32           arg;
+    uint64          endtime;
 
     if (ebase.eq.nxt == NULL)
        printf("Warning: event queue empty - power-down mode not entered\n");
@@ -1045,11 +1004,7 @@ sys_halt()
 
 #include "ansidecl.h"
 
-#ifdef ANSI_PROTOTYPES
 #include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
 
 #include "libiberty.h"
 #include "bfd.h"