diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-10-03 15:59:11 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-01-11 20:52:24 -0800 |
commit | 5d630cef4f91fd842df3b0b98ae8d3ac6eb2ce4a (patch) | |
tree | 862bf51c3daaa92444b0939d89abda4791406de4 /target/xtensa/helper.h | |
parent | 32a1a94dd324d33578dca1dc96d7896a0244d768 (diff) |
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>
Diffstat (limited to 'target/xtensa/helper.h')
-rw-r--r-- | target/xtensa/helper.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/target/xtensa/helper.h b/target/xtensa/helper.h index 10153c2453..2ebba0b2c2 100644 --- a/target/xtensa/helper.h +++ b/target/xtensa/helper.h @@ -12,8 +12,6 @@ DEF_HELPER_2(rotw, void, env, i32) DEF_HELPER_3(window_check, noreturn, env, i32, i32) DEF_HELPER_1(restore_owb, void, env) DEF_HELPER_2(movsp, void, env, i32) -DEF_HELPER_2(wsr_lbeg, void, env, i32) -DEF_HELPER_2(wsr_lend, void, env, i32) #ifndef CONFIG_USER_ONLY DEF_HELPER_1(simcall, void, env) #endif |