From ffc67e7a94d475d4c52370915a89b16cf9423ac2 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sat, 3 Jan 2009 19:58:11 +0000 Subject: * cris/traps.c (TARGET_UTSNAME): Update to 2009-01-01. (TARGET_EPOCH): Update to match TARGET_UTSNAME. Correct comment. (cris_break_13_handler) : Update to 2.6.27. Set machine field to the BFD printable name of the machine. --- sim/cris/traps.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'sim/cris') diff --git a/sim/cris/traps.c b/sim/cris/traps.c index ff70902..b11cd86 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -144,10 +144,11 @@ along with this program. If not, see . */ #define TARGET_TCGETS 0x5401 -#define TARGET_UTSNAME "#38 Sun Apr 1 00:00:00 MET 2001" +#define TARGET_UTSNAME "#7 Thu Jan 1 00:00:00 MET 2009" -/* Seconds since the above date + 10 minutes. */ -#define TARGET_EPOCH 986080200 +/* Seconds since 1970-01-01 to the above date + 10 minutes; + 'date -d "Thu Jan 1 00:00:10 MET 2009" +%s'. */ +#define TARGET_EPOCH 1230764410 /* Milliseconds since start of run. We use the number of syscalls to avoid introducing noise in the execution time. */ @@ -1570,16 +1571,23 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1, case TARGET_SYS_uname: { /* Fill in a few constants to appease glibc. */ - static const char sim_utsname[6][65] = + static char sim_utsname[6][65] = { "Linux", "sim-target", - "2.4.5", + "2.6.27", TARGET_UTSNAME, - "cris", + "cris", /* Overwritten below. */ "localdomain" }; + /* Having the hardware type in Linux equal to the bfd + printable name is deliberate: if you make config.guess + work on your Linux-type system the usual way, it + probably will; either the bfd printable_name or the + ambiguous arch_name. */ + strcpy (sim_utsname[4], STATE_ARCHITECTURE (sd)->printable_name); + if ((s.write_mem) (cb, &s, arg1, (const char *) sim_utsname, sizeof (sim_utsname)) != sizeof (sim_utsname)) -- cgit v1.1