diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2018-06-29 15:11:09 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-06-29 15:11:09 +0100 |
commit | 3887c0388d39930ab419d4ae6e8ca5ea67a74ad5 (patch) | |
tree | fd96f6c895afe78996bad854b08ba665ba38da7f /target/arm/translate-sve.c | |
parent | 23fbe79faa38cb4acc59f956a63feba3c2cc73ac (diff) | |
download | qemu-3887c0388d39930ab419d4ae6e8ca5ea67a74ad5.zip qemu-3887c0388d39930ab419d4ae6e8ca5ea67a74ad5.tar.gz qemu-3887c0388d39930ab419d4ae6e8ca5ea67a74ad5.tar.bz2 |
target/arm: Implement SVE Floating Point Unary Operations - Unpredicated Group
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180627043328.11531-21-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/translate-sve.c')
-rw-r--r-- | target/arm/translate-sve.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b026ee3..b801909 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3508,6 +3508,53 @@ DO_VPZ(FMINV, fminv) DO_VPZ(FMAXV, fmaxv) /* + *** SVE Floating Point Unary Operations - Unpredicated Group + */ + +static void do_zz_fp(DisasContext *s, arg_rr_esz *a, gen_helper_gvec_2_ptr *fn) +{ + unsigned vsz = vec_full_reg_size(s); + TCGv_ptr status = get_fpstatus_ptr(a->esz == MO_16); + + tcg_gen_gvec_2_ptr(vec_full_reg_offset(s, a->rd), + vec_full_reg_offset(s, a->rn), + status, vsz, vsz, 0, fn); + tcg_temp_free_ptr(status); +} + +static bool trans_FRECPE(DisasContext *s, arg_rr_esz *a, uint32_t insn) +{ + static gen_helper_gvec_2_ptr * const fns[3] = { + gen_helper_gvec_frecpe_h, + gen_helper_gvec_frecpe_s, + gen_helper_gvec_frecpe_d, + }; + if (a->esz == 0) { + return false; + } + if (sve_access_check(s)) { + do_zz_fp(s, a, fns[a->esz - 1]); + } + return true; +} + +static bool trans_FRSQRTE(DisasContext *s, arg_rr_esz *a, uint32_t insn) +{ + static gen_helper_gvec_2_ptr * const fns[3] = { + gen_helper_gvec_frsqrte_h, + gen_helper_gvec_frsqrte_s, + gen_helper_gvec_frsqrte_d, + }; + if (a->esz == 0) { + return false; + } + if (sve_access_check(s)) { + do_zz_fp(s, a, fns[a->esz - 1]); + } + return true; +} + +/* *** SVE Floating Point Accumulating Reduction Group */ |