[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/10] tcg: Register the helper info struct rath
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 07/10] tcg: Register the helper info struct rather than the name |
Date: |
Tue, 13 May 2014 10:36:09 +0100 |
User-agent: |
mu4e 0.9.9.6pre3; emacs 24.3.91.1 |
Richard Henderson <address@hidden> writes:
> This will let us find all the info from the hash table.
>
> Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
> ---
> tcg/tcg.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index b64471f..3bbf982 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -356,7 +356,7 @@ void tcg_context_init(TCGContext *s)
>
> for (i = 0; i < ARRAY_SIZE(all_helpers); ++i) {
> g_hash_table_insert(helper_table, (gpointer)all_helpers[i].func,
> - (gpointer)all_helpers[i].name);
> + (gpointer)&all_helpers[i]);
> }
>
> tcg_target_init(s);
> @@ -1149,7 +1149,10 @@ static inline const char *tcg_find_helper(TCGContext
> *s, uintptr_t val)
> {
> const char *ret = NULL;
> if (s->helpers) {
> - ret = g_hash_table_lookup(s->helpers, (gpointer)val);
> + TCGHelperInfo *info = g_hash_table_lookup(s->helpers, (gpointer)val);
> + if (info) {
> + ret = info->name;
> + }
> }
> return ret;
> }
--
Alex Bennée
- [Qemu-devel] [PATCH 05/10] tcg: Inline tcg_gen_helperN, (continued)
- [Qemu-devel] [PATCH 05/10] tcg: Inline tcg_gen_helperN, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 06/10] tcg: Move side effects out of dh_sizemask, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 04/10] tcg: Use helper-gen.h in tcg-op.h, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 08/10] tcg: Save flags and computed sizemask in TCGHelperInfo, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 07/10] tcg: Register the helper info struct rather than the name, Richard Henderson, 2014/05/12
- Re: [Qemu-devel] [PATCH 07/10] tcg: Register the helper info struct rather than the name,
Alex Bennée <=
- [Qemu-devel] [PATCH 09/10] tcg: Remove sizemask and flags arguments to tcg_gen_callN, Richard Henderson, 2014/05/12
- [Qemu-devel] [PATCH 10/10] tcg: Move size effects out of dh_arg, Richard Henderson, 2014/05/12