mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
target/ppc: decode target register in VSX_VECTOR_LOAD_STORE_LENGTH at translation time
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190616123751.781-14-mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6ae4a57ab0
commit
2aba168e50
3 changed files with 30 additions and 31 deletions
|
@ -279,10 +279,10 @@ DEF_HELPER_3(stvebx, void, env, avr, tl)
|
||||||
DEF_HELPER_3(stvehx, void, env, avr, tl)
|
DEF_HELPER_3(stvehx, void, env, avr, tl)
|
||||||
DEF_HELPER_3(stvewx, void, env, avr, tl)
|
DEF_HELPER_3(stvewx, void, env, avr, tl)
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
DEF_HELPER_4(lxvl, void, env, tl, tl, tl)
|
DEF_HELPER_4(lxvl, void, env, tl, vsr, tl)
|
||||||
DEF_HELPER_4(lxvll, void, env, tl, tl, tl)
|
DEF_HELPER_4(lxvll, void, env, tl, vsr, tl)
|
||||||
DEF_HELPER_4(stxvl, void, env, tl, tl, tl)
|
DEF_HELPER_4(stxvl, void, env, tl, vsr, tl)
|
||||||
DEF_HELPER_4(stxvll, void, env, tl, tl, tl)
|
DEF_HELPER_4(stxvll, void, env, tl, vsr, tl)
|
||||||
#endif
|
#endif
|
||||||
DEF_HELPER_4(vsumsws, void, env, avr, avr, avr)
|
DEF_HELPER_4(vsumsws, void, env, avr, avr, avr)
|
||||||
DEF_HELPER_4(vsum2sws, void, env, avr, avr, avr)
|
DEF_HELPER_4(vsum2sws, void, env, avr, avr, avr)
|
||||||
|
|
|
@ -415,9 +415,8 @@ STVE(stvewx, cpu_stl_data_ra, bswap32, u32)
|
||||||
|
|
||||||
#define VSX_LXVL(name, lj) \
|
#define VSX_LXVL(name, lj) \
|
||||||
void helper_##name(CPUPPCState *env, target_ulong addr, \
|
void helper_##name(CPUPPCState *env, target_ulong addr, \
|
||||||
target_ulong xt_num, target_ulong rb) \
|
ppc_vsr_t *xt, target_ulong rb) \
|
||||||
{ \
|
{ \
|
||||||
ppc_vsr_t *xt = &env->vsr[xt_num]; \
|
|
||||||
ppc_vsr_t t; \
|
ppc_vsr_t t; \
|
||||||
uint64_t nb = GET_NB(rb); \
|
uint64_t nb = GET_NB(rb); \
|
||||||
int i; \
|
int i; \
|
||||||
|
@ -446,9 +445,8 @@ VSX_LXVL(lxvll, 1)
|
||||||
|
|
||||||
#define VSX_STXVL(name, lj) \
|
#define VSX_STXVL(name, lj) \
|
||||||
void helper_##name(CPUPPCState *env, target_ulong addr, \
|
void helper_##name(CPUPPCState *env, target_ulong addr, \
|
||||||
target_ulong xt_num, target_ulong rb) \
|
ppc_vsr_t *xt, target_ulong rb) \
|
||||||
{ \
|
{ \
|
||||||
ppc_vsr_t *xt = &env->vsr[xt_num]; \
|
|
||||||
target_ulong nb = GET_NB(rb); \
|
target_ulong nb = GET_NB(rb); \
|
||||||
int i; \
|
int i; \
|
||||||
\
|
\
|
||||||
|
|
|
@ -347,7 +347,8 @@ VSX_VECTOR_STORE(stxvx, st_i64, 1)
|
||||||
#define VSX_VECTOR_LOAD_STORE_LENGTH(name) \
|
#define VSX_VECTOR_LOAD_STORE_LENGTH(name) \
|
||||||
static void gen_##name(DisasContext *ctx) \
|
static void gen_##name(DisasContext *ctx) \
|
||||||
{ \
|
{ \
|
||||||
TCGv EA, xt; \
|
TCGv EA; \
|
||||||
|
TCGv_ptr xt; \
|
||||||
\
|
\
|
||||||
if (xT(ctx->opcode) < 32) { \
|
if (xT(ctx->opcode) < 32) { \
|
||||||
if (unlikely(!ctx->vsx_enabled)) { \
|
if (unlikely(!ctx->vsx_enabled)) { \
|
||||||
|
@ -361,12 +362,12 @@ static void gen_##name(DisasContext *ctx) \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
EA = tcg_temp_new(); \
|
EA = tcg_temp_new(); \
|
||||||
xt = tcg_const_tl(xT(ctx->opcode)); \
|
xt = gen_vsr_ptr(xT(ctx->opcode)); \
|
||||||
gen_set_access_type(ctx, ACCESS_INT); \
|
gen_set_access_type(ctx, ACCESS_INT); \
|
||||||
gen_addr_register(ctx, EA); \
|
gen_addr_register(ctx, EA); \
|
||||||
gen_helper_##name(cpu_env, EA, xt, cpu_gpr[rB(ctx->opcode)]); \
|
gen_helper_##name(cpu_env, EA, xt, cpu_gpr[rB(ctx->opcode)]); \
|
||||||
tcg_temp_free(EA); \
|
tcg_temp_free(EA); \
|
||||||
tcg_temp_free(xt); \
|
tcg_temp_free_ptr(xt); \
|
||||||
}
|
}
|
||||||
|
|
||||||
VSX_VECTOR_LOAD_STORE_LENGTH(lxvl)
|
VSX_VECTOR_LOAD_STORE_LENGTH(lxvl)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue