Skip to content

tcg: reorganize bswap* functions

Aurelien Jarno qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9tcg: rename bswap_i32/i64 functionstarget-arm/translate.c target-i386/translate.c target-m68k/translate.c +10 more+47 -470 replies
2/9tcg: allow bswap16_i32 to be implemented by TCG backendstcg/tcg-opc.h+3 -00 replies
3/9tcg: add bswap16_i64 and bswap32_i64 TCG opstcg/tcg-op.h tcg/tcg-opc.h+64 -00 replies
4/9tcg: add _tl aliases to bswap16/32/64 TCG opstcg/tcg-op.h+5 -00 replies
5/9tcg: update README wrt recent bswap changestcg/README+7 -60 replies
6/9target-ppc: use the new bswap* TCG opstarget-ppc/translate.c+15 -1140 replies
7/9target-i386: use the new bswap* TCG opstarget-i386/translate.c+2 -130 replies
8/9tcg/x86: add bswap16_i32 opstcg/i386/tcg-target.c tcg/i386/tcg-target.h+7 -00 replies
9/9tcg/x86_64: add bswap16_i{32, 64} and bswap32_i64 opstcg/x86_64/tcg-target.c tcg/x86_64/tcg-target.h+13 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/9] tcg: reorganize bswap* functions

Hi all,

This patch series tries to reorganize a bit the bswap* TCG functions.

Currently we have bswap16_i32, bswap_i32 and bswap_i64, which means that on a 64-bit target operating on 16- or 32-bit data (eg lhbrw/lwbrx on powerpc), we need first to convert the 64-bit register value to a 32-bit value, then apply bswap16_i32 and convert it back to a 64-bit register.

The patches define bswap16 and bswap32 for both i32 and i64 types, as well as bswap64 for i64 type. The corresponding instructions are implemented for x86 and x86_64 backends.

Best regards,
Aurelien

Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net