[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] target-ppc: add cpu_set_tls
From: |
Nathan Froyd |
Subject: |
[Qemu-devel] [PATCH 2/7] target-ppc: add cpu_set_tls |
Date: |
Mon, 3 Aug 2009 08:43:24 -0700 |
Signed-off-by: Nathan Froyd <address@hidden>
---
target-ppc/cpu.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 148e8c3..fe2257d 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__) */
--
1.6.3.2
- [Qemu-devel] [PATCH 0/7] NPTL support for PPC, v2, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 4/7] target-ppc: add exceptions for conditional stores, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 1/7] target-ppc: fix cpu_clone_regs, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 7/7] linux-user: make FUTEX_* calls honor timeout parameter, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 5/7] linux-user: handle POWERPC_EXCP_STCX, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 2/7] target-ppc: add cpu_set_tls,
Nathan Froyd <=
- [Qemu-devel] [PATCH 6/7] enable NPTL for ppc-linux-user targets in configure, Nathan Froyd, 2009/08/03
- [Qemu-devel] [PATCH 3/7] target-ppc: retain l{w,d}arx loaded value, Nathan Froyd, 2009/08/03
- Re: [Qemu-devel] [PATCH 0/7] NPTL support for PPC, v2, Martin Mohring, 2009/08/04