Skip to content

Streamlining endian handling in TCG

Richard Henderson qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16tcg: Add TCGMemOptcg/tcg.h+57 -20 replies
2/16tcg-i386: Use TCGMemOp within qemu_ldst routinestcg/i386/tcg-target.c+59 -640 replies
3/16tcg-aarch64: Use TCGMemOp within qemu_ldst routinestcg/aarch64/tcg-target.c+62 -640 replies
4/16tcg-arm: Use TCGMemOp within qemu_ldst routinestcg/arm/tcg-target.c+61 -640 replies
5/16tcg-s390: Use TCGMemOp within qemu_ldst routinestcg/s390/tcg-target.c+46 -610 replies
6/16tcg-ppc: Use TCGMemOp within qemu_ldst routinestcg/ppc/tcg-target.c+43 -500 replies
7/16tcg-ppc64: Use TCGMemOp within qemu_ldst routinestcg/ppc64/tcg-target.c+44 -380 replies
8/16tcg-hppa: Use TCGMemOp within qemu_ldst routinestcg/hppa/tcg-target.c+53 -570 replies
9/16tcg-mips: Use TCGMemOp within qemu_ldst routinestcg/mips/tcg-target.c+52 -640 replies
10/16tcg-sparc: Use TCGMemOp within qemu_ldst routinestcg/sparc/tcg-target.c+65 -510 replies
11/16tcg: Add qemu_ld_st_i32/64tcg/README tcg/aarch64/tcg-target.h tcg/arm/tcg-target.h +12 more+370 -2390 replies
12/16exec: Add both big- and little-endian memory helpersinclude/exec/softmmu_template.h tcg/tcg.h+300 -510 replies
13/16tcg-i386: Tidy softmmu routinestcg/i386/tcg-target.c+234 -2750 replies
14/16tcg-i386: Remove "cb" output restriction from qemu_st8 for i386tcg/i386/tcg-target.c+8 -20 replies
15/16tcg-i386: Support new ldst opcodestcg/i386/tcg-target.c tcg/i386/tcg-target.h+51 -900 replies
16/16target-ppc: Convert to new ldst opcodestarget-ppc/translate.c+39 -1085 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 00/16] Streamlining endian handling in TCG

This patch set is far from complete, and is more of an RFC, but it contains at least one example of each of the 4-5 steps in the conversion.

Step 1 is the most complete, as it's largely a search-and-replace step on the tcg backends. The enumeration values of TCGMemOp match the current integer values, with the exception of the addition of BSWAP=8. Therefore in some places in the patches I do more masking than previous, to get rid of that bswap bit.

I at least cross-compiled to all but 3 of the tcg backends, but since the demise of a portion of the gcc compile farm I'm no longer able to test hppa, mips, sparc. And for those, downloading the proper cross environment turned out to be tricky -- curse our new external library dependencies.

After that, I've only converted the i386 backend, and the ppc frontend, to the new opcodes. I'm able to boot the fedora 19 ppc64 installer, and a browse of the dumps are encouraging.

r~

Richard Henderson (16):
tcg: Add TCGMemOp
tcg-i386: Use TCGMemOp within qemu_ldst routines
tcg-aarch64: Use TCGMemOp within qemu_ldst routines
tcg-arm: Use TCGMemOp within qemu_ldst routines
tcg-s390: Use TCGMemOp within qemu_ldst routines
tcg-ppc: Use TCGMemOp within qemu_ldst routines
tcg-ppc64: Use TCGMemOp within qemu_ldst routines
tcg-hppa: Use TCGMemOp within qemu_ldst routines
tcg-mips: Use TCGMemOp within qemu_ldst routines
tcg-sparc: Use TCGMemOp within qemu_ldst routines
tcg: Add qemu_ld_st_i32/64
exec: Add both big- and little-endian memory helpers
tcg-i386: Tidy softmmu routines
tcg-i386: Remove "cb" output restriction from qemu_st8 for i386
tcg-i386: Support new ldst opcodes
target-ppc: Convert to new ldst opcodes

 include/exec/softmmu_template.h | 286 +++++++++++++++--
 target-ppc/translate.c          | 147 +++------
 tcg/README                      |  43 ++-
 tcg/aarch64/tcg-target.c        | 126 ++++----
 tcg/aarch64/tcg-target.h        |   2 +
 tcg/arm/tcg-target.c            | 125 ++++----
 tcg/arm/tcg-target.h            |   2 +
 tcg/hppa/tcg-target.c           | 110 +++----
 tcg/hppa/tcg-target.h           |   2 +
 tcg/i386/tcg-target.c           | 695 ++++++++++++++++++----------------------
 tcg/i386/tcg-target.h           |   2 +
 tcg/ia64/tcg-target.h           |   2 +
 tcg/mips/tcg-target.c           | 116 +++----
 tcg/mips/tcg-target.h           |   2 +
 tcg/ppc/tcg-target.c            |  93 +++---
 tcg/ppc/tcg-target.h            |   2 +
 tcg/ppc64/tcg-target.c          |  82 ++---
 tcg/ppc64/tcg-target.h          |   2 +
 tcg/s390/tcg-target.c           | 107 +++----
 tcg/s390/tcg-target.h           |   2 +
 tcg/sparc/tcg-target.c          | 116 ++++---
 tcg/sparc/tcg-target.h          |   2 +
 tcg/tcg-op.h                    | 239 ++++----------
 tcg/tcg-opc.h                   |  96 ++++--
 tcg/tcg.c                       | 209 ++++++++++++
 tcg/tcg.h                       | 124 +++++--
 tcg/tci/tcg-target.h            |   2 +
 27 files changed, 1500 insertions(+), 1236 deletions(-)
Signature · 1 line
1.8.1.4