diff mbox series

[3/7] tcg/tcg-op: Document bswap64() byte pattern

Message ID 20230822093712.38922-4-philmd@linaro.org
State Superseded
Headers show
Series tcg: Document *swap/deposit helpers | expand

Commit Message

Philippe Mathieu-Daudé Aug. 22, 2023, 9:37 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tcg/tcg-op.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Richard Henderson Aug. 22, 2023, 4 p.m. UTC | #1
On 8/22/23 02:37, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tcg/tcg-op.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
> index e6b0d74a46..f4fe13e040 100644
> --- a/tcg/tcg-op.c
> +++ b/tcg/tcg-op.c
> @@ -1828,6 +1828,11 @@ void tcg_gen_bswap32_i64(TCGv_i64 ret, TCGv_i64 arg, int flags)
>       }
>   }
>   
> +/*
> + * bswap64_i64: 64-bit byte swap on a 64-bit value.
> + *
> + * Byte pattern:  bswap64_i64(abcdefgh) -> hgfedcba
> + */
>   void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg)
>   {
>       if (TCG_TARGET_REG_BITS == 32) {

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index e6b0d74a46..f4fe13e040 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -1828,6 +1828,11 @@  void tcg_gen_bswap32_i64(TCGv_i64 ret, TCGv_i64 arg, int flags)
     }
 }
 
+/*
+ * bswap64_i64: 64-bit byte swap on a 64-bit value.
+ *
+ * Byte pattern:  bswap64_i64(abcdefgh) -> hgfedcba
+ */
 void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg)
 {
     if (TCG_TARGET_REG_BITS == 32) {