Skip to content

Commit

Permalink
tcg: Use uintptr_t in TCGHelperInfo
Browse files Browse the repository at this point in the history
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
  • Loading branch information
rth7680 committed Sep 2, 2013
1 parent 2ba7fae commit 48bc6ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tcg/tcg.c
Expand Up @@ -634,7 +634,7 @@ void tcg_register_helper(void *func, const char *name)
s->helpers = realloc(s->helpers, n * sizeof(TCGHelperInfo));
s->allocated_helpers = n;
}
s->helpers[s->nb_helpers].func = (tcg_target_ulong)func;
s->helpers[s->nb_helpers].func = (uintptr_t)func;
s->helpers[s->nb_helpers].name = name;
s->nb_helpers++;
}
Expand Down Expand Up @@ -864,11 +864,11 @@ static int helper_cmp(const void *p1, const void *p2)
}

/* find helper definition (Note: A hash table would be better) */
static TCGHelperInfo *tcg_find_helper(TCGContext *s, tcg_target_ulong val)
static TCGHelperInfo *tcg_find_helper(TCGContext *s, uintptr_t val)
{
int m, m_min, m_max;
TCGHelperInfo *th;
tcg_target_ulong v;
uintptr_t v;

if (unlikely(!s->helpers_sorted)) {
qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
Expand Down
2 changes: 1 addition & 1 deletion tcg/tcg.h
Expand Up @@ -402,7 +402,7 @@ typedef struct TCGTemp {
} TCGTemp;

typedef struct TCGHelperInfo {
tcg_target_ulong func;
uintptr_t func;
const char *name;
} TCGHelperInfo;

Expand Down

0 comments on commit 48bc6ba

Please sign in to comment.