All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 04/16] target/arm: Use cpu_*_data_ra for sve_ldst_tlb_fn
Date: Thu, 16 Apr 2020 13:19:23 +0100	[thread overview]
Message-ID: <CAFEAcA9D9cpx5vxtuaeVonFJ0NNKjMOB6viPuE0+ppGiqZSMFw@mail.gmail.com> (raw)
In-Reply-To: <20200311064420.30606-5-richard.henderson@linaro.org>

On Wed, 11 Mar 2020 at 06:44, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Use the "normal" memory access functions, rather than the
> softmmu internal helper functions directly.
>
> Since fb901c905dc3, cpu_mem_index is now a simple extract
> from env->hflags and not a large computation.  Which means
> that it's now more work to pass around this value than it
> is to recompute it.
>
> This only adjusts the primitives, and does not clean up
> all of the uses within sve_helper.c.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/sve_helper.c | 241 ++++++++++++++++++----------------------
>  1 file changed, 107 insertions(+), 134 deletions(-)

> +#ifdef TARGET_WORDS_BIGENDIAN
> +# define be_bswap16(x)  ((uint16_t)(x))
> +# define be_bswap32(x)  ((uint32_t)(x))
> +# define be_bswap64(x)  ((uint64_t)(x))
> +# define le_bswap16(x)  bswap16(x)
> +# define le_bswap32(x)  bswap32(x)
> +# define le_bswap64(x)  bswap64(x)
> +#else
> +# define be_bswap16(x)  bswap16(x)
> +# define be_bswap32(x)  bswap32(x)
> +# define be_bswap64(x)  bswap64(x)
> +# define le_bswap16(x)  ((uint16_t)(x))
> +# define le_bswap32(x)  ((uint32_t)(x))
> +# define le_bswap64(x)  ((uint64_t)(x))
> +#endif

Am I confused, or are these just reimplementing
cpu_to_be16()/cpu_to_le16()/le16_to_cpu()/be16_to_cpu() etc from bswap.h ?

(It seems a pity to have to lose the memory subsystem handling
endianness for us.)

thanks
-- PMM


  reply	other threads:[~2020-04-16 12:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  6:44 [PATCH 00/16] target/arm: sve load/store improvements Richard Henderson
2020-03-11  6:44 ` [PATCH 01/16] accel/tcg: Add block comment for probe_access Richard Henderson
2020-04-16 11:50   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 02/16] accel/tcg: Add probe_access_flags Richard Henderson
2020-03-12  4:33   ` [PATCH v2 " Richard Henderson
2020-04-16 11:54     ` Peter Maydell
2020-04-18  0:05       ` Richard Henderson
2020-03-12  4:38   ` [PATCH " Richard Henderson
2020-03-11  6:44 ` [PATCH 03/16] exec: Add cpu_probe_watchpoint Richard Henderson
2020-04-16 12:08   ` Peter Maydell
2020-04-18  2:14     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 04/16] target/arm: Use cpu_*_data_ra for sve_ldst_tlb_fn Richard Henderson
2020-04-16 12:19   ` Peter Maydell [this message]
2020-04-18  2:16     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 05/16] target/arm: Drop manual handling of set/clear_helper_retaddr Richard Henderson
2020-04-16 12:23   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 06/16] target/arm: Add sve infrastructure for page lookup Richard Henderson
2020-04-16 13:03   ` Peter Maydell
2020-04-18  3:11     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 07/16] target/arm: Adjust interface of sve_ld1_host_fn Richard Henderson
2020-04-16 13:16   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 08/16] target/arm: Use SVEContLdSt in sve_ld1_r Richard Henderson
2020-04-16 13:26   ` Peter Maydell
2020-04-18  3:41     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 09/16] target/arm: Handle watchpoints " Richard Henderson
2020-04-16 13:29   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 10/16] target/arm: Use SVEContLdSt for multi-register contiguous loads Richard Henderson
2020-04-16 13:35   ` Peter Maydell
2020-04-18  3:26     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 11/16] target/arm: Update contiguous first-fault and no-fault loads Richard Henderson
2020-04-16 14:15   ` Peter Maydell
2020-04-18  3:36     ` Richard Henderson
2020-03-11  6:44 ` [PATCH 12/16] target/arm: Use SVEContLdSt for contiguous stores Richard Henderson
2020-04-16 14:18   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 13/16] target/arm: Reuse sve_probe_page for gather first-fault loads Richard Henderson
2020-04-16 14:23   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 14/16] target/arm: Reuse sve_probe_page for scatter stores Richard Henderson
2020-04-16 14:25   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 15/16] target/arm: Reuse sve_probe_page for gather loads Richard Henderson
2020-04-16 14:21   ` Peter Maydell
2020-03-11  6:44 ` [PATCH 16/16] target/arm: Remove sve_memopidx Richard Henderson
2020-04-16 14:27   ` Peter Maydell
2020-03-11  7:10 ` [PATCH 00/16] target/arm: sve load/store improvements no-reply
2020-04-16 14:28 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA9D9cpx5vxtuaeVonFJ0NNKjMOB6viPuE0+ppGiqZSMFw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.