mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 15:45:31 +00:00
exec/helper-*: Synchronize with qemu
This commit is contained in:
parent
0379335677
commit
70836028eb
|
@ -31,18 +31,10 @@
|
|||
#define dh_alias_f16 i32
|
||||
#define dh_alias_f32 i32
|
||||
#define dh_alias_f64 i64
|
||||
#ifdef TARGET_LONG_BITS
|
||||
# if TARGET_LONG_BITS == 32
|
||||
# define dh_alias_tl i32
|
||||
# else
|
||||
# define dh_alias_tl i64
|
||||
# endif
|
||||
#endif
|
||||
#define dh_alias_ptr ptr
|
||||
#define dh_alias_cptr ptr
|
||||
#define dh_alias_void void
|
||||
#define dh_alias_noreturn noreturn
|
||||
#define dh_alias_env ptr
|
||||
#define dh_alias(t) glue(dh_alias_, t)
|
||||
|
||||
#define dh_ctype_i32 uint32_t
|
||||
|
@ -53,14 +45,25 @@
|
|||
#define dh_ctype_f16 uint32_t
|
||||
#define dh_ctype_f32 float32
|
||||
#define dh_ctype_f64 float64
|
||||
#define dh_ctype_tl target_ulong
|
||||
#define dh_ctype_ptr void *
|
||||
#define dh_ctype_cptr const void *
|
||||
#define dh_ctype_void void
|
||||
#define dh_ctype_noreturn void QEMU_NORETURN
|
||||
#define dh_ctype_env CPUArchState *
|
||||
#define dh_ctype(t) dh_ctype_##t
|
||||
|
||||
#ifdef NEED_CPU_H
|
||||
# ifdef TARGET_LONG_BITS
|
||||
# if TARGET_LONG_BITS == 32
|
||||
# define dh_alias_tl i32
|
||||
# else
|
||||
# define dh_alias_tl i64
|
||||
# endif
|
||||
# endif
|
||||
# define dh_alias_env ptr
|
||||
# define dh_ctype_tl target_ulong
|
||||
# define dh_ctype_env CPUArchState *
|
||||
#endif
|
||||
|
||||
/* We can't use glue() here because it falls foul of C preprocessor
|
||||
recursive expansion rules. */
|
||||
#define dh_retvar_decl0_void void
|
||||
|
|
|
@ -11,37 +11,44 @@
|
|||
#define str(s) #s
|
||||
|
||||
#define DEF_HELPER_FLAGS_0(NAME, FLAGS, ret) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) },
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_1(NAME, FLAGS, ret, t1) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_2(NAME, FLAGS, ret, t1, t2) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
| dh_sizemask(t2, 2) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_3(NAME, FLAGS, ret, t1, t2, t3) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_4(NAME, FLAGS, ret, t1, t2, t3, t4) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_5(NAME, FLAGS, ret, t1, t2, t3, t4, t5) \
|
||||
{ HELPER(NAME), str(#NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
|
||||
| dh_sizemask(t5, 5) },
|
||||
|
||||
#define DEF_HELPER_FLAGS_6(NAME, FLAGS, ret, t1, t2, t3, t4, t5, t6) \
|
||||
{ HELPER(NAME), str(NAME), FLAGS | dh_callflag(ret), \
|
||||
dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
{ .func = HELPER(NAME), .name = str(NAME), \
|
||||
.flags = FLAGS | dh_callflag(ret), \
|
||||
.sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
|
||||
| dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
|
||||
| dh_sizemask(t5, 5) | dh_sizemask(t6, 6) },
|
||||
|
||||
|
|
Loading…
Reference in a new issue