On 11/28/24 15:38, Pierrick Bouvier wrote:
When running with a single vcpu, we can return a constant instead of a
load when accessing cpu_index.
A side effect is that all tcg operations using it are optimized, most
notably scoreboard access.
When running a simple loop in user-mode, the speedup is around 20%.
Signed-off-by: Pierrick Bouvier<pierrick.bouvier@linaro.org>
---
v2:
- no need to do a flush, as user-mode already does it when spawning a
second cpu (to honor CF_PARALLEL flags).
- change condition detection to use CF_PARALLEL instead
---
accel/tcg/plugin-gen.c | 9 +++++++++
1 file changed, 9 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~