mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
ARM TCG conversion 7/16.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4144 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3670669ce2
commit
6ddbc6e4cf
7 changed files with 554 additions and 447 deletions
|
@ -1,4 +1,4 @@
|
|||
#define DEF_HELPER(name, ret, args) ret helper_##name args;
|
||||
#define DEF_HELPER(name, ret, args) ret glue(helper_,name) args;
|
||||
|
||||
#ifdef GEN_HELPER
|
||||
#define DEF_HELPER_1_1(name, ret, args) \
|
||||
|
@ -13,10 +13,18 @@ static inline void gen_helper_##name(TCGv ret, TCGv arg1, TCGv arg2) \
|
|||
{ \
|
||||
tcg_gen_helper_1_2(helper_##name, ret, arg1, arg2); \
|
||||
}
|
||||
#define DEF_HELPER_1_3(name, ret, args) \
|
||||
DEF_HELPER(name, ret, args) \
|
||||
static inline void gen_helper_##name(TCGv ret, \
|
||||
TCGv arg1, TCGv arg2, TCGv arg3) \
|
||||
{ \
|
||||
tcg_gen_helper_1_3(helper_##name, ret, arg1, arg2, arg3); \
|
||||
}
|
||||
#else /* !GEN_HELPER */
|
||||
#define DEF_HELPER_1_1 DEF_HELPER
|
||||
#define DEF_HELPER_1_2 DEF_HELPER
|
||||
#define HELPER(x) helper_##x
|
||||
#define DEF_HELPER_1_3 DEF_HELPER
|
||||
#define HELPER(x) glue(helper_,x)
|
||||
#endif
|
||||
|
||||
DEF_HELPER_1_1(clz, uint32_t, (uint32_t))
|
||||
|
@ -33,6 +41,40 @@ DEF_HELPER_1_2(sdiv, int32_t, (int32_t, int32_t))
|
|||
DEF_HELPER_1_2(udiv, uint32_t, (uint32_t, uint32_t))
|
||||
DEF_HELPER_1_1(rbit, uint32_t, (uint32_t))
|
||||
|
||||
#define PAS_OP(pfx) \
|
||||
DEF_HELPER_1_3(pfx ## add8, uint32_t, (uint32_t, uint32_t, uint32_t *)) \
|
||||
DEF_HELPER_1_3(pfx ## sub8, uint32_t, (uint32_t, uint32_t, uint32_t *)) \
|
||||
DEF_HELPER_1_3(pfx ## sub16, uint32_t, (uint32_t, uint32_t, uint32_t *)) \
|
||||
DEF_HELPER_1_3(pfx ## add16, uint32_t, (uint32_t, uint32_t, uint32_t *)) \
|
||||
DEF_HELPER_1_3(pfx ## addsubx, uint32_t, (uint32_t, uint32_t, uint32_t *)) \
|
||||
DEF_HELPER_1_3(pfx ## subaddx, uint32_t, (uint32_t, uint32_t, uint32_t *))
|
||||
|
||||
PAS_OP(s)
|
||||
PAS_OP(u)
|
||||
#undef PAS_OP
|
||||
|
||||
#define PAS_OP(pfx) \
|
||||
DEF_HELPER_1_2(pfx ## add8, uint32_t, (uint32_t, uint32_t)) \
|
||||
DEF_HELPER_1_2(pfx ## sub8, uint32_t, (uint32_t, uint32_t)) \
|
||||
DEF_HELPER_1_2(pfx ## sub16, uint32_t, (uint32_t, uint32_t)) \
|
||||
DEF_HELPER_1_2(pfx ## add16, uint32_t, (uint32_t, uint32_t)) \
|
||||
DEF_HELPER_1_2(pfx ## addsubx, uint32_t, (uint32_t, uint32_t)) \
|
||||
DEF_HELPER_1_2(pfx ## subaddx, uint32_t, (uint32_t, uint32_t))
|
||||
PAS_OP(q)
|
||||
PAS_OP(sh)
|
||||
PAS_OP(uq)
|
||||
PAS_OP(uh)
|
||||
#undef PAS_OP
|
||||
|
||||
DEF_HELPER_1_2(ssat, uint32_t, (uint32_t, uint32_t))
|
||||
DEF_HELPER_1_2(usat, uint32_t, (uint32_t, uint32_t))
|
||||
DEF_HELPER_1_2(ssat16, uint32_t, (uint32_t, uint32_t))
|
||||
DEF_HELPER_1_2(usat16, uint32_t, (uint32_t, uint32_t))
|
||||
|
||||
DEF_HELPER_1_2(usad8, uint32_t, (uint32_t, uint32_t))
|
||||
|
||||
DEF_HELPER_1_3(sel_flags, uint32_t, (uint32_t, uint32_t, uint32_t))
|
||||
|
||||
#undef DEF_HELPER
|
||||
#undef DEF_HELPER_1_1
|
||||
#undef DEF_HELPER_1_2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue