aboutsummaryrefslogtreecommitdiff
path: root/sim/cris
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-04-24 14:35:14 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-14 21:05:36 -0400
commit00330cd18a4ba83beabad4cb9f4215170828cd29 (patch)
tree5e2c26d6fa4f383e0ac7e933f33005d6b136fbcd /sim/cris
parentfcf102ba7abe6c8a64b2db41bfd02ac80e79e094 (diff)
downloadfsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.zip
fsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.tar.gz
fsf-binutils-gdb-00330cd18a4ba83beabad4cb9f4215170828cd29.tar.bz2
sim: callback: convert time interface to 64-bit
PR sim/27705 Rather than rely on time_t being the right size between the host & target, have the interface always be 64-bit. We can figure out if we need to truncate when actually outputting it to the right target.
Diffstat (limited to 'sim/cris')
-rw-r--r--sim/cris/ChangeLog5
-rw-r--r--sim/cris/traps.c11
2 files changed, 9 insertions, 7 deletions
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 81ae5e6..68cd0bf 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,8 @@
+2021-05-14 Mike Frysinger <vapier@gentoo.org>
+
+ * traps.c (cris_break_13_handler): Delete 2nd arg to time callback.
+ (cris_time): Change return to int64_t. Delete 2nd arg.
+
2021-05-04 Tom Tromey <tromey@adacore.com>
* mloop.in: Include <stdlib.h>.
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 1c8ca41..483747f 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -2234,7 +2234,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
case TARGET_SYS_time:
{
- retval = (int) (*cb->time) (cb, 0L);
+ retval = (int) (*cb->time) (cb);
/* At time of this writing, CB_SYSCALL_time doesn't do the
part of setting *arg1 to the return value. */
@@ -3327,13 +3327,10 @@ cris_pipe_empty (host_callback *cb,
/* We have a simulator-specific notion of time. See TARGET_TIME. */
-static long
-cris_time (host_callback *cb ATTRIBUTE_UNUSED, long *t)
+static int64_t
+cris_time (host_callback *cb ATTRIBUTE_UNUSED)
{
- long retval = TARGET_TIME (current_cpu_for_cb_callback);
- if (t)
- *t = retval;
- return retval;
+ return TARGET_TIME (current_cpu_for_cb_callback);
}
/* Set target-specific callback data. */