提交 174c80d5 编写于 作者: N Nathan Froyd 提交者: malc

target-ppc: add cpu_set_tls

Signed-off-by: NNathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Nmalc <av1474@comtv.ru>
上级 d11f69b2
......@@ -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__) */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册