Commit b453b70bd8e61c4ab4bba48a32ae99c0aa758c79
1 parent
0ac4bd56
sparc fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@490 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
8 deletions
cpu-exec.c
@@ -250,11 +250,7 @@ int cpu_exec(CPUState *env1) | @@ -250,11 +250,7 @@ int cpu_exec(CPUState *env1) | ||
250 | pc = (uint8_t *)env->regs[15]; | 250 | pc = (uint8_t *)env->regs[15]; |
251 | #elif defined(TARGET_SPARC) | 251 | #elif defined(TARGET_SPARC) |
252 | flags = 0; | 252 | flags = 0; |
253 | - cs_base = 0; | ||
254 | - if (env->npc) { | ||
255 | - env->pc = env->npc; | ||
256 | - env->npc = 0; | ||
257 | - } | 253 | + cs_base = env->npc; |
258 | pc = (uint8_t *) env->pc; | 254 | pc = (uint8_t *) env->pc; |
259 | #elif defined(TARGET_PPC) | 255 | #elif defined(TARGET_PPC) |
260 | flags = 0; | 256 | flags = 0; |
@@ -271,7 +267,7 @@ int cpu_exec(CPUState *env1) | @@ -271,7 +267,7 @@ int cpu_exec(CPUState *env1) | ||
271 | tb = tb_alloc((unsigned long)pc); | 267 | tb = tb_alloc((unsigned long)pc); |
272 | if (!tb) { | 268 | if (!tb) { |
273 | /* flush must be done */ | 269 | /* flush must be done */ |
274 | - tb_flush(); | 270 | + tb_flush(env); |
275 | /* cannot fail at this point */ | 271 | /* cannot fail at this point */ |
276 | tb = tb_alloc((unsigned long)pc); | 272 | tb = tb_alloc((unsigned long)pc); |
277 | /* don't forget to invalidate previous TB info */ | 273 | /* don't forget to invalidate previous TB info */ |
@@ -410,7 +406,7 @@ void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector) | @@ -410,7 +406,7 @@ void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector) | ||
410 | cpu_x86_load_seg_cache(env, seg_reg, selector, | 406 | cpu_x86_load_seg_cache(env, seg_reg, selector, |
411 | (uint8_t *)(selector << 4), 0xffff, 0); | 407 | (uint8_t *)(selector << 4), 0xffff, 0); |
412 | } else { | 408 | } else { |
413 | - load_seg(seg_reg, selector, 0); | 409 | + load_seg(seg_reg, selector); |
414 | } | 410 | } |
415 | env = saved_env; | 411 | env = saved_env; |
416 | } | 412 | } |
@@ -519,7 +515,11 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, | @@ -519,7 +515,11 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, | ||
519 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, | 515 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, |
520 | int is_write, sigset_t *old_set) | 516 | int is_write, sigset_t *old_set) |
521 | { | 517 | { |
522 | - return 0; | 518 | + /* XXX: locking issue */ |
519 | + if (is_write && page_unprotect(address)) { | ||
520 | + return 1; | ||
521 | + } | ||
522 | + return 0; | ||
523 | } | 523 | } |
524 | #elif defined (TARGET_PPC) | 524 | #elif defined (TARGET_PPC) |
525 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, | 525 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, |