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>
This commit is contained in:
Peter Maydell 2011-05-25 14:51:48 +00:00
parent 5aaebd13da
commit ae1857eca2
3 changed files with 25 additions and 18 deletions

View file

@ -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)