+2015-06-11 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (mn10300_debug): Delete.
+ * mn10300_sim.h (DEBUG_TRACE, DEBUG_VALUES, mn10300_debug): Delete.
+ (struct _state): Delete exception and exited members.
+ [_WIN32] (SIGTRAP, SIGQUIT): Delete.
+ * op_utils.c (do_syscall): Call sim_engine_halt instead of setting
+ State.exception.
+
2015-06-11 Mike Frysinger <vapier@gentoo.org>
* mn10300_sim.h (uint8, int8, uint16, int16, uint32, int32): Typedef
host_callback *mn10300_callback;
-int mn10300_debug;
struct _state State;
extern host_callback *mn10300_callback;
extern SIM_DESC simulator;
-#define DEBUG_TRACE 0x00000001
-#define DEBUG_VALUES 0x00000002
-
-extern int mn10300_debug;
-
typedef unsigned8 uint8;
typedef signed8 int8;
typedef unsigned16 uint16;
dword fd[16]; /* FD0,2,...,30 */
} fpregs;
uint8 *mem; /* main memory */
- int exception;
- int exited;
/* All internal state modified by signal_exception() that may need to be
rolled back for passing moment-of-exception image back to gdb. */
#define FPU2FS(F,FS) sim_fpu_to32 (&(FS), &(F))
#define FPU2FD(F,FD) sim_fpu_to232 (&((FD).high), &((FD).low), &(F))
-#ifdef _WIN32
-#define SIGTRAP 5
-#define SIGQUIT 3
-#endif
-
#define FETCH32(a,b,c,d) \
((a)+((b)<<8)+((c)<<16)+((d)<<24))
if ( FUNC == TARGET_SYS_exit )
{
/* EXIT - caller can look in PARM1 to work out the reason */
- if (PARM1 == 0xdead)
- State.exception = SIGABRT;
- else
- {
- sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC,
- sim_exited, PARM1);
- State.exception = SIGQUIT;
- }
- State.exited = 1;
+ sim_engine_halt (simulator, STATE_CPU (simulator, 0), NULL, PC,
+ (PARM1 == 0xdead ? SIM_SIGABRT : sim_exited), PARM1);
}
else
{