diff mbox series

[v2,7/8] tcg/tcg-op: Document wswap_i64() byte pattern

Message ID 20230823145542.79633-8-philmd@linaro.org
State New
Headers show
Series tcg: Document *swap* helper implementations | expand

Commit Message

Philippe Mathieu-Daudé Aug. 23, 2023, 2:55 p.m. UTC
Document wswap_i64(), added in commit 46be8425ff
("tcg: Implement tcg_gen_{h,w}swap_{i32,i64}").

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 tcg/tcg-op.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 94134981a9..65a2e5462e 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -1926,6 +1926,11 @@  void tcg_gen_hswap_i64(TCGv_i64 ret, TCGv_i64 arg)
     tcg_temp_free_i64(t1);
 }
 
+/*
+ * wswap_i64: Swap 32-bit words within a 64-bit value.
+ *
+ * Byte pattern:  wswap_i64(abcdefgh) -> efghabcd
+ */
 void tcg_gen_wswap_i64(TCGv_i64 ret, TCGv_i64 arg)
 {
     /* Swapping 2 32-bit elements is a rotate. */