[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 49/57] target/arm: Add mte helpers for sve scatter/gather memo
From: |
Peter Maydell |
Subject: |
Re: [PULL 49/57] target/arm: Add mte helpers for sve scatter/gather memory ops |
Date: |
Sat, 27 Jun 2020 22:44:56 +0100 |
On Fri, 26 Jun 2020 at 16:15, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> From: Richard Henderson <richard.henderson@linaro.org>
>
> Because the elements are non-sequential, we cannot eliminate many
> tests straight away like we can for sequential operations. But
> we often have the PTE details handy, so we can test for Tagged.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> Message-id: 20200626033144.790098-38-richard.henderson@linaro.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Hi; Coverity points out that something went wrong here
(CID 1429996):
> --- a/target/arm/translate-sve.c
> +++ b/target/arm/translate-sve.c
> @@ -5261,7 +5261,7 @@ static bool trans_ST_zpri(DisasContext *s,
> arg_rpri_store *a)
> */
>
> static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm,
> - int scale, TCGv_i64 scalar, int msz,
> + int scale, TCGv_i64 scalar, int msz, bool is_write,
> gen_helper_gvec_mem_scatter *fn)
> {
> unsigned vsz = vec_full_reg_size(s);
> @@ -5269,8 +5269,16 @@ static void do_mem_zpz(DisasContext *s, int zt, int
> pg, int zm,
> TCGv_ptr t_pg = tcg_temp_new_ptr();
> TCGv_ptr t_zt = tcg_temp_new_ptr();
> TCGv_i32 t_desc;
> - int desc;
> + int desc = 0;
>
> + if (s->mte_active[0]) {
> + desc = FIELD_DP32(desc, MTEDESC, MIDX, get_mem_index(s));
> + desc = FIELD_DP32(desc, MTEDESC, TBI, s->tbid);
> + desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma);
> + desc = FIELD_DP32(desc, MTEDESC, WRITE, is_write);
> + desc = FIELD_DP32(desc, MTEDESC, ESIZE, 1 << msz);
> + desc <<= SVE_MTEDESC_SHIFT;
We carefully set up desc here...
> + }
> desc = simd_desc(vsz, vsz, scale);
...but immediately overwrite it. Should desc have been an input here somewhere?
> t_desc = tcg_const_i32(desc);
thanks
-- PMM
- [PULL 44/57] target/arm: Add arm_tlb_bti_gp, (continued)
- [PULL 44/57] target/arm: Add arm_tlb_bti_gp, Peter Maydell, 2020/06/26
- [PULL 48/57] target/arm: Handle TBI for sve scalar + int memory ops, Peter Maydell, 2020/06/26
- [PULL 39/57] target/arm: Add helper_mte_check_zva, Peter Maydell, 2020/06/26
- [PULL 45/57] target/arm: Add mte helpers for sve scalar + int loads, Peter Maydell, 2020/06/26
- [PULL 51/57] target/arm: Implement data cache set allocation tags, Peter Maydell, 2020/06/26
- [PULL 50/57] target/arm: Complete TBI clearing for user-only for SVE, Peter Maydell, 2020/06/26
- [PULL 46/57] target/arm: Add mte helpers for sve scalar + int stores, Peter Maydell, 2020/06/26
- [PULL 47/57] target/arm: Add mte helpers for sve scalar + int ff/nf loads, Peter Maydell, 2020/06/26
- [PULL 52/57] target/arm: Set PSTATE.TCO on exception entry, Peter Maydell, 2020/06/26
- [PULL 49/57] target/arm: Add mte helpers for sve scatter/gather memory ops, Peter Maydell, 2020/06/26
- Re: [PULL 49/57] target/arm: Add mte helpers for sve scatter/gather memory ops,
Peter Maydell <=
- [PULL 53/57] target/arm: Always pass cacheattr to get_phys_addr, Peter Maydell, 2020/06/26
- [PULL 54/57] target/arm: Cache the Tagged bit for a page in MemTxAttrs, Peter Maydell, 2020/06/26
- [PULL 55/57] target/arm: Create tagged ram when MTE is enabled, Peter Maydell, 2020/06/26
- [PULL 56/57] target/arm: Add allocation tag storage for system mode, Peter Maydell, 2020/06/26
- [PULL 57/57] target/arm: Enable MTE, Peter Maydell, 2020/06/26
- Re: [PULL 00/57] target-arm queue, no-reply, 2020/06/26
- Re: [PULL 00/57] target-arm queue, no-reply, 2020/06/26
- Re: [PULL 00/57] target-arm queue, Peter Maydell, 2020/06/26