diff options
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/helper.h | 1 | ||||
-rw-r--r-- | target-sparc/op.c | 10 | ||||
-rw-r--r-- | target-sparc/op_helper.c | 9 | ||||
-rw-r--r-- | target-sparc/translate.c | 3 |
4 files changed, 10 insertions, 13 deletions
diff --git a/target-sparc/helper.h b/target-sparc/helper.h index 88b56e2716..365f4823a5 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -34,6 +34,7 @@ uint64_t TCG_HELPER_PROTO helper_ld_asi(target_ulong addr, int asi, void TCG_HELPER_PROTO helper_st_asi(target_ulong addr, uint64_t val, int asi, int size); void TCG_HELPER_PROTO helper_ldfsr(void); +void TCG_HELPER_PROTO helper_stfsr(void); void TCG_HELPER_PROTO helper_check_ieee_exceptions(void); void TCG_HELPER_PROTO helper_clear_float_exceptions(void); void TCG_HELPER_PROTO helper_fabss(void); diff --git a/target-sparc/op.c b/target-sparc/op.c index 79b669bf31..921699e4c0 100644 --- a/target-sparc/op.c +++ b/target-sparc/op.c @@ -285,16 +285,6 @@ void OPPROTO op_sdiv_T1_T0(void) #endif #endif -void OPPROTO op_ldfsr(void) -{ - PUT_FSR32(env, *((uint32_t *) &FT0)); -} - -void OPPROTO op_stfsr(void) -{ - *((uint32_t *) &FT0) = GET_FSR32(env); -} - #ifndef TARGET_SPARC64 /* XXX: use another pointer for %iN registers to avoid slow wrapping handling ? */ diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 76af753fb8..1172b5a9eb 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -1590,6 +1590,8 @@ uint64_t helper_pack64(target_ulong high, target_ulong low) void helper_ldfsr(void) { int rnd_mode; + + PUT_FSR32(env, *((uint32_t *) &FT0)); switch (env->fsr & FSR_RD_MASK) { case FSR_RD_NEAREST: rnd_mode = float_round_nearest_even; @@ -1608,7 +1610,12 @@ void helper_ldfsr(void) set_float_rounding_mode(rnd_mode, &env->fp_status); } -void helper_debug() +void helper_stfsr(void) +{ + *((uint32_t *) &FT0) = GET_FSR32(env); +} + +void helper_debug(void) { env->exception_index = EXCP_DEBUG; cpu_loop_exit(); diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 05f23de130..10a3a281a4 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -4259,7 +4259,6 @@ static void disas_sparc_insn(DisasContext * dc) case 0x21: /* load fsr */ gen_op_check_align_T0_3(); gen_op_ldst(ldf); - gen_op_ldfsr(); tcg_gen_helper_0_0(helper_ldfsr); break; case 0x22: /* load quad fpreg */ @@ -4415,7 +4414,7 @@ static void disas_sparc_insn(DisasContext * dc) #ifdef CONFIG_USER_ONLY gen_op_check_align_T0_3(); #endif - gen_op_stfsr(); + tcg_gen_helper_0_0(helper_stfsr); gen_op_ldst(stf); break; case 0x26: |