projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d11f69b
)
target-ppc: add cpu_set_tls
author
Nathan Froyd
<froydnj@codesourcery.com>
Mon, 3 Aug 2009 15:43:24 +0000
(08:43 -0700)
committer
malc
<av1474@comtv.ru>
Mon, 3 Aug 2009 16:33:41 +0000
(20:33 +0400)
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>
target-ppc/cpu.h
patch
|
blob
|
history
diff --git
a/target-ppc/cpu.h
b/target-ppc/cpu.h
index
148e8c3
..
fe2257d
100644
(file)
--- 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__) */