* [Qemu-devel] [PATCH 1/2] microblaze: Support setting of TLS ptr
@ 2012-10-17 10:42 edgar.iglesias
2012-10-17 10:42 ` [Qemu-devel] [PATCH 2/2] microblaze: Update PC before simulating syscall edgar.iglesias
0 siblings, 1 reply; 2+ messages in thread
From: edgar.iglesias @ 2012-10-17 10:42 UTC (permalink / raw)
To: qemu-devel
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
---
linux-user/syscall.c | 2 ++
target-microblaze/cpu.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 471d060..c6a6337 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6888,6 +6888,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4));
#elif defined(TARGET_CRIS)
ret = get_errno(do_fork(cpu_env, arg2, arg1, arg3, arg4, arg5));
+#elif defined(TARGET_MICROBLAZE)
+ ret = get_errno(do_fork(cpu_env, arg1, arg2, arg4, arg6, arg5));
#elif defined(TARGET_S390X)
ret = get_errno(do_fork(cpu_env, arg2, arg1, arg3, arg5, arg4));
#else
diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h
index 4968c24..88430b5 100644
--- a/target-microblaze/cpu.h
+++ b/target-microblaze/cpu.h
@@ -345,6 +345,7 @@ static inline void cpu_clone_regs(CPUMBState *env, target_ulong newsp)
static inline void cpu_set_tls(CPUMBState *env, target_ulong newtls)
{
+ env->regs[21] = newtls;
}
static inline int cpu_interrupts_enabled(CPUMBState *env)
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH 2/2] microblaze: Update PC before simulating syscall
2012-10-17 10:42 [Qemu-devel] [PATCH 1/2] microblaze: Support setting of TLS ptr edgar.iglesias
@ 2012-10-17 10:42 ` edgar.iglesias
0 siblings, 0 replies; 2+ messages in thread
From: edgar.iglesias @ 2012-10-17 10:42 UTC (permalink / raw)
To: qemu-devel
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
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>
---
linux-user/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index f4bbe69..5827ee6 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2527,6 +2527,7 @@ void cpu_loop(CPUMBState *env)
case EXCP_BREAK:
/* Return address is 4 bytes after the call. */
env->regs[14] += 4;
+ env->sregs[SR_PC] = env->regs[14];
ret = do_syscall(env,
env->regs[12],
env->regs[5],
@@ -2537,7 +2538,6 @@ void cpu_loop(CPUMBState *env)
env->regs[10],
0, 0);
env->regs[3] = ret;
- env->sregs[SR_PC] = env->regs[14];
break;
case EXCP_HW_EXCP:
env->regs[17] = env->sregs[SR_PC] + 4;
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-17 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 10:42 [Qemu-devel] [PATCH 1/2] microblaze: Support setting of TLS ptr edgar.iglesias
2012-10-17 10:42 ` [Qemu-devel] [PATCH 2/2] microblaze: Update PC before simulating syscall edgar.iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).