Skip to content

tcg-aarch64 improvements

Richard Henderson qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest33 patches 32 repliesIn review
  2. v3 posting 2/229 patches 28 repliesSuperseded
  3. v3 posting 1/20 of 29 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC14 patches0 repliesSuperseded

Changes in v4 from the cover letter

* Using TCGType instead of bool for the ext variables.

* Marginal tidying of the tcg_fmt_* functions to match fields names with the architecture document now that it's released. In particular, the ext variables incoming to them have been renamed "sf". I have not propagated that change all the way back up the call chain.

* Split up the movi improvements into 3 separate patches. I also fixed the bug therein that affected i386-softmmu booting. I've also significantly improved the documentation in that function.

* I came up with a significantly faster way to actually perform the MOVN check, although I didn't confuse the issue by actually implementing it, since it requires using the neon unit, and probably real hardware to see what kind of inter-unit slow down there is. It's left as a comment. I actually suspect that the parallelism of the A57 is high enough to support performing 3 tests at once, deciding which of the 3 alternatives at once at the end.

* Split up the movcond addition and setcond cleanup. I did not find a problem in either patch, as suggested during the previous review.

* Rebase vs head, 2d1fe18.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/33tcg-aarch64: Change all ext variables to TCGTypetcg/aarch64/tcg-target.c+37 -270 replies
2/33tcg-aarch64: Set ext based on TCG_OPF_64BITtcg/aarch64/tcg-target.c+7 -210 replies
3/33tcg-aarch64: Don't handle mov/movi in tcg_out_optcg/aarch64/tcg-target.c+7 -133 replies
4/33tcg-aarch64: Hoist common argument loads in tcg_out_optcg/aarch64/tcg-target.c+50 -457 replies
5/33tcg-aarch64: Change enum aarch64_arith_opc to AArch64Insntcg/aarch64/tcg-target.c+23 -200 replies
6/33tcg-aarch64: Merge enum aarch64_srr_opc with AArch64Insntcg/aarch64/tcg-target.c+24 -253 replies
7/33tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmptcg/aarch64/tcg-target.c+5 -51 reply
8/33tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsltcg/aarch64/tcg-target.c+38 -408 replies
9/33tcg-aarch64: Introduce tcg_fmt_Rdn_aimmtcg/aarch64/tcg-target.c+31 -481 reply
10/33tcg-aarch64: Implement mov with tcg_fmt_* functionstcg/aarch64/tcg-target.c+10 -141 reply
11/33tcg-aarch64: Handle constant operands to add, sub, and comparetcg/aarch64/tcg-target.c+80 -233 replies
12/33tcg-aarch64: Handle constant operands to and, or, xortcg/aarch64/tcg-target.c+106 -490 replies
13/33tcg-aarch64: Support andc, orc, eqv, nottcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+65 -160 replies
14/33tcg-aarch64: Handle zero as first argument to subtcg/aarch64/tcg-target.c+24 -40 replies
15/33tcg-aarch64: Support movcondtcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+25 -30 replies
16/33tcg-aarch64: Use tcg_fmt_Rdnm_cond for setcondtcg/aarch64/tcg-target.c+3 -90 replies
17/33tcg-aarch64: Support deposittcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+38 -150 replies
18/33tcg-aarch64: Support add2, sub2tcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+82 -40 replies
19/33tcg-aarch64: Support muluh, mulshtcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+14 -20 replies
20/33tcg-aarch64: Support div, remtcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+46 -130 replies
21/33tcg-aarch64: Introduce tcg_fmt_Rd_uimmtcg/aarch64/tcg-target.c+28 -210 replies
22/33tcg-aarch64: Use MOVN in tcg_out_movitcg/aarch64/tcg-target.c+75 -134 replies
23/33tcg-aarch64: Use ORRI in tcg_out_movitcg/aarch64/tcg-target.c+9 -00 replies
24/33tcg-aarch64: Special case small constants in tcg_out_movitcg/aarch64/tcg-target.c+11 -00 replies
25/33tcg-aarch64: Use adrp in tcg_out_movitcg/aarch64/tcg-target.c+22 -10 replies
26/33tcg-aarch64: Avoid add with zero in tlb loadtcg/aarch64/tcg-target.c+18 -60 replies
27/33tcg-aarch64: Pass return address to load/store helpers directly.include/exec/exec-all.h tcg/aarch64/tcg-target.c+26 -290 replies
28/33tcg-aarch64: Use tcg_out_call for qemu_ld/sttcg/aarch64/tcg-target.c+2 -60 replies
29/33tcg-aarch64: Use symbolic names for branchestcg/aarch64/tcg-target.c+24 -240 replies
30/33tcg-aarch64: Implement tcg_register_jittcg/aarch64/tcg-target.c+70 -230 replies
31/33tcg-aarch64: Reuse FP and LR in translated codetcg/aarch64/tcg-target.c tcg/aarch64/tcg-target.h+32 -360 replies
32/33tcg-aarch64: Introduce tcg_out_ldst_pairtcg/aarch64/tcg-target.c+27 -570 replies
33/33tcg-aarch64: Remove redundant CPU_TLB_ENTRY_BITS checktcg/aarch64/tcg-target.c+0 -61 reply

Reviews trailers per patch

2 of 33 patches have a Reviewed-by or Acked-by.

PatchClaudio Fontana
1/33
2/33
3/33
4/33
5/33
6/33
7/33R-b
8/33
9/33
10/33
11/33
12/33
13/33
14/33
15/33
16/33
17/33
18/33
19/33
20/33
21/33
22/33
23/33
24/33
25/33
26/33
27/33
28/33
29/33
30/33
31/33
32/33
33/33R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 00/33] tcg-aarch64 improvements

Changes since v3:
* Using TCGType instead of bool for the ext variables.

* Marginal tidying of the tcg_fmt_* functions to match fields names with the architecture document now that it's released. In particular, the ext variables incoming to them have been renamed "sf". I have not propagated that change all the way back up the call chain.

* Split up the movi improvements into 3 separate patches. I also fixed the bug therein that affected i386-softmmu booting. I've also significantly improved the documentation in that function.

* I came up with a significantly faster way to actually perform the MOVN check, although I didn't confuse the issue by actually implementing it, since it requires using the neon unit, and probably real hardware to see what kind of inter-unit slow down there is. It's left as a comment. I actually suspect that the parallelism of the A57 is high enough to support performing 3 tests at once, deciding which of the 3 alternatives at once at the end.

* Split up the movcond addition and setcond cleanup. I did not find a problem in either patch, as suggested during the previous review.

* Rebase vs head, 2d1fe18.

Tested bios boots of i386-softmmu, alpha-softmmu, sparc-softmmu. Tested a full run of Paulo's sieve{32,64}.flat. Takes around an hour to run under the Foundation model. Ouch.

r~

Richard Henderson (33):
tcg-aarch64: Change all ext variables to TCGType
tcg-aarch64: Set ext based on TCG_OPF_64BIT
tcg-aarch64: Don't handle mov/movi in tcg_out_op
tcg-aarch64: Hoist common argument loads in tcg_out_op
tcg-aarch64: Change enum aarch64_arith_opc to AArch64Insn
tcg-aarch64: Merge enum aarch64_srr_opc with AArch64Insn
tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmp
tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl
tcg-aarch64: Introduce tcg_fmt_Rdn_aimm
tcg-aarch64: Implement mov with tcg_fmt_* functions
tcg-aarch64: Handle constant operands to add, sub, and compare
tcg-aarch64: Handle constant operands to and, or, xor
tcg-aarch64: Support andc, orc, eqv, not
tcg-aarch64: Handle zero as first argument to sub
tcg-aarch64: Support movcond
tcg-aarch64: Use tcg_fmt_Rdnm_cond for setcond
tcg-aarch64: Support deposit
tcg-aarch64: Support add2, sub2
tcg-aarch64: Support muluh, mulsh
tcg-aarch64: Support div, rem
tcg-aarch64: Introduce tcg_fmt_Rd_uimm
tcg-aarch64: Use MOVN in tcg_out_movi
tcg-aarch64: Use ORRI in tcg_out_movi
tcg-aarch64: Special case small constants in tcg_out_movi
tcg-aarch64: Use adrp in tcg_out_movi
tcg-aarch64: Avoid add with zero in tlb load
tcg-aarch64: Pass return address to load/store helpers directly.
tcg-aarch64: Use tcg_out_call for qemu_ld/st
tcg-aarch64: Use symbolic names for branches
tcg-aarch64: Implement tcg_register_jit
tcg-aarch64: Reuse FP and LR in translated code
tcg-aarch64: Introduce tcg_out_ldst_pair
tcg-aarch64: Remove redundant CPU_TLB_ENTRY_BITS check

 include/exec/exec-all.h  |   11 -
 tcg/aarch64/tcg-target.c | 1352 ++++++++++++++++++++++++++++++----------------
 tcg/aarch64/tcg-target.h |   76 +--
 3 files changed, 940 insertions(+), 499 deletions(-)
Signature · 1 line
1.8.3.1