diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-10-19 16:14:07 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2011-10-19 16:14:07 +0000 |
commit | da97f52cb35ccf72a4a3d745926ee5e3c263ed07 (patch) | |
tree | 4a83c955b33a27bc620502e3470e7fbf8ebe44dc /target-arm/helper.c | |
parent | 369be8f618ac145d2421ea4bfff86ee774ad618c (diff) |
target-arm: Implement VFPv4 fused multiply-accumulate insns
Implement the fused multiply-accumulate instructions (VFMA, VFMS,
VFNMA, VFNMS) which are new in VFPv4.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r-- | target-arm/helper.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 3a51fd73cf..eddb92307c 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -204,6 +204,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) set_feature(env, ARM_FEATURE_THUMB2); set_feature(env, ARM_FEATURE_VFP); set_feature(env, ARM_FEATURE_VFP3); + set_feature(env, ARM_FEATURE_VFP4); set_feature(env, ARM_FEATURE_VFP_FP16); set_feature(env, ARM_FEATURE_NEON); set_feature(env, ARM_FEATURE_THUMB2EE); @@ -3084,6 +3085,19 @@ uint32_t HELPER(rsqrte_u32)(uint32_t a, CPUState *env) return 0x80000000 | ((float64_val(f64) >> 21) & 0x7fffffff); } +/* VFPv4 fused multiply-accumulate */ +float32 VFP_HELPER(muladd, s)(float32 a, float32 b, float32 c, void *fpstp) +{ + float_status *fpst = fpstp; + return float32_muladd(a, b, c, 0, fpst); +} + +float64 VFP_HELPER(muladd, d)(float64 a, float64 b, float64 c, void *fpstp) +{ + float_status *fpst = fpstp; + return float64_muladd(a, b, c, 0, fpst); +} + void HELPER(set_teecr)(CPUState *env, uint32_t val) { val &= 1; |