summaryrefslogtreecommitdiff
path: root/target-arm/helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-05-25 14:51:48 +0000
committerPeter Maydell <peter.maydell@linaro.org>2011-06-22 15:01:31 +0000
commitae1857eca22b58d430941730bd097e95a484652c (patch)
tree9ab2f0bc829beedd76af56b037ea694a9cb08e29 /target-arm/helper.c
parent5aaebd13da29a7157b757590284664dc42ea6a69 (diff)
downloadqemu-ae1857eca22b58d430941730bd097e95a484652c.tar.gz
target-arm: Make VFP binop helpers take pointer to fpstatus, not CPUState
Make the VFP binop helper functions take a pointer to the fp status, not the entire CPUState. This will allow us to use them for Neon operations too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 12084167d6..9f14781d5d 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2453,13 +2453,15 @@ void vfp_set_fpscr(CPUState *env, uint32_t val)
#define VFP_HELPER(name, p) HELPER(glue(glue(vfp_,name),p))
#define VFP_BINOP(name) \
-float32 VFP_HELPER(name, s)(float32 a, float32 b, CPUState *env) \
+float32 VFP_HELPER(name, s)(float32 a, float32 b, void *fpstp) \
{ \
- return float32_ ## name (a, b, &env->vfp.fp_status); \
+ float_status *fpst = fpstp; \
+ return float32_ ## name(a, b, fpst); \
} \
-float64 VFP_HELPER(name, d)(float64 a, float64 b, CPUState *env) \
+float64 VFP_HELPER(name, d)(float64 a, float64 b, void *fpstp) \
{ \
- return float64_ ## name (a, b, &env->vfp.fp_status); \
+ float_status *fpst = fpstp; \
+ return float64_ ## name(a, b, fpst); \
}
VFP_BINOP(add)
VFP_BINOP(sub)