From: Helge Deller<deller@gmx.de>
Although the hppa_is_pa20() helper is costly due to string comparisons
in object_dynamic_cast(), it is called quite often during memory lookups
and at each start of a block of instruction translations.
Speed hppa_is_pa20() up by calling object_dynamic_cast() only once at
CPU creation and store the result in the is_pa20 of struct CPUArchState.
Signed-off-by: Helge Deller<deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé<philmd@linaro.org>
v3:
- use !!object_dynamic_cast()
- typo fix in commit message
(feedback by Philippe Mathieu-Daudé)
v2:
- moved init to hppa_cpu_initfn() and is_pa20 to end of CPUArchState struct
(feedback by Richard Henderson)
---
target/hppa/cpu.c | 1 +
target/hppa/cpu.h | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)