diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/v850/ChangeLog | 2 | ||||
-rw-r--r-- | sim/v850/simops.c | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 0dde971..da0ab64 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,5 +1,7 @@ Wed Oct 30 08:49:10 1996 Jeffrey A Law (law@cygnus.com) + * simops.c (OP_10007E0): Handle SYS_times and SYS_gettimeofday. + * simops.c (OP_10007E0): Handle SYS_time. Tue Oct 29 14:22:55 1996 Jeffrey A Law (law@cygnus.com) diff --git a/sim/v850/simops.c b/sim/v850/simops.c index dc5f836..c932849 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -5,6 +5,7 @@ #include "bfd.h" #include <errno.h> #include <sys/stat.h> +#include <sys/times.h> enum op_types { OP_UNKNOWN, @@ -2086,6 +2087,27 @@ OP_10007E0 () case SYS_time: RETVAL = time (MEMPTR (PARM1)); break; + case SYS_times: + { + struct tms tms; + RETVAL = times (&tms); + store_mem (PARM1, 4, tms.tms_utime); + store_mem (PARM1 + 4, 4, tms.tms_stime); + store_mem (PARM1 + 8, 4, tms.tms_cutime); + store_mem (PARM1 + 12, 4, tms.tms_cstime); + break; + } + case SYS_gettimeofday: + { + struct timeval t; + struct timezone tz; + RETVAL = gettimeofday (&t, &tz); + store_mem (PARM1, 4, t.tv_sec); + store_mem (PARM1 + 4, 4, t.tv_usec); + store_mem (PARM2, 4, tz.tz_minuteswest); + store_mem (PARM2 + 4, 4, tz.tz_dsttime); + break; + } case SYS_utime: /* Cast the second argument to void *, to avoid type mismatch if a prototype is present. */ |