summaryrefslogtreecommitdiffstats
path: root/target-arm/helper.c
diff options
context:
space:
mode:
authorPeter Maydell2010-11-24 16:20:04 +0100
committerRiku Voipio2010-12-03 14:09:39 +0100
commit0165329578eb8f40901825177c0874efb815e342 (patch)
treee0152d7d7bd3a924f683a4649e9fc312845cafbe /target-arm/helper.c
parentARM: linux-user: Correct size of padding in target_ucontext_v2 (diff)
downloadqemu-0165329578eb8f40901825177c0874efb815e342.tar.gz
qemu-0165329578eb8f40901825177c0874efb815e342.tar.xz
qemu-0165329578eb8f40901825177c0874efb815e342.zip
ARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code
Expose the vfp_get_fpscr() and vfp_set_fpscr() functions to C code as well as generated code, so we can use them to read and write the FPSCR when saving and restoring VFP registers across signal handlers in linux-user mode. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 94aef393e2..2a1f44860b 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2251,6 +2251,11 @@ uint32_t HELPER(vfp_get_fpscr)(CPUState *env)
return fpscr;
}
+uint32_t vfp_get_fpscr(CPUState *env)
+{
+ return HELPER(vfp_get_fpscr)(env);
+}
+
/* Convert vfp exception flags to target form. */
static inline int vfp_exceptbits_to_host(int target_bits)
{
@@ -2307,6 +2312,11 @@ void HELPER(vfp_set_fpscr)(CPUState *env, uint32_t val)
set_float_exception_flags(i, &env->vfp.fp_status);
}
+void vfp_set_fpscr(CPUState *env, uint32_t val)
+{
+ HELPER(vfp_set_fpscr)(env, val);
+}
+
#define VFP_HELPER(name, p) HELPER(glue(glue(vfp_,name),p))
#define VFP_BINOP(name) \