mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/ppc: Move dquai[q], drint{x,n}[q] to decodetree
Move the following instructions to decodetree: dquai: DFP Quantize Immediate dquaiq: DFP Quantize Immediate Quad drintx: DFP Round to FP Integer With Inexact drintxq: DFP Round to FP Integer With Inexact Quad drintn: DFP Round to FP Integer Without Inexact drintnq: DFP Round to FP Integer Without Inexact Quad Signed-off-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211029192417.400707-13-luis.pires@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
85c38a460c
commit
78464edb8f
5 changed files with 58 additions and 58 deletions
|
@ -67,27 +67,23 @@ static bool trans_##NAME(DisasContext *ctx, arg_##NAME *a) \
|
|||
return true; \
|
||||
}
|
||||
|
||||
#define GEN_DFP_T_B_U32_U32_Rc(name, u32f1, u32f2) \
|
||||
static void gen_##name(DisasContext *ctx) \
|
||||
{ \
|
||||
TCGv_ptr rt, rb; \
|
||||
TCGv_i32 u32_1, u32_2; \
|
||||
if (unlikely(!ctx->fpu_enabled)) { \
|
||||
gen_exception(ctx, POWERPC_EXCP_FPU); \
|
||||
return; \
|
||||
} \
|
||||
rt = gen_fprp_ptr(rD(ctx->opcode)); \
|
||||
rb = gen_fprp_ptr(rB(ctx->opcode)); \
|
||||
u32_1 = tcg_const_i32(u32f1(ctx->opcode)); \
|
||||
u32_2 = tcg_const_i32(u32f2(ctx->opcode)); \
|
||||
gen_helper_##name(cpu_env, rt, rb, u32_1, u32_2); \
|
||||
if (unlikely(Rc(ctx->opcode) != 0)) { \
|
||||
gen_set_cr1_from_fpscr(ctx); \
|
||||
} \
|
||||
tcg_temp_free_ptr(rt); \
|
||||
tcg_temp_free_ptr(rb); \
|
||||
tcg_temp_free_i32(u32_1); \
|
||||
tcg_temp_free_i32(u32_2); \
|
||||
#define TRANS_DFP_T_B_U32_U32_Rc(NAME, U32F1, U32F2) \
|
||||
static bool trans_##NAME(DisasContext *ctx, arg_##NAME *a) \
|
||||
{ \
|
||||
TCGv_ptr rt, rb; \
|
||||
REQUIRE_INSNS_FLAGS2(ctx, DFP); \
|
||||
REQUIRE_FPU(ctx); \
|
||||
rt = gen_fprp_ptr(a->frt); \
|
||||
rb = gen_fprp_ptr(a->frb); \
|
||||
gen_helper_##NAME(cpu_env, rt, rb, \
|
||||
tcg_constant_i32(a->U32F1), \
|
||||
tcg_constant_i32(a->U32F2)); \
|
||||
if (unlikely(a->rc)) { \
|
||||
gen_set_cr1_from_fpscr(ctx); \
|
||||
} \
|
||||
tcg_temp_free_ptr(rt); \
|
||||
tcg_temp_free_ptr(rb); \
|
||||
return true; \
|
||||
}
|
||||
|
||||
#define GEN_DFP_T_A_B_I32_Rc(name, i32fld) \
|
||||
|
@ -174,16 +170,16 @@ TRANS_DFP_BF_A_B(DTSTSF)
|
|||
TRANS_DFP_BF_A_B(DTSTSFQ)
|
||||
TRANS_DFP_BF_I_B(DTSTSFI)
|
||||
TRANS_DFP_BF_I_B(DTSTSFIQ)
|
||||
GEN_DFP_T_B_U32_U32_Rc(dquai, SIMM5, RMC)
|
||||
GEN_DFP_T_B_U32_U32_Rc(dquaiq, SIMM5, RMC)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DQUAI, te, rmc)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DQUAIQ, te, rmc)
|
||||
GEN_DFP_T_A_B_I32_Rc(dqua, RMC)
|
||||
GEN_DFP_T_A_B_I32_Rc(dquaq, RMC)
|
||||
GEN_DFP_T_A_B_I32_Rc(drrnd, RMC)
|
||||
GEN_DFP_T_A_B_I32_Rc(drrndq, RMC)
|
||||
GEN_DFP_T_B_U32_U32_Rc(drintx, FPW, RMC)
|
||||
GEN_DFP_T_B_U32_U32_Rc(drintxq, FPW, RMC)
|
||||
GEN_DFP_T_B_U32_U32_Rc(drintn, FPW, RMC)
|
||||
GEN_DFP_T_B_U32_U32_Rc(drintnq, FPW, RMC)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DRINTX, r, rmc)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DRINTXQ, r, rmc)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DRINTN, r, rmc)
|
||||
TRANS_DFP_T_B_U32_U32_Rc(DRINTNQ, r, rmc)
|
||||
GEN_DFP_T_B_Rc(dctdp)
|
||||
GEN_DFP_T_B_Rc(dctqpq)
|
||||
GEN_DFP_T_B_Rc(drsp)
|
||||
|
@ -205,7 +201,6 @@ GEN_DFP_T_FPR_I32_Rc(dscliq, rA, DCM)
|
|||
GEN_DFP_T_FPR_I32_Rc(dscri, rA, DCM)
|
||||
GEN_DFP_T_FPR_I32_Rc(dscriq, rA, DCM)
|
||||
|
||||
#undef GEN_DFP_T_B_U32_U32_Rc
|
||||
#undef GEN_DFP_T_A_B_I32_Rc
|
||||
#undef GEN_DFP_T_B_Rc
|
||||
#undef GEN_DFP_T_FPR_I32_Rc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue