* cris/traps.c (syscall_map): Remove CB_SYS_time / TARGET_SYS_time
authorHans-Peter Nilsson <hp@axis.com>
Thu, 23 Feb 2006 02:01:51 +0000 (02:01 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Thu, 23 Feb 2006 02:01:51 +0000 (02:01 +0000)
mapping.
(cris_break_13_handler) <case TARGET_SYS_time>: New case.

sim/ChangeLog
sim/cris/traps.c

index 74f81a7b8a40c6e078a0c49502a1150b682c4f2c..a7e59e0e38dae2ee2a40bd25e0a7f0b864192e64 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-23  Hans-Peter Nilsson  <hp@axis.com>
+
+       * cris/traps.c (syscall_map): Remove CB_SYS_time / TARGET_SYS_time
+       mapping.
+       (cris_break_13_handler) <case TARGET_SYS_time>: New case.
+
 2006-01-23  Jim Blandy  <jimb@redhat.com>
 
        Add simulator for Renesas M32C and M16C.
index 48fe6c541b9c039230ecd53b74a356d19ce5aa00..2eb0a1b4d24aec998cc16f96ce8abdc10d249e48 100644 (file)
@@ -244,7 +244,6 @@ static const CB_TARGET_DEFS_MAP syscall_map[] =
   { CB_SYS_lstat, TARGET_SYS_lstat64 },
   { CB_SYS_stat, TARGET_SYS_stat64 },
   { CB_SYS_pipe, TARGET_SYS_pipe },
-  { CB_SYS_time, TARGET_SYS_time },
   { CB_SYS_rename, TARGET_SYS_rename },
   { CB_SYS_truncate, TARGET_SYS_truncate },
   { CB_SYS_ftruncate, TARGET_SYS_ftruncate },
@@ -2044,6 +2043,17 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
            break;
          }
 
+       case TARGET_SYS_time:
+         {
+           retval = (int) (*cb->time) (cb, 0L);
+
+           /* At time of this writing, CB_SYSCALL_time doesn't do the
+              part of setting *arg1 to the return value.  */
+           if (arg1)
+             sim_core_write_unaligned_4 (current_cpu, pc, 0, arg1, retval);
+           break;
+         }
+
        case TARGET_SYS_gettimeofday:
          if (arg1 != 0)
            {
This page took 0.027987 seconds and 4 git commands to generate.