INLINE_SIM_MAIN (void) genericOr (unsigned32 source, unsigned32 destReg);
INLINE_SIM_MAIN (void) genericXor (unsigned32 source, unsigned32 destReg);
INLINE_SIM_MAIN (void) genericBtst (unsigned32 leftOpnd, unsigned32 rightOpnd);
-INLINE_SIM_MAIN (void) do_syscall (void);
+INLINE_SIM_MAIN (void) do_syscall (SIM_DESC sd);
void program_interrupt (SIM_DESC sd, sim_cpu *cpu, sim_cia cia, SIM_SIGNAL sig);
void mn10300_cpu_exception_trigger(SIM_DESC sd, sim_cpu* cpu, address_word pc);
#include "sim-main.h"
#include "sim-signal.h"
#include "sim-syscall.h"
-#include "targ-vals.h"
#include <time.h>
#ifdef HAVE_UNISTD_H
/* syscall */
INLINE_SIM_MAIN (void)
-do_syscall (void)
+do_syscall (SIM_DESC sd)
{
/* Registers passed to trap 0. */
int save_errno = errno;
errno = 0;
- if (func == TARGET_SYS_exit)
+ if (cb_target_to_host_syscall (STATE_CALLBACK (sd), func) == CB_SYS_exit)
{
/* EXIT - caller can look in parm1 to work out the reason */
sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC,