[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 31/36] target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same i
From: |
Richard Henderson |
Subject: |
Re: [PATCH 31/36] target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same insns to decodetree |
Date: |
Thu, 30 Apr 2020 20:57:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 4/30/20 11:09 AM, Peter Maydell wrote:
> + TCGv_ptr fpstatus = get_fpstatus_ptr(1);
> + for (pass = 0; pass < (a->q ? 4 : 2); pass++) {
> + tmp = neon_load_reg(a->vn, pass);
> + tmp2 = neon_load_reg(a->vm, pass);
> + fn(tmp, tmp, tmp2, fpstatus);
> + tcg_temp_free_i32(tmp2);
> + neon_store_reg(a->vd, pass, tmp);
> + }
> + tcg_temp_free_ptr(fpstatus);
> + return true;
> +}
> +
> +/*
> + * For all the functions using this macro, size == 1 means fp16,
> + * which is an architecture extension we don't implement yet.
> + */
> +#define DO_3S_FP(INSN,FUNC) \
> + static bool trans_##INSN##_fp_3s(DisasContext *s, arg_3same *a) \
> + { \
> + if (a->size != 0) { \
> + /* TODO fp16 support */ \
> + return false; \
> + } \
> + return do_3same_fp(s, a, FUNC); \
> + }
We already have helper_gvec_fadd_s and helper_fsub_s to handle the whole vector
with one call. Use with tcg_gen_gvec_3_ptr, with the status pointer as the 4th
argument.
Interestingly, I can't find the current use of this helper. I must have been
starting on that translation but got stopped? There's no current full-vector
helper for abd_f32, but it would take very few lines to add it.
r~
- Re: [PATCH 21/36] target/arm: Convert Neon 3-reg-same SHA to decodetree, (continued)
- [PATCH 24/36] target/arm: Convert Neon VHADD 3-reg-same insns, Peter Maydell, 2020/04/30
- [PATCH 26/36] target/arm: Convert Neon VQSHL, VRSHL, VQRSHL 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 27/36] target/arm: Convert Neon VABA 3-reg-same to decodetree, Peter Maydell, 2020/04/30
- [PATCH 29/36] target/arm: Convert Neon VPADD 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 31/36] target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- Re: [PATCH 31/36] target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same insns to decodetree,
Richard Henderson <=
- [PATCH 30/36] target/arm: Convert Neon VQDMULH/VQRDMULH 3-reg-same to decodetree, Peter Maydell, 2020/04/30
- [PATCH 32/36] target/arm: Convert Neon VPMIN/VPMAX/VPADD float 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 33/36] target/arm: Convert Neon fp VMUL, VMLA, VMLS 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 28/36] target/arm: Convert Neon VPMAX/VPMIN 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 34/36] target/arm: Convert Neon 3-reg-same compare insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 35/36] target/arm: Convert Neon fp VMAX/VMIN/VMAXNM/VMINNM/VRECPS/VRSQRTS to decodetree, Peter Maydell, 2020/04/30
- [PATCH 36/36] target/arm: Convert NEON VFMA, VFMS 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30