Re: [PATCH v4 11/45] target/arm: Store cpregs key in the hash table directly

2022-05-03 Thread Peter Maydell
On Sun, 1 May 2022 at 07:05, Richard Henderson wrote: > > Cast the uint32_t key into a gpointer directly, which > allows us to avoid allocating storage for each key. > > Use g_hash_table_lookup when we already have a gpointer > (e.g. for callbacks like count_cpreg), or when using > get_arm_cp_regi

[PATCH v4 11/45] target/arm: Store cpregs key in the hash table directly

2022-04-30 Thread Richard Henderson
Cast the uint32_t key into a gpointer directly, which allows us to avoid allocating storage for each key. Use g_hash_table_lookup when we already have a gpointer (e.g. for callbacks like count_cpreg), or when using get_arm_cp_reginfo would require casting away const. Signed-off-by: Richard Hender