qemu-patch-raspberry4/target/xtensa
Max Filippov 5d630cef4f target/xtensa: rework zero overhead loops implementation
Don't invalidate TB with the end of zero overhead loop when LBEG or LEND
change. Instead encode the distance from the start of the page where the
TB starts to the LEND in the TB cs_base and generate loopback code when
the next PC matches encoded LEND. Distance to a destination within the
same page and up to a maximum instruction length into the next page is
encoded literally, otherwise it's zero. The distance from LEND to LBEG
is also encoded in the cs_base: it's encoded literally when less than
256 or as 0 otherwise. This allows for TB chaining for the loopback
branch at the end of a loop for the most common loop sizes.

With this change the resulting emulation speed is about 10% higher in
softmmu mode on uClibc-ng and LTP tests. Emulation speed in linux
user mode is a few percent lower because there's no direct TB chaining
between different memory pages. Testing with lower limit on direct TB
chaining range shows gradual slowdown to ~15% for the block size of 64
bytes and ~50% for the block size of 32 bytes.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-01-11 20:52:24 -08:00
..
core-dc232b target/xtensa: drop num_[core_]regs from dc232b/dc233c configs 2018-11-20 12:20:41 -08:00
core-dc233c target/xtensa: drop num_[core_]regs from dc232b/dc233c configs 2018-11-20 12:20:41 -08:00
core-de212 Remove unnecessary variables for function return value 2018-05-20 08:48:13 +03:00
core-fsf Remove unnecessary variables for function return value 2018-05-20 08:48:13 +03:00
core-sample_controller Remove unnecessary variables for function return value 2018-05-20 08:48:13 +03:00
core-test_kc705_be target/xtensa: add test_kc705_be core 2018-08-19 18:57:57 -07:00
core-dc232b.c target/xtensa: drop num_[core_]regs from dc232b/dc233c configs 2018-11-20 12:20:41 -08:00
core-dc233c.c target/xtensa: drop num_[core_]regs from dc232b/dc233c configs 2018-11-20 12:20:41 -08:00
core-de212.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
core-fsf.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
core-sample_controller.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
core-test_kc705_be.c target/xtensa: add test_kc705_be core 2018-08-19 18:57:57 -07:00
cpu-qom.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu.c target/xtensa: convert to do_transaction_failed 2018-09-17 11:05:26 -07:00
cpu.h target/xtensa: rework zero overhead loops implementation 2019-01-11 20:52:24 -08:00
gdbstub.c target/xtensa: gdbstub fix register counting 2018-11-20 12:20:41 -08:00
helper.c target/xtensa: extract test for an illegal instruction 2018-10-01 11:08:35 -07:00
helper.h target/xtensa: rework zero overhead loops implementation 2019-01-11 20:52:24 -08:00
import_core.sh target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
Makefile.objs target/xtensa: add test_kc705_be core 2018-08-19 18:57:57 -07:00
monitor.c monitor: Fix crashes when using HMP commands without CPU 2017-02-21 18:29:01 +00:00
op_helper.c target/xtensa: rework zero overhead loops implementation 2019-01-11 20:52:24 -08:00
overlay_tool.h target/xtensa: rework zero overhead loops implementation 2019-01-11 20:52:24 -08:00
translate.c target/xtensa: rework zero overhead loops implementation 2019-01-11 20:52:24 -08:00
xtensa-isa-internal.h target/xtensa: import libisa source 2017-12-18 21:26:19 -08:00
xtensa-isa.c Clean up includes 2018-02-09 05:05:11 +01:00
xtensa-isa.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
xtensa-semi.c target/xtensa: support input from chardev console 2018-09-17 11:09:04 -07:00