target/ppc: Move VMH[R]ADDSHS instruction to decodetree
This patch moves VMHADDSHS and VMHRADDSHS to decodetree I couldn't find a satisfactory implementation with TCG inline. vmhaddshs: rept loop master patch 8 12500 0,02983400 0,02648500 (-11.2%) 25 4000 0,02946000 0,02518000 (-14.5%) 100 1000 0,03104300 0,02638000 (-15.0%) 500 200 0,04002000 0,03502500 (-12.5%) 2500 40 0,08090100 0,07562200 (-6.5%) 8000 12 0,19242600 0,18626800 (-3.2%) vmhraddshs: rept loop master patch 8 12500 0,03078600 0,02851000 (-7.4%) 25 4000 0,02793200 0,02746900 (-1.7%) 100 1000 0,02886000 0,02839900 (-1.6%) 500 200 0,03714700 0,03799200 (+2.3%) 2500 40 0,07948000 0,07852200 (-1.2%) 8000 12 0,19049800 0,18813900 (-1.2%) Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20221019125040.48028-3-lucas.araujo@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
dc46167a22
commit
306e475335
|
@ -258,8 +258,8 @@ DEF_HELPER_4(vpkuhum, void, env, avr, avr, avr)
|
||||||
DEF_HELPER_4(vpkuwum, void, env, avr, avr, avr)
|
DEF_HELPER_4(vpkuwum, void, env, avr, avr, avr)
|
||||||
DEF_HELPER_4(vpkudum, void, env, avr, avr, avr)
|
DEF_HELPER_4(vpkudum, void, env, avr, avr, avr)
|
||||||
DEF_HELPER_FLAGS_3(vpkpx, TCG_CALL_NO_RWG, void, avr, avr, avr)
|
DEF_HELPER_FLAGS_3(vpkpx, TCG_CALL_NO_RWG, void, avr, avr, avr)
|
||||||
DEF_HELPER_5(vmhaddshs, void, env, avr, avr, avr, avr)
|
DEF_HELPER_5(VMHADDSHS, void, env, avr, avr, avr, avr)
|
||||||
DEF_HELPER_5(vmhraddshs, void, env, avr, avr, avr, avr)
|
DEF_HELPER_5(VMHRADDSHS, void, env, avr, avr, avr, avr)
|
||||||
DEF_HELPER_FLAGS_4(VMSUMUHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
|
DEF_HELPER_FLAGS_4(VMSUMUHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
|
||||||
DEF_HELPER_5(VMSUMUHS, void, env, avr, avr, avr, avr)
|
DEF_HELPER_5(VMSUMUHS, void, env, avr, avr, avr, avr)
|
||||||
DEF_HELPER_FLAGS_4(VMSUMSHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
|
DEF_HELPER_FLAGS_4(VMSUMSHM, TCG_CALL_NO_RWG, void, avr, avr, avr, avr)
|
||||||
|
|
|
@ -694,6 +694,8 @@ VMSUMCUD 000100 ..... ..... ..... ..... 010111 @VA
|
||||||
VMSUMUDM 000100 ..... ..... ..... ..... 100011 @VA
|
VMSUMUDM 000100 ..... ..... ..... ..... 100011 @VA
|
||||||
|
|
||||||
VMLADDUHM 000100 ..... ..... ..... ..... 100010 @VA
|
VMLADDUHM 000100 ..... ..... ..... ..... 100010 @VA
|
||||||
|
VMHADDSHS 000100 ..... ..... ..... ..... 100000 @VA
|
||||||
|
VMHRADDSHS 000100 ..... ..... ..... ..... 100001 @VA
|
||||||
|
|
||||||
## Vector String Instructions
|
## Vector String Instructions
|
||||||
|
|
||||||
|
|
|
@ -939,7 +939,7 @@ target_ulong helper_vctzlsbb(ppc_avr_t *r)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void helper_vmhaddshs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
|
void helper_VMHADDSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
|
||||||
ppc_avr_t *b, ppc_avr_t *c)
|
ppc_avr_t *b, ppc_avr_t *c)
|
||||||
{
|
{
|
||||||
int sat = 0;
|
int sat = 0;
|
||||||
|
@ -957,7 +957,7 @@ void helper_vmhaddshs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void helper_vmhraddshs(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
|
void helper_VMHRADDSHS(CPUPPCState *env, ppc_avr_t *r, ppc_avr_t *a,
|
||||||
ppc_avr_t *b, ppc_avr_t *c)
|
ppc_avr_t *b, ppc_avr_t *c)
|
||||||
{
|
{
|
||||||
int sat = 0;
|
int sat = 0;
|
||||||
|
|
|
@ -2521,7 +2521,7 @@ static void glue(gen_, name0##_##name1)(DisasContext *ctx) \
|
||||||
tcg_temp_free_ptr(rd); \
|
tcg_temp_free_ptr(rd); \
|
||||||
}
|
}
|
||||||
|
|
||||||
GEN_VAFORM_PAIRED(vmhaddshs, vmhraddshs, 16)
|
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23)
|
||||||
|
|
||||||
static bool do_va_helper(DisasContext *ctx, arg_VA *a,
|
static bool do_va_helper(DisasContext *ctx, arg_VA *a,
|
||||||
void (*gen_helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr))
|
void (*gen_helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr))
|
||||||
|
@ -2620,7 +2620,8 @@ static bool do_va_env_helper(DisasContext *ctx, arg_VA *a,
|
||||||
TRANS_FLAGS(ALTIVEC, VMSUMUHS, do_va_env_helper, gen_helper_VMSUMUHS)
|
TRANS_FLAGS(ALTIVEC, VMSUMUHS, do_va_env_helper, gen_helper_VMSUMUHS)
|
||||||
TRANS_FLAGS(ALTIVEC, VMSUMSHS, do_va_env_helper, gen_helper_VMSUMSHS)
|
TRANS_FLAGS(ALTIVEC, VMSUMSHS, do_va_env_helper, gen_helper_VMSUMSHS)
|
||||||
|
|
||||||
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23)
|
TRANS_FLAGS(ALTIVEC, VMHADDSHS, do_va_env_helper, gen_helper_VMHADDSHS)
|
||||||
|
TRANS_FLAGS(ALTIVEC, VMHRADDSHS, do_va_env_helper, gen_helper_VMHRADDSHS)
|
||||||
|
|
||||||
GEN_VXFORM_NOA(vclzb, 1, 28)
|
GEN_VXFORM_NOA(vclzb, 1, 28)
|
||||||
GEN_VXFORM_NOA(vclzh, 1, 29)
|
GEN_VXFORM_NOA(vclzh, 1, 29)
|
||||||
|
|
|
@ -219,7 +219,6 @@ GEN_VXFORM_UIMM(vctsxs, 5, 15),
|
||||||
|
|
||||||
#define GEN_VAFORM_PAIRED(name0, name1, opc2) \
|
#define GEN_VAFORM_PAIRED(name0, name1, opc2) \
|
||||||
GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC)
|
GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC)
|
||||||
GEN_VAFORM_PAIRED(vmhaddshs, vmhraddshs, 16),
|
|
||||||
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23),
|
GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23),
|
||||||
|
|
||||||
GEN_VXFORM_DUAL(vclzb, vpopcntb, 1, 28, PPC_NONE, PPC2_ALTIVEC_207),
|
GEN_VXFORM_DUAL(vclzb, vpopcntb, 1, 28, PPC_NONE, PPC2_ALTIVEC_207),
|
||||||
|
|
Loading…
Reference in New Issue