From 8824fb459bfdf1f4fb841747f2a7aad398b277c7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 30 Oct 1996 16:30:59 +0000 Subject: [PATCH] * simops.c (OP_10007E0): Handle SYS_times and SYS_gettimeofday. Check it into devo too. --- sim/v850/ChangeLog | 2 ++ sim/v850/simops.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 0dde9719e02..da0ab644535 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 dc5f836a205..c932849fa0e 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -5,6 +5,7 @@ #include "bfd.h" #include #include +#include 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. */ -- 2.30.2