/* CRIS exception, interrupt, and trap (EIT) support
- Copyright (C) 2004-2021 Free Software Foundation, Inc.
+ Copyright (C) 2004-2022 Free Software Foundation, Inc.
Contributed by Axis Communications.
This file is part of the GNU simulators.
SIM_DESC sd = CPU_STATE (current_cpu);
CRIS_MISC_PROFILE *profp
= CPU_CRIS_MISC_PROFILE (current_cpu);
- unsigned64 total = profp->basic_cycle_count;
+ uint64_t total = profp->basic_cycle_count;
/* Historically, these messages have gone to stderr, so we'll keep it
that way. It's also easier to then tell it from normal program
return 0;
}
-/* Debug helper; to be run from gdb. */
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void cris_dump_map (SIM_CPU *current_cpu);
+/* Debug helper; to be run from gdb. */
void
cris_dump_map (SIM_CPU *current_cpu)
{
return vpc;
}
-/* Handlers from the CGEN description that should not be called. */
-
-USI
-cris_bmod_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
- UINT srcreg ATTRIBUTE_UNUSED,
- USI dstreg ATTRIBUTE_UNUSED)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- abort ();
-}
-
-void
-h_supr_set_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
- UINT index ATTRIBUTE_UNUSED,
- USI page ATTRIBUTE_UNUSED,
- USI newval ATTRIBUTE_UNUSED)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- abort ();
-}
-
-USI
-h_supr_get_handler (SIM_CPU *current_cpu ATTRIBUTE_UNUSED,
- UINT index ATTRIBUTE_UNUSED,
- USI page ATTRIBUTE_UNUSED)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- abort ();
-}
-
/* Swap one context for another. */
static void
sim_engine_halt (sd, current_cpu, NULL, pc, sim_exited, arg1);
}
- s.p1 = (PTR) sd;
- s.p2 = (PTR) current_cpu;
+ s.p1 = sd;
+ s.p2 = current_cpu;
s.read_mem = sim_syscall_read_mem;
s.write_mem = sim_syscall_write_mem;
return TARGET_TIME (current_cpu_for_cb_callback);
}
+static int
+cris_getpid (host_callback *cb ATTRIBUTE_UNUSED)
+{
+ return TARGET_PID;
+}
+
/* Set target-specific callback data. */
void
cb->syscall_map = (CB_TARGET_DEFS_MAP *) syscall_map;
cb->errno_map = (CB_TARGET_DEFS_MAP *) errno_map;
+ cb->getpid = cris_getpid;
+
/* The kernel stat64 layout. If we see a file > 2G, the "long"
parameter to cb_store_target_endian will make st_size negative.
Similarly for st_ino. FIXME: Find a 64-bit type, and use it