#endif
int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);
-void raise_exception(int tt);
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi);
void cpu_check_irqs(CPUSPARCState *env);
#endif
#endif
void do_interrupt(int intno);
-void raise_exception(int tt);
void memcpy32(target_ulong *dst, const target_ulong *src);
target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
void dump_mmu(CPUState *env);
void TCG_HELPER_PROTO helper_fcmpeq_fcc3(void);
#endif
#endif
+void TCG_HELPER_PROTO raise_exception(int tt);
}
#endif
-void OPPROTO op_exception(void)
-{
- env->exception_index = PARAM1;
- cpu_loop_exit();
- FORCE_RET();
-}
-
-void OPPROTO op_fpexception_im(void)
-{
- env->exception_index = TT_FP_EXCP;
- env->fsr &= ~FSR_FTT_MASK;
- env->fsr |= PARAM1;
- cpu_loop_exit();
- FORCE_RET();
-}
-
void OPPROTO op_eval_ba(void)
{
T2 = 1;
#endif
+static inline void gen_op_exception(int exception)
+{
+ TCGv r_except;
+
+ r_except = tcg_temp_new(TCG_TYPE_I32);
+ tcg_gen_movi_i32(r_except, exception);
+ tcg_gen_helper_0_1(raise_exception, r_except);
+}
+
+static inline void gen_op_fpexception_im(int fsr_flags)
+{
+ tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUSPARCState, fsr));
+ tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, ~FSR_FTT_MASK);
+ tcg_gen_ori_tl(cpu_tmp0, cpu_tmp0, fsr_flags);
+ tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUSPARCState, fsr));
+ gen_op_exception(TT_FP_EXCP);
+}
+
static int gen_trap_ifnofpu(DisasContext * dc)
{
#if !defined(CONFIG_USER_ONLY)