|
|
|
@ -75,7 +75,7 @@ static TCGv cpu_T[3]; |
|
|
|
#else |
|
|
|
static TCGv_i64 cpu_T64[3]; |
|
|
|
#endif |
|
|
|
static TCGv_i64 cpu_FT[3]; |
|
|
|
static TCGv_i64 cpu_FT[2]; |
|
|
|
static TCGv_i64 cpu_AVRh[3], cpu_AVRl[3]; |
|
|
|
|
|
|
|
#include "gen-icount.h" |
|
|
|
@ -120,8 +120,6 @@ void ppc_translate_init(void) |
|
|
|
offsetof(CPUState, ft0), "FT0"); |
|
|
|
cpu_FT[1] = tcg_global_mem_new_i64(TCG_AREG0, |
|
|
|
offsetof(CPUState, ft1), "FT1"); |
|
|
|
cpu_FT[2] = tcg_global_mem_new_i64(TCG_AREG0, |
|
|
|
offsetof(CPUState, ft2), "FT2"); |
|
|
|
|
|
|
|
cpu_AVRh[0] = tcg_global_mem_new_i64(TCG_AREG0, |
|
|
|
offsetof(CPUState, avr0.u64[0]), "AVR0H"); |
|
|
|
@ -245,27 +243,31 @@ static always_inline void gen_reset_fpstatus (void) |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
static always_inline void gen_compute_fprf (int set_fprf, int set_rc) |
|
|
|
static always_inline void gen_compute_fprf (TCGv arg, int set_fprf, int set_rc) |
|
|
|
{ |
|
|
|
TCGv t0 = tcg_temp_new_i32(); |
|
|
|
|
|
|
|
if (set_fprf != 0) { |
|
|
|
/* This case might be optimized later */ |
|
|
|
#if defined(OPTIMIZE_FPRF_UPDATE) |
|
|
|
*gen_fprf_ptr++ = gen_opc_ptr; |
|
|
|
#endif |
|
|
|
gen_op_compute_fprf(1); |
|
|
|
tcg_gen_movi_tl(t0, 1); |
|
|
|
gen_helper_compute_fprf(t0, arg, t0); |
|
|
|
if (unlikely(set_rc)) { |
|
|
|
tcg_gen_trunc_tl_i32(cpu_crf[1], cpu_T[0]); |
|
|
|
tcg_gen_andi_i32(cpu_crf[1], cpu_crf[1], 0xf); |
|
|
|
tcg_gen_movi_i32(cpu_crf[1], t0); |
|
|
|
} |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} else if (unlikely(set_rc)) { |
|
|
|
/* We always need to compute fpcc */ |
|
|
|
gen_op_compute_fprf(0); |
|
|
|
tcg_gen_trunc_tl_i32(cpu_crf[1], cpu_T[0]); |
|
|
|
tcg_gen_andi_i32(cpu_crf[1], cpu_crf[1], 0xf); |
|
|
|
tcg_gen_movi_tl(t0, 0); |
|
|
|
gen_helper_compute_fprf(t0, arg, t0); |
|
|
|
tcg_gen_movi_i32(cpu_crf[1], t0); |
|
|
|
if (set_fprf) |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
tcg_temp_free(t0); |
|
|
|
} |
|
|
|
|
|
|
|
static always_inline void gen_optimize_fprf (void) |
|
|
|
@ -2096,16 +2098,14 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, 0x00000000, type) \ |
|
|
|
GEN_EXCP_NO_FP(ctx); \ |
|
|
|
return; \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rC(ctx->opcode)]); \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[2], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_reset_fpstatus(); \ |
|
|
|
gen_op_f##op(); \ |
|
|
|
gen_helper_f##op(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rA(ctx->opcode)], \ |
|
|
|
cpu_fpr[rC(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
if (isfloat) { \ |
|
|
|
gen_op_frsp(); \ |
|
|
|
gen_helper_frsp(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rD(ctx->opcode)]); \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ |
|
|
|
gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], set_fprf, \ |
|
|
|
Rc(ctx->opcode) != 0); \ |
|
|
|
} |
|
|
|
|
|
|
|
#define GEN_FLOAT_ACB(name, op2, set_fprf, type) \ |
|
|
|
@ -2119,15 +2119,14 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type) \ |
|
|
|
GEN_EXCP_NO_FP(ctx); \ |
|
|
|
return; \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_reset_fpstatus(); \ |
|
|
|
gen_op_f##op(); \ |
|
|
|
gen_helper_f##op(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rA(ctx->opcode)], \ |
|
|
|
cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
if (isfloat) { \ |
|
|
|
gen_op_frsp(); \ |
|
|
|
gen_helper_frsp(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rD(ctx->opcode)]); \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ |
|
|
|
gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], \ |
|
|
|
set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
} |
|
|
|
#define GEN_FLOAT_AB(name, op2, inval, set_fprf, type) \ |
|
|
|
_GEN_FLOAT_AB(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ |
|
|
|
@ -2140,15 +2139,14 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, inval, type) \ |
|
|
|
GEN_EXCP_NO_FP(ctx); \ |
|
|
|
return; \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rC(ctx->opcode)]); \ |
|
|
|
gen_reset_fpstatus(); \ |
|
|
|
gen_op_f##op(); \ |
|
|
|
gen_helper_f##op(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rA(ctx->opcode)], \ |
|
|
|
cpu_fpr[rC(ctx->opcode)]); \ |
|
|
|
if (isfloat) { \ |
|
|
|
gen_op_frsp(); \ |
|
|
|
gen_helper_frsp(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rD(ctx->opcode)]); \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ |
|
|
|
gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], \ |
|
|
|
set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
} |
|
|
|
#define GEN_FLOAT_AC(name, op2, inval, set_fprf, type) \ |
|
|
|
_GEN_FLOAT_AC(name, name, 0x3F, op2, inval, 0, set_fprf, type); \ |
|
|
|
@ -2161,11 +2159,10 @@ GEN_HANDLER(f##name, 0x3F, op2, op3, 0x001F0000, type) \ |
|
|
|
GEN_EXCP_NO_FP(ctx); \ |
|
|
|
return; \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_reset_fpstatus(); \ |
|
|
|
gen_op_f##name(); \ |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ |
|
|
|
gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
gen_helper_f##name(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], \ |
|
|
|
set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
} |
|
|
|
|
|
|
|
#define GEN_FLOAT_BS(name, op1, op2, set_fprf, type) \ |
|
|
|
@ -2175,11 +2172,10 @@ GEN_HANDLER(f##name, op1, op2, 0xFF, 0x001F07C0, type) \ |
|
|
|
GEN_EXCP_NO_FP(ctx); \ |
|
|
|
return; \ |
|
|
|
} \ |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_reset_fpstatus(); \ |
|
|
|
gen_op_f##name(); \ |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); \ |
|
|
|
gen_compute_fprf(set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
gen_helper_f##name(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); \ |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], \ |
|
|
|
set_fprf, Rc(ctx->opcode) != 0); \ |
|
|
|
} |
|
|
|
|
|
|
|
/* fadd - fadds */ |
|
|
|
@ -2199,12 +2195,17 @@ GEN_FLOAT_BS(res, 0x3B, 0x18, 1, PPC_FLOAT_FRES); |
|
|
|
GEN_FLOAT_BS(rsqrte, 0x3F, 0x1A, 1, PPC_FLOAT_FRSQRTE); |
|
|
|
|
|
|
|
/* frsqrtes */ |
|
|
|
static always_inline void gen_op_frsqrtes (void) |
|
|
|
GEN_HANDLER(frsqrtes, 0x3B, 0x1A, 0xFF, 0x001F07C0, PPC_FLOAT_FRSQRTES) |
|
|
|
{ |
|
|
|
gen_op_frsqrte(); |
|
|
|
gen_op_frsp(); |
|
|
|
if (unlikely(!ctx->fpu_enabled)) { |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_helper_frsqrte(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_helper_frsp(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rD(ctx->opcode)]); |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], 1, Rc(ctx->opcode) != 0); |
|
|
|
} |
|
|
|
GEN_FLOAT_BS(rsqrtes, 0x3B, 0x1A, 1, PPC_FLOAT_FRSQRTES); |
|
|
|
|
|
|
|
/* fsel */ |
|
|
|
_GEN_FLOAT_ACB(sel, sel, 0x3F, 0x17, 0, 0, PPC_FLOAT_FSEL); |
|
|
|
@ -2218,11 +2219,9 @@ GEN_HANDLER(fsqrt, 0x3F, 0x16, 0xFF, 0x001F07C0, PPC_FLOAT_FSQRT) |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_op_fsqrt(); |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); |
|
|
|
gen_compute_fprf(1, Rc(ctx->opcode) != 0); |
|
|
|
gen_helper_fsqrt(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], 1, Rc(ctx->opcode) != 0); |
|
|
|
} |
|
|
|
|
|
|
|
GEN_HANDLER(fsqrts, 0x3B, 0x16, 0xFF, 0x001F07C0, PPC_FLOAT_FSQRT) |
|
|
|
@ -2231,12 +2230,10 @@ GEN_HANDLER(fsqrts, 0x3B, 0x16, 0xFF, 0x001F07C0, PPC_FLOAT_FSQRT) |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_op_fsqrt(); |
|
|
|
gen_op_frsp(); |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); |
|
|
|
gen_compute_fprf(1, Rc(ctx->opcode) != 0); |
|
|
|
gen_helper_fsqrt(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_helper_frsp(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rD(ctx->opcode)]); |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], 1, Rc(ctx->opcode) != 0); |
|
|
|
} |
|
|
|
|
|
|
|
/*** Floating-Point multiply-and-add ***/ |
|
|
|
@ -2282,11 +2279,10 @@ GEN_HANDLER(fcmpo, 0x3F, 0x00, 0x01, 0x00600001, PPC_FLOAT) |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); |
|
|
|
tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_helper_fcmpo(cpu_crf[crfD(ctx->opcode)]); |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_fcmpo(cpu_crf[crfD(ctx->opcode)], |
|
|
|
cpu_fpr[rA(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
/* fcmpu */ |
|
|
|
@ -2296,11 +2292,10 @@ GEN_HANDLER(fcmpu, 0x3F, 0x00, 0x00, 0x00600001, PPC_FLOAT) |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rA(ctx->opcode)]); |
|
|
|
tcg_gen_mov_i64(cpu_FT[1], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_helper_fcmpu(cpu_crf[crfD(ctx->opcode)]); |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_fcmpu(cpu_crf[crfD(ctx->opcode)], |
|
|
|
cpu_fpr[rA(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
/*** Floating-point move ***/ |
|
|
|
@ -2316,9 +2311,8 @@ GEN_HANDLER(fmr, 0x3F, 0x08, 0x02, 0x001F0000, PPC_FLOAT) |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); |
|
|
|
gen_compute_fprf(0, Rc(ctx->opcode) != 0); |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], 0, Rc(ctx->opcode) != 0); |
|
|
|
} |
|
|
|
|
|
|
|
/* fnabs */ |
|
|
|
@ -2342,7 +2336,7 @@ GEN_HANDLER(mcrfs, 0x3F, 0x00, 0x02, 0x0063F801, PPC_FLOAT) |
|
|
|
bfa = 4 * (7 - crfS(ctx->opcode)); |
|
|
|
tcg_gen_shri_i32(cpu_crf[crfD(ctx->opcode)], cpu_fpscr, bfa); |
|
|
|
tcg_gen_andi_i32(cpu_crf[crfD(ctx->opcode)], cpu_crf[crfD(ctx->opcode)], 0xf); |
|
|
|
gen_op_fpscr_resetbit(~(0xF << bfa)); |
|
|
|
tcg_gen_andi_i32(cpu_fpscr, cpu_fpscr, ~(0xF << bfa)); |
|
|
|
} |
|
|
|
|
|
|
|
/* mffs */ |
|
|
|
@ -2354,9 +2348,8 @@ GEN_HANDLER(mffs, 0x3F, 0x07, 0x12, 0x001FF800, PPC_FLOAT) |
|
|
|
} |
|
|
|
gen_optimize_fprf(); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_op_load_fpscr_FT0(); |
|
|
|
tcg_gen_mov_i64(cpu_fpr[rD(ctx->opcode)], cpu_FT[0]); |
|
|
|
gen_compute_fprf(0, Rc(ctx->opcode) != 0); |
|
|
|
tcg_gen_extu_i32_i64(cpu_fpr[rD(ctx->opcode)], cpu_fpscr); |
|
|
|
gen_compute_fprf(cpu_fpr[rD(ctx->opcode)], 0, Rc(ctx->opcode) != 0); |
|
|
|
} |
|
|
|
|
|
|
|
/* mtfsb0 */ |
|
|
|
@ -2372,7 +2365,7 @@ GEN_HANDLER(mtfsb0, 0x3F, 0x06, 0x02, 0x001FF800, PPC_FLOAT) |
|
|
|
gen_optimize_fprf(); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
if (likely(crb != 30 && crb != 29)) |
|
|
|
gen_op_fpscr_resetbit(~(1 << crb)); |
|
|
|
tcg_gen_andi_i32(cpu_fpscr, cpu_fpscr, ~(1 << crb)); |
|
|
|
if (unlikely(Rc(ctx->opcode) != 0)) { |
|
|
|
tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, FPSCR_OX); |
|
|
|
} |
|
|
|
@ -2391,37 +2384,44 @@ GEN_HANDLER(mtfsb1, 0x3F, 0x06, 0x01, 0x001FF800, PPC_FLOAT) |
|
|
|
gen_optimize_fprf(); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
/* XXX: we pretend we can only do IEEE floating-point computations */ |
|
|
|
if (likely(crb != FPSCR_FEX && crb != FPSCR_VX && crb != FPSCR_NI)) |
|
|
|
gen_op_fpscr_setbit(crb); |
|
|
|
if (likely(crb != FPSCR_FEX && crb != FPSCR_VX && crb != FPSCR_NI)) { |
|
|
|
TCGv t0 = tcg_const_tl(crb); |
|
|
|
gen_helper_fpscr_setbit(t0); |
|
|
|
tcg_temp_free(t0); |
|
|
|
} |
|
|
|
if (unlikely(Rc(ctx->opcode) != 0)) { |
|
|
|
tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, FPSCR_OX); |
|
|
|
} |
|
|
|
/* We can raise a differed exception */ |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
/* mtfsf */ |
|
|
|
GEN_HANDLER(mtfsf, 0x3F, 0x07, 0x16, 0x02010000, PPC_FLOAT) |
|
|
|
{ |
|
|
|
TCGv t0; |
|
|
|
|
|
|
|
if (unlikely(!ctx->fpu_enabled)) { |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
return; |
|
|
|
} |
|
|
|
gen_optimize_fprf(); |
|
|
|
tcg_gen_mov_i64(cpu_FT[0], cpu_fpr[rB(ctx->opcode)]); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_op_store_fpscr(FM(ctx->opcode)); |
|
|
|
t0 = tcg_const_i32(FM(ctx->opcode)); |
|
|
|
gen_helper_store_fpscr(cpu_fpr[rB(ctx->opcode)], t0); |
|
|
|
tcg_temp_free(t0); |
|
|
|
if (unlikely(Rc(ctx->opcode) != 0)) { |
|
|
|
tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, FPSCR_OX); |
|
|
|
} |
|
|
|
/* We can raise a differed exception */ |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
/* mtfsfi */ |
|
|
|
GEN_HANDLER(mtfsfi, 0x3F, 0x06, 0x04, 0x006f0800, PPC_FLOAT) |
|
|
|
{ |
|
|
|
int bf, sh; |
|
|
|
TCGv t0, t1; |
|
|
|
|
|
|
|
if (unlikely(!ctx->fpu_enabled)) { |
|
|
|
GEN_EXCP_NO_FP(ctx); |
|
|
|
@ -2430,14 +2430,17 @@ GEN_HANDLER(mtfsfi, 0x3F, 0x06, 0x04, 0x006f0800, PPC_FLOAT) |
|
|
|
bf = crbD(ctx->opcode) >> 2; |
|
|
|
sh = 7 - bf; |
|
|
|
gen_optimize_fprf(); |
|
|
|
tcg_gen_movi_i64(cpu_FT[0], FPIMM(ctx->opcode) << (4 * sh)); |
|
|
|
gen_reset_fpstatus(); |
|
|
|
gen_op_store_fpscr(1 << sh); |
|
|
|
t0 = tcg_const_tl(FPIMM(ctx->opcode) << (4 * sh)); |
|
|
|
t1 = tcg_const_i32(1 << sh); |
|
|
|
gen_helper_store_fpscr(t0, t1); |
|
|
|
tcg_temp_free(t0); |
|
|
|
tcg_temp_free(t1); |
|
|
|
if (unlikely(Rc(ctx->opcode) != 0)) { |
|
|
|
tcg_gen_shri_i32(cpu_crf[1], cpu_fpscr, FPSCR_OX); |
|
|
|
} |
|
|
|
/* We can raise a differed exception */ |
|
|
|
gen_op_float_check_status(); |
|
|
|
gen_helper_float_check_status(); |
|
|
|
} |
|
|
|
|
|
|
|
/*** Addressing modes ***/ |
|
|
|
|