提交 48bc6bab 编写于 作者: R Richard Henderson

tcg: Use uintptr_t in TCGHelperInfo

Reviewed-by: NAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 2ba7fae2
...@@ -634,7 +634,7 @@ void tcg_register_helper(void *func, const char *name) ...@@ -634,7 +634,7 @@ void tcg_register_helper(void *func, const char *name)
s->helpers = realloc(s->helpers, n * sizeof(TCGHelperInfo)); s->helpers = realloc(s->helpers, n * sizeof(TCGHelperInfo));
s->allocated_helpers = n; 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->helpers[s->nb_helpers].name = name;
s->nb_helpers++; s->nb_helpers++;
} }
...@@ -864,11 +864,11 @@ static int helper_cmp(const void *p1, const void *p2) ...@@ -864,11 +864,11 @@ static int helper_cmp(const void *p1, const void *p2)
} }
/* find helper definition (Note: A hash table would be better) */ /* 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; int m, m_min, m_max;
TCGHelperInfo *th; TCGHelperInfo *th;
tcg_target_ulong v; uintptr_t v;
if (unlikely(!s->helpers_sorted)) { if (unlikely(!s->helpers_sorted)) {
qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo), qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
......
...@@ -402,7 +402,7 @@ typedef struct TCGTemp { ...@@ -402,7 +402,7 @@ typedef struct TCGTemp {
} TCGTemp; } TCGTemp;
typedef struct TCGHelperInfo { typedef struct TCGHelperInfo {
tcg_target_ulong func; uintptr_t func;
const char *name; const char *name;
} TCGHelperInfo; } TCGHelperInfo;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册