]> www.infradead.org Git - users/dwmw2/qemu.git/commit
target/hppa: Speed up hppa_is_pa20()
authorHelge Deller <deller@gmx.de>
Sun, 29 Dec 2024 23:41:54 +0000 (00:41 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 13 Jan 2025 16:16:04 +0000 (17:16 +0100)
commit5c27cbd7b2ab825528086c0bd10029556ab88fd8
treecd32cfdc753f3fc5b81512f4a0afb804bceff5d2
parent46f7be06c8e568ec5d5c4aa07c81b42fc0fc863a
target/hppa: Speed up hppa_is_pa20()

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>
Co-developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20241231190620.24442-7-philmd@linaro.org>
target/hppa/cpu.c
target/hppa/cpu.h