Skip to content

target/sh4: misc fixes, cleanup and optimizations

Aurelien Jarno qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest15 patches 6 repliesIn review
  2. v214 patches 21 repliesSuperseded
  3. v114 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Use extr instead of extrh/extrl in gen_store_fpr64, as suggested by Richard Henderson
- Use cpu_loop_exit_restore instead of cpu_loop_exit/cpu_restore_state in superh_cpu_do_unaligned_access
- Add a patch to convert the remaining cpu_loop_exit/cpu_restore_state to cpu_loop_exit_restore
- Add Reviewed-by entries

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15target/sh4: split ctx->flags into ctx->tbflags and ctx->envflagstarget/sh4/translate.c+82 -790 replies
2/15target/sh4: get rid of DELAY_SLOT_CLEARMEtarget/sh4/cpu.h target/sh4/helper.c target/sh4/translate.c+6 -160 replies
3/15target/sh4: do not include DELAY_SLOT_TRUE in the TB statetarget/sh4/cpu.h+1 -20 replies
4/15target/sh4: move DELAY_SLOT_TRUE flag into a separate globaltarget/sh4/cpu.h target/sh4/helper.c target/sh4/translate.c+16 -180 replies
5/15target/sh4: fix BS_STOP exittarget/sh4/translate.c+3 -21 reply
6/15target/sh4: fix BS_EXCP exittarget/sh4/translate.c+7 -90 replies
7/15target/sh4: only save flags state at the end of the TBtarget/sh4/translate.c+33 -360 replies
8/15target/sh4: fold ctx->bstate = BS_BRANCH into gen_conditional_jumptarget/sh4/translate.c+3 -61 reply
9/15target/sh4: optimize gen_store_fpr64target/sh4/translate.c+1 -72 replies
10/15target/sh4: optimize gen_write_sr using extract optarget/sh4/translate.c+3 -60 replies
11/15target/sh4: generate fences for SH4target/sh4/translate.c+5 -40 replies
12/15target/sh4: implement tas.b using atomic helpertarget/sh4/translate.c+7 -120 replies
13/15target/sh4: movua.l is an SH4-A only instructiontarget/sh4/translate.c+15 -110 replies
14/15target/sh4: trap unaligned accessestarget/sh4/cpu.c target/sh4/cpu.h target/sh4/op_helper.c +1 more+25 -21 reply
15/15target/sh4: use cpu_loop_exit_restoretarget/sh4/op_helper.c+2 -81 reply

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéRichard Henderson
1/15R-b R-b
2/15R-b R-b
3/15R-b R-b
4/15R-b
5/15R-b R-b
6/15R-b R-b
7/15R-b
8/15R-b R-b
9/15R-b R-b
10/15R-b R-b
11/15R-b R-b
12/15R-b
13/15R-b R-b
14/15R-b R-b
15/15R-b

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

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/15] target/sh4: misc fixes, cleanup and optimizations

This patch series try to improve the SH4 target by using the (more or less) recently introduced TCG features. It also fixes some issues spot when writting the patches (linking of TB with different flags, SH4-A specific instructions allowed on SH4) and correctly trap unaligned accesses.

v3:
- Use extr instead of extrh/extrl in gen_store_fpr64, as suggested by Richard Henderson
- Use cpu_loop_exit_restore instead of cpu_loop_exit/cpu_restore_state in superh_cpu_do_unaligned_access
- Add a patch to convert the remaining cpu_loop_exit/cpu_restore_state to cpu_loop_exit_restore
- Add Reviewed-by entries

v2:
- Add some comments in the struct DisasContext declaration, as suggested by Philippe Mathieu-Daudé

Aurelien Jarno (15):
target/sh4: split ctx->flags into ctx->tbflags and ctx->envflags target/sh4: get rid of DELAY_SLOT_CLEARME
target/sh4: do not include DELAY_SLOT_TRUE in the TB state target/sh4: move DELAY_SLOT_TRUE flag into a separate global target/sh4: fix BS_STOP exit
target/sh4: fix BS_EXCP exit
target/sh4: only save flags state at the end of the TB target/sh4: fold ctx->bstate = BS_BRANCH into gen_conditional_jump target/sh4: optimize gen_store_fpr64
target/sh4: optimize gen_write_sr using extract op target/sh4: generate fences for SH4
target/sh4: implement tas.b using atomic helper target/sh4: movua.l is an SH4-A only instruction target/sh4: trap unaligned accesses
target/sh4: use cpu_loop_exit_restore

 target/sh4/cpu.c       |   1 +
 target/sh4/cpu.h       |  18 ++-
 target/sh4/helper.c    |   4 +-
 target/sh4/op_helper.c |  26 ++--
 target/sh4/translate.c | 322 +++++++++++++++++++++++--------------------------
 5 files changed, 181 insertions(+), 190 deletions(-)
Signature · 1 line
2.11.0