[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/28] tcg: Add flags argument to bswap opcodes
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 01/28] tcg: Add flags argument to bswap opcodes |
Date: |
Mon, 14 Jun 2021 11:19:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 6/14/21 10:37 AM, Richard Henderson wrote:
> This will eventually simplify front-end usage, and will allow
> backends to unset TCG_TARGET_HAS_MEMORY_BSWAP without loss of
> optimization.
>
> The argument is added during expansion, not currently exposed
> to the front end translators. Non-zero values are not yet
> supported by any backends.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/tcg/tcg-opc.h | 10 +++++-----
> include/tcg/tcg.h | 12 ++++++++++++
> tcg/tcg-op.c | 13 ++++++++-----
> tcg/README | 18 ++++++++++--------
> 4 files changed, 35 insertions(+), 18 deletions(-)
> +/*
> + * Flags for the bswap opcodes.
> + * If IZ, the input is zero-extended, otherwise unknown.
> + * If OZ or OS, the output is zero- or sign-extended respectively,
> + * otherwise the high bits are undefined.
> + */
> +enum {
> + TCG_BSWAP_IZ = 1,
> + TCG_BSWAP_OZ = 2,
> + TCG_BSWAP_OS = 4,
Matter of taste, I find "1 << x" bullet proof for flags.
Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- [PATCH 00/28] tcg: bswap improvements, Richard Henderson, 2021/06/14
- [PATCH 03/28] tcg/aarch64: Support bswap flags, Richard Henderson, 2021/06/14
- [PATCH 04/28] tcg/arm: Support bswap flags, Richard Henderson, 2021/06/14
- [PATCH 05/28] tcg/ppc: Split out tcg_out_ext{8,16,32}s, Richard Henderson, 2021/06/14
- [PATCH 01/28] tcg: Add flags argument to bswap opcodes, Richard Henderson, 2021/06/14
- Re: [PATCH 01/28] tcg: Add flags argument to bswap opcodes, Richard Henderson, 2021/06/21
[PATCH 02/28] tcg/i386: Support bswap flags, Richard Henderson, 2021/06/14
[PATCH 06/28] tcg/ppc: Split out tcg_out_sari{32,64}, Richard Henderson, 2021/06/14