18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
*/ |
*/ |
20 |
#include "config.h" |
#include "config.h" |
21 |
#ifdef TARGET_I386 |
#include "exec.h" |
|
#include "exec-i386.h" |
|
|
#endif |
|
|
#ifdef TARGET_ARM |
|
|
#include "exec-arm.h" |
|
|
#endif |
|
|
|
|
22 |
#include "disas.h" |
#include "disas.h" |
23 |
|
|
24 |
//#define DEBUG_EXEC |
//#define DEBUG_EXEC |
25 |
//#define DEBUG_SIGNAL |
//#define DEBUG_SIGNAL |
26 |
|
|
27 |
#if defined(TARGET_ARM) |
#if defined(TARGET_ARM) || defined(TARGET_SPARC) |
28 |
/* XXX: unify with i386 target */ |
/* XXX: unify with i386 target */ |
29 |
void cpu_loop_exit(void) |
void cpu_loop_exit(void) |
30 |
{ |
{ |
130 |
env->VF = (psr << 3) & 0x80000000; |
env->VF = (psr << 3) & 0x80000000; |
131 |
env->cpsr = psr & ~0xf0000000; |
env->cpsr = psr & ~0xf0000000; |
132 |
} |
} |
133 |
|
#elif defined(TARGET_SPARC) |
134 |
#else |
#else |
135 |
#error unsupported target CPU |
#error unsupported target CPU |
136 |
#endif |
#endif |
224 |
env->cpsr = compute_cpsr(); |
env->cpsr = compute_cpsr(); |
225 |
cpu_arm_dump_state(env, logfile, 0); |
cpu_arm_dump_state(env, logfile, 0); |
226 |
env->cpsr &= ~0xf0000000; |
env->cpsr &= ~0xf0000000; |
227 |
|
#elif defined(TARGET_SPARC) |
228 |
|
cpu_sparc_dump_state (env, logfile, 0); |
229 |
#else |
#else |
230 |
#error unsupported target CPU |
#error unsupported target CPU |
231 |
#endif |
#endif |
243 |
flags = 0; |
flags = 0; |
244 |
cs_base = 0; |
cs_base = 0; |
245 |
pc = (uint8_t *)env->regs[15]; |
pc = (uint8_t *)env->regs[15]; |
246 |
|
#elif defined(TARGET_SPARC) |
247 |
|
flags = 0; |
248 |
|
cs_base = 0; |
249 |
|
if (env->npc) { |
250 |
|
env->pc = env->npc; |
251 |
|
env->npc = 0; |
252 |
|
} |
253 |
|
pc = (uint8_t *) env->pc; |
254 |
#else |
#else |
255 |
#error unsupported CPU |
#error unsupported CPU |
256 |
#endif |
#endif |
363 |
#endif |
#endif |
364 |
#elif defined(TARGET_ARM) |
#elif defined(TARGET_ARM) |
365 |
env->cpsr = compute_cpsr(); |
env->cpsr = compute_cpsr(); |
366 |
|
#elif defined(TARGET_SPARC) |
367 |
#else |
#else |
368 |
#error unsupported target CPU |
#error unsupported target CPU |
369 |
#endif |
#endif |
494 |
/* XXX: do more */ |
/* XXX: do more */ |
495 |
return 0; |
return 0; |
496 |
} |
} |
497 |
|
#elif defined(TARGET_SPARC) |
498 |
|
static inline int handle_cpu_signal(unsigned long pc, unsigned long address, |
499 |
|
int is_write, sigset_t *old_set) |
500 |
|
{ |
501 |
|
return 0; |
502 |
|
} |
503 |
#else |
#else |
504 |
#error unsupported target CPU |
#error unsupported target CPU |
505 |
#endif |
#endif |