]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Convert init_cpreg_list to g_hash_table_foreach
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 16 Sep 2025 14:22:18 +0000 (07:22 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 25 Sep 2025 14:42:34 +0000 (15:42 +0100)
commitdee3c0c2cf9848cd849744474cdac108ce68a1ef
tree919fe068a4c671f0da744edf2d5ce2b36493c67d
parent7015fbabde447abe7947a7112dff6b592ae664b1
target/arm: Convert init_cpreg_list to g_hash_table_foreach

Adjust count_cpreg and add_cpreg_to_list to be used with
g_hash_table_foreach instead of g_list_foreach.  In this way we have
the ARMCPRegInfo pointer directly rather than having to look it up
from the key.

Delay the sorting of the cpreg_indexes until after add_cpreg_to_list.
This allows us to sort the data that we actually care about,
the kvm id, as computed within add_cpreg_to_list, instead of
having to repeatedly compute the kvm id within cpreg_key_compare.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c