diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-07-13 04:30:41 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-08-21 12:48:15 -0700 |
commit | 5680f20756fa21ca7bd72b6d9bbc8598f5b7a240 (patch) | |
tree | 0a3d2cbbcec5433e73545cec480d1ffcf07ac827 /target/xtensa/fpu_helper.c | |
parent | ed07f685adcd2c3496dbbaefc07f7e1a996fce58 (diff) |
target/xtensa: rename FPU2000 translators and helpers
Add _s suffix to all FPU2000 opcode translators and helpers that also
have double-precision variant to unify naming and allow adding DFPU
implementations. Add _fpu2k_ to the names of helpers that will have
different implementation for the DFPU .
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'target/xtensa/fpu_helper.c')
-rw-r--r-- | target/xtensa/fpu_helper.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/target/xtensa/fpu_helper.c b/target/xtensa/fpu_helper.c index 87487293f9..46e231bdaa 100644 --- a/target/xtensa/fpu_helper.c +++ b/target/xtensa/fpu_helper.c @@ -33,7 +33,7 @@ #include "exec/exec-all.h" #include "fpu/softfloat.h" -void HELPER(wur_fcr)(CPUXtensaState *env, uint32_t v) +void HELPER(wur_fpu2k_fcr)(CPUXtensaState *env, uint32_t v) { static const int rounding_mode[] = { float_round_nearest_even, @@ -56,33 +56,35 @@ float32 HELPER(neg_s)(float32 v) return float32_chs(v); } -float32 HELPER(add_s)(CPUXtensaState *env, float32 a, float32 b) +float32 HELPER(fpu2k_add_s)(CPUXtensaState *env, float32 a, float32 b) { return float32_add(a, b, &env->fp_status); } -float32 HELPER(sub_s)(CPUXtensaState *env, float32 a, float32 b) +float32 HELPER(fpu2k_sub_s)(CPUXtensaState *env, float32 a, float32 b) { return float32_sub(a, b, &env->fp_status); } -float32 HELPER(mul_s)(CPUXtensaState *env, float32 a, float32 b) +float32 HELPER(fpu2k_mul_s)(CPUXtensaState *env, float32 a, float32 b) { return float32_mul(a, b, &env->fp_status); } -float32 HELPER(madd_s)(CPUXtensaState *env, float32 a, float32 b, float32 c) +float32 HELPER(fpu2k_madd_s)(CPUXtensaState *env, + float32 a, float32 b, float32 c) { return float32_muladd(b, c, a, 0, &env->fp_status); } -float32 HELPER(msub_s)(CPUXtensaState *env, float32 a, float32 b, float32 c) +float32 HELPER(fpu2k_msub_s)(CPUXtensaState *env, + float32 a, float32 b, float32 c) { return float32_muladd(b, c, a, float_muladd_negate_product, &env->fp_status); } -uint32_t HELPER(ftoi)(float32 v, uint32_t rounding_mode, uint32_t scale) +uint32_t HELPER(ftoi_s)(float32 v, uint32_t rounding_mode, uint32_t scale) { float_status fp_status = {0}; @@ -90,7 +92,7 @@ uint32_t HELPER(ftoi)(float32 v, uint32_t rounding_mode, uint32_t scale) return float32_to_int32(float32_scalbn(v, scale, &fp_status), &fp_status); } -uint32_t HELPER(ftoui)(float32 v, uint32_t rounding_mode, uint32_t scale) +uint32_t HELPER(ftoui_s)(float32 v, uint32_t rounding_mode, uint32_t scale) { float_status fp_status = {0}; float32 res; @@ -106,13 +108,13 @@ uint32_t HELPER(ftoui)(float32 v, uint32_t rounding_mode, uint32_t scale) } } -float32 HELPER(itof)(CPUXtensaState *env, uint32_t v, uint32_t scale) +float32 HELPER(itof_s)(CPUXtensaState *env, uint32_t v, uint32_t scale) { return float32_scalbn(int32_to_float32(v, &env->fp_status), (int32_t)scale, &env->fp_status); } -float32 HELPER(uitof)(CPUXtensaState *env, uint32_t v, uint32_t scale) +float32 HELPER(uitof_s)(CPUXtensaState *env, uint32_t v, uint32_t scale) { return float32_scalbn(uint32_to_float32(v, &env->fp_status), (int32_t)scale, &env->fp_status); |