qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] tcg: Factor hrev{32,64}_{i32,i64,tl} out
@ 2023-08-22 12:40 Philippe Mathieu-Daudé
  2023-08-22 12:40 ` [PATCH 01/12] tcg/tcg-op: Factor tcg_gen_hrev32_i32() out Philippe Mathieu-Daudé
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-22 12:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, Song Gao, Edgar E. Iglesias,
	Richard Henderson, Greg Kurz, Aurelien Jarno, Peter Maydell,
	qemu-ppc, Daniel Henrique Barboza, Aleksandar Rikalo,
	Paolo Bonzini, David Gibson, Jiaxun Yang, Cédric Le Goater,
	Yoshinori Sato, Nicholas Piggin, Xiaojuan Yang, qemu-arm

This series factor the "byteswap each halfword within a
32/64-bit value" code duplication as generic helpers.

Modulo the documentation added, there is a good negative
diff-stat, so I believe this is a win from a maintainance
point of view.

I used "hrev" to follow the other bswap/hswap/rev helpers
but it isn't very descriptive, so any better name suggestion
is welcomed.
(In particular because there are other patterns I'd like to
factor out and then naming is getting worse, such 'wrev').

Philippe Mathieu-Daudé (12):
  tcg/tcg-op: Factor tcg_gen_hrev32_i32() out
  target/arm: Use generic hrev32_i32() in ARM REV16 and VREV16 opcodes
  target/cris: Use generic hrev32_i32() in SWAPB opcode
  target/rx: Use generic hrev32_i32() in REVW opcode
  tcg/tcg-op: Factor tcg_gen_hrev64_i64() out
  target/mips: Use generic hrev64_i64() in DSBH opcode
  target/ppc: Use generic hrev64_i64() in BRH / BSWAP16x8 opcodes
  target/loongarch: Use generic hrev64_i64() in REVB.4H opcode
  tcg/tcg-op: Add tcg_gen_hrev32_i64() and tcg_gen_hrev_i64()
  target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode
  target/loongarch: Use generic hrev64_i32() in REVB.2H opcode
  target/mips: Use generic hrev32_tl() in WSBH opcode

 docs/devel/tcg-ops.rst                      | 10 +++
 include/tcg/tcg-op-common.h                 |  4 +
 include/tcg/tcg-op.h                        |  2 +
 target/arm/tcg/translate-a32.h              |  1 -
 target/arm/tcg/translate-a64.c              | 11 +--
 target/arm/tcg/translate-neon.c             |  2 +-
 target/arm/tcg/translate.c                  | 14 +---
 target/cris/translate.c                     | 20 +----
 target/mips/tcg/translate.c                 | 24 +-----
 target/ppc/translate.c                      | 10 +--
 target/rx/translate.c                       |  8 +-
 tcg/tcg-op.c                                | 81 ++++++++++++++++++---
 target/cris/translate_v10.c.inc             |  2 +-
 target/loongarch/insn_trans/trans_bit.c.inc | 30 +-------
 target/ppc/translate/vsx-impl.c.inc         | 19 +----
 15 files changed, 99 insertions(+), 139 deletions(-)

-- 
2.41.0



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

end of thread, other threads:[~2023-08-25  7:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 12:40 [PATCH 00/12] tcg: Factor hrev{32,64}_{i32,i64,tl} out Philippe Mathieu-Daudé
2023-08-22 12:40 ` [PATCH 01/12] tcg/tcg-op: Factor tcg_gen_hrev32_i32() out Philippe Mathieu-Daudé
2023-08-22 12:40 ` [PATCH 02/12] target/arm: Use generic hrev32_i32() in ARM REV16 and VREV16 opcodes Philippe Mathieu-Daudé
2023-08-22 12:40 ` [PATCH 03/12] target/cris: Use generic hrev32_i32() in SWAPB opcode Philippe Mathieu-Daudé
2023-08-22 13:27   ` Philippe Mathieu-Daudé
2023-08-22 12:40 ` [PATCH 04/12] target/rx: Use generic hrev32_i32() in REVW opcode Philippe Mathieu-Daudé
2023-08-22 12:40 ` [PATCH 05/12] tcg/tcg-op: Factor tcg_gen_hrev64_i64() out Philippe Mathieu-Daudé
2023-08-22 12:46 ` [PATCH 10/12] target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode Philippe Mathieu-Daudé
2023-08-22 12:47 ` [PATCH 09/12] tcg/tcg-op: Add tcg_gen_hrev32_i64() and tcg_gen_hrev_i64() Philippe Mathieu-Daudé
2023-08-22 12:51 ` [PATCH 08/12] target/loongarch: Use generic hrev64_i64() in REVB.4H opcode Philippe Mathieu-Daudé
2023-08-22 13:28   ` Philippe Mathieu-Daudé
2023-08-22 14:02     ` Philippe Mathieu-Daudé
2023-08-22 12:52 ` [PATCH 11/12] target/loongarch: Use generic hrev64_i32() in REVB.2H opcode Philippe Mathieu-Daudé
2023-08-22 13:30   ` Philippe Mathieu-Daudé
2023-08-22 16:11     ` Philippe Mathieu-Daudé
2023-08-22 17:04       ` Richard Henderson
2023-08-22 12:53 ` [PATCH 07/12] target/ppc: Use generic hrev64_i64() in BRH / BSWAP16x8 opcodes Philippe Mathieu-Daudé
2023-08-22 19:35   ` Daniel Henrique Barboza
2023-08-25  7:38   ` Nicholas Piggin
2023-08-22 12:57 ` [PATCH 06/12] target/mips: Use generic hrev64_i64() in DSBH opcode Philippe Mathieu-Daudé
2023-08-22 12:57 ` [PATCH 12/12] target/mips: Use generic hrev32_tl() in WSBH opcode Philippe Mathieu-Daudé
2023-08-22 15:42   ` Richard Henderson
2023-08-22 16:59     ` Philippe Mathieu-Daudé
2023-08-22 15:37 ` [PATCH 00/12] tcg: Factor hrev{32,64}_{i32,i64,tl} out Richard Henderson
2023-08-25  7:58 ` Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).