summaryrefslogtreecommitdiffstats
path: root/target-cris
diff options
context:
space:
mode:
authoredgar_igl2009-01-07 15:19:38 +0100
committeredgar_igl2009-01-07 15:19:38 +0100
commitef96779bc3df7f4fe228fb9a5c7ecb81a04b2644 (patch)
treea268cc6ea2908946d2d62979e7e071a78d016a7f /target-cris
parentETRAX: Correct size of control-register area. (diff)
downloadqemu-ef96779bc3df7f4fe228fb9a5c7ecb81a04b2644.tar.gz
qemu-ef96779bc3df7f4fe228fb9a5c7ecb81a04b2644.tar.xz
qemu-ef96779bc3df7f4fe228fb9a5c7ecb81a04b2644.zip
CRIS: Implement set_thread_area for CRIS.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6210 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-cris/cpu.h b/target-cris/cpu.h
index 9e4faff300..dea4cc46c1 100644
--- a/target-cris/cpu.h
+++ b/target-cris/cpu.h
@@ -225,6 +225,11 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
}
#endif
+static inline void cpu_set_tls(CPUCRISState *env, target_ulong newtls)
+{
+ env->pregs[PR_PID] = (env->pregs[PR_PID] & 0xff) | newtls;
+}
+
/* Support function regs. */
#define SFR_RW_GC_CFG 0][0
#define SFR_RW_MM_CFG env->pregs[PR_SRS]][0