All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcg: Add tcg_gen_bswap_tl alias
@ 2020-12-16 18:05 Richard Henderson
  2020-12-17  1:27 ` Frank Chang
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2020-12-16 18:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: frank.chang

The alias is intended to indicate that the bswap is for the
entire target_long.  This should avoid ifdefs on some targets.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 include/tcg/tcg-op.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
index 5abf17fecc..5b3bdacc39 100644
--- a/include/tcg/tcg-op.h
+++ b/include/tcg/tcg-op.h
@@ -1085,6 +1085,7 @@ void tcg_gen_stl_vec(TCGv_vec r, TCGv_ptr base, TCGArg offset, TCGType t);
 #define tcg_gen_bswap16_tl tcg_gen_bswap16_i64
 #define tcg_gen_bswap32_tl tcg_gen_bswap32_i64
 #define tcg_gen_bswap64_tl tcg_gen_bswap64_i64
+#define tcg_gen_bswap_tl tcg_gen_bswap64_i64
 #define tcg_gen_concat_tl_i64 tcg_gen_concat32_i64
 #define tcg_gen_extr_i64_tl tcg_gen_extr32_i64
 #define tcg_gen_andc_tl tcg_gen_andc_i64
@@ -1197,6 +1198,7 @@ void tcg_gen_stl_vec(TCGv_vec r, TCGv_ptr base, TCGArg offset, TCGType t);
 #define tcg_gen_ext32s_tl tcg_gen_mov_i32
 #define tcg_gen_bswap16_tl tcg_gen_bswap16_i32
 #define tcg_gen_bswap32_tl tcg_gen_bswap32_i32
+#define tcg_gen_bswap_tl tcg_gen_bswap32_i32
 #define tcg_gen_concat_tl_i64 tcg_gen_concat_i32_i64
 #define tcg_gen_extr_i64_tl tcg_gen_extr_i64_i32
 #define tcg_gen_andc_tl tcg_gen_andc_i32
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcg: Add tcg_gen_bswap_tl alias
  2020-12-16 18:05 [PATCH] tcg: Add tcg_gen_bswap_tl alias Richard Henderson
@ 2020-12-17  1:27 ` Frank Chang
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Chang @ 2020-12-17  1:27 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel@nongnu.org Developers

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

On Thu, Dec 17, 2020 at 2:05 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> The alias is intended to indicate that the bswap is for the
> entire target_long.  This should avoid ifdefs on some targets.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  include/tcg/tcg-op.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h
> index 5abf17fecc..5b3bdacc39 100644
> --- a/include/tcg/tcg-op.h
> +++ b/include/tcg/tcg-op.h
> @@ -1085,6 +1085,7 @@ void tcg_gen_stl_vec(TCGv_vec r, TCGv_ptr base,
> TCGArg offset, TCGType t);
>  #define tcg_gen_bswap16_tl tcg_gen_bswap16_i64
>  #define tcg_gen_bswap32_tl tcg_gen_bswap32_i64
>  #define tcg_gen_bswap64_tl tcg_gen_bswap64_i64
> +#define tcg_gen_bswap_tl tcg_gen_bswap64_i64
>  #define tcg_gen_concat_tl_i64 tcg_gen_concat32_i64
>  #define tcg_gen_extr_i64_tl tcg_gen_extr32_i64
>  #define tcg_gen_andc_tl tcg_gen_andc_i64
> @@ -1197,6 +1198,7 @@ void tcg_gen_stl_vec(TCGv_vec r, TCGv_ptr base,
> TCGArg offset, TCGType t);
>  #define tcg_gen_ext32s_tl tcg_gen_mov_i32
>  #define tcg_gen_bswap16_tl tcg_gen_bswap16_i32
>  #define tcg_gen_bswap32_tl tcg_gen_bswap32_i32
> +#define tcg_gen_bswap_tl tcg_gen_bswap32_i32
>  #define tcg_gen_concat_tl_i64 tcg_gen_concat_i32_i64
>  #define tcg_gen_extr_i64_tl tcg_gen_extr_i64_i32
>  #define tcg_gen_andc_tl tcg_gen_andc_i32
> --
> 2.25.1
>
>
Thanks, I'll apply this one to my RISC-V B-extension patchset.

Reviewed-by: Frank Chang <frank.chang@sifive.com>

[-- Attachment #2: Type: text/html, Size: 2086 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-17  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 18:05 [PATCH] tcg: Add tcg_gen_bswap_tl alias Richard Henderson
2020-12-17  1:27 ` Frank Chang

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.