From: Nathan Froyd Date: Mon, 3 Aug 2009 15:43:24 +0000 (-0700) Subject: target-ppc: add cpu_set_tls X-Git-Tag: v0.12.0-rc0~1735 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=174c80d51612ce33960965c75e40c922599a503e;p=thirdparty%2Fqemu.git target-ppc: add cpu_set_tls Signed-off-by: Nathan Froyd Signed-off-by: malc --- diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 148e8c3fe68..fe2257db0c7 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1589,4 +1589,15 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, *flags = env->hflags; } +static inline void cpu_set_tls(CPUState *env, target_ulong newtls) +{ +#if defined(TARGET_PPC64) + /* The kernel checks TIF_32BIT here; we don't support loading 32-bit + binaries on PPC64 yet. */ + env->gpr[13] = newtls; +#else + env->gpr[2] = newtls; +#endif +} + #endif /* !defined (__CPU_PPC_H__) */