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 | 250 | pc = (uint8_t *)env->regs[15]; |
251 | 251 | #elif defined(TARGET_SPARC) |
252 | 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 | 254 | pc = (uint8_t *) env->pc; |
259 | 255 | #elif defined(TARGET_PPC) |
260 | 256 | flags = 0; |
... | ... | @@ -271,7 +267,7 @@ int cpu_exec(CPUState *env1) |
271 | 267 | tb = tb_alloc((unsigned long)pc); |
272 | 268 | if (!tb) { |
273 | 269 | /* flush must be done */ |
274 | - tb_flush(); | |
270 | + tb_flush(env); | |
275 | 271 | /* cannot fail at this point */ |
276 | 272 | tb = tb_alloc((unsigned long)pc); |
277 | 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 | 406 | cpu_x86_load_seg_cache(env, seg_reg, selector, |
411 | 407 | (uint8_t *)(selector << 4), 0xffff, 0); |
412 | 408 | } else { |
413 | - load_seg(seg_reg, selector, 0); | |
409 | + load_seg(seg_reg, selector); | |
414 | 410 | } |
415 | 411 | env = saved_env; |
416 | 412 | } |
... | ... | @@ -519,7 +515,11 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, |
519 | 515 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, |
520 | 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 | 524 | #elif defined (TARGET_PPC) |
525 | 525 | static inline int handle_cpu_signal(unsigned long pc, unsigned long address, | ... | ... |