mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 13:23:54 -06:00
microblaze: Update PC before simulating syscall
Fixes a clone() emulation bug were the new thread starts at the point of the syscall and thus clones in a loop. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
a5b3bdcba8
commit
d7dce49476
1 changed files with 1 additions and 1 deletions
|
@ -2527,6 +2527,7 @@ void cpu_loop(CPUMBState *env)
|
||||||
case EXCP_BREAK:
|
case EXCP_BREAK:
|
||||||
/* Return address is 4 bytes after the call. */
|
/* Return address is 4 bytes after the call. */
|
||||||
env->regs[14] += 4;
|
env->regs[14] += 4;
|
||||||
|
env->sregs[SR_PC] = env->regs[14];
|
||||||
ret = do_syscall(env,
|
ret = do_syscall(env,
|
||||||
env->regs[12],
|
env->regs[12],
|
||||||
env->regs[5],
|
env->regs[5],
|
||||||
|
@ -2537,7 +2538,6 @@ void cpu_loop(CPUMBState *env)
|
||||||
env->regs[10],
|
env->regs[10],
|
||||||
0, 0);
|
0, 0);
|
||||||
env->regs[3] = ret;
|
env->regs[3] = ret;
|
||||||
env->sregs[SR_PC] = env->regs[14];
|
|
||||||
break;
|
break;
|
||||||
case EXCP_HW_EXCP:
|
case EXCP_HW_EXCP:
|
||||||
env->regs[17] = env->sregs[SR_PC] + 4;
|
env->regs[17] = env->sregs[SR_PC] + 4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue