#if defined(TARGET_PPC64)
DEF_HELPER_3(td, void, tl, tl, i32)
#endif
+#if !defined(CONFIG_USER_ONLY)
+DEF_HELPER_0(rfi, void)
+DEF_HELPER_0(rfsvc, void)
+DEF_HELPER_0(40x_rfci, void)
+DEF_HELPER_0(rfci, void)
+DEF_HELPER_0(rfdi, void)
+DEF_HELPER_0(rfmci, void)
+#if defined(TARGET_PPC64)
+DEF_HELPER_0(rfid, void)
+DEF_HELPER_0(hrfid, void)
+#endif
+#endif
DEF_HELPER_2(lmw, void, tl, i32)
DEF_HELPER_2(stmw, void, tl, i32)
DEF_HELPER_1(icbi, void, tl)
DEF_HELPER_4(lscbx, tl, tl, i32, i32, i32)
-
-DEF_HELPER_2(fcmpo, i32, i64, i64)
-DEF_HELPER_2(fcmpu, i32, i64, i64)
-
DEF_HELPER_0(load_cr, tl)
DEF_HELPER_2(store_cr, void, tl, i32)
DEF_HELPER_1(float64_to_float32, i32, i64)
DEF_HELPER_1(float32_to_float64, i64, i32)
+DEF_HELPER_2(fcmpo, i32, i64, i64)
+DEF_HELPER_2(fcmpu, i32, i64, i64)
+
DEF_HELPER_1(fctiw, i64, i64)
DEF_HELPER_1(fctiwz, i64, i64)
#if defined(TARGET_PPC64)
/* Return from interrupt */
#if !defined(CONFIG_USER_ONLY)
-void OPPROTO op_rfi (void)
-{
- do_rfi();
- RETURN();
-}
-
-#if defined(TARGET_PPC64)
-void OPPROTO op_rfid (void)
-{
- do_rfid();
- RETURN();
-}
-
-void OPPROTO op_hrfid (void)
-{
- do_hrfid();
- RETURN();
-}
-#endif
-
/* Exception vectors */
void OPPROTO op_store_excp_prefix (void)
{
do_POWER_rac();
RETURN();
}
-
-void OPPROTO op_POWER_rfsvc (void)
-{
- do_POWER_rfsvc();
- RETURN();
-}
#endif
/* PowerPC 4xx specific micro-ops */
}
#if !defined(CONFIG_USER_ONLY)
-/* Return from critical interrupt :
- * same as rfi, except nip & MSR are loaded from SRR2/3 instead of SRR0/1
- */
-void OPPROTO op_40x_rfci (void)
-{
- do_40x_rfci();
- RETURN();
-}
-
-void OPPROTO op_rfci (void)
-{
- do_rfci();
- RETURN();
-}
-
-void OPPROTO op_rfdi (void)
-{
- do_rfdi();
- RETURN();
-}
-
-void OPPROTO op_rfmci (void)
-{
- do_rfmci();
- RETURN();
-}
-
void OPPROTO op_wrte (void)
{
/* We don't call do_store_msr here as we won't trigger
}
}
-static always_inline void __do_rfi (target_ulong nip, target_ulong msr,
+static always_inline void do_rfi (target_ulong nip, target_ulong msr,
target_ulong msrm, int keep_msrh)
{
#if defined(TARGET_PPC64)
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
}
-void do_rfi (void)
+void helper_rfi (void)
{
- __do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
- ~((target_ulong)0xFFFF0000), 1);
+ do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
+ ~((target_ulong)0xFFFF0000), 1);
}
#if defined(TARGET_PPC64)
-void do_rfid (void)
+void helper_rfid (void)
{
- __do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
- ~((target_ulong)0xFFFF0000), 0);
+ do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1],
+ ~((target_ulong)0xFFFF0000), 0);
}
-void do_hrfid (void)
+void helper_hrfid (void)
{
- __do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
- ~((target_ulong)0xFFFF0000), 0);
+ do_rfi(env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
+ ~((target_ulong)0xFFFF0000), 0);
}
#endif
#endif
env->nb_BATs = nb_BATs;
}
-void do_POWER_rfsvc (void)
+void helper_rfsvc (void)
{
- __do_rfi(env->lr, env->ctr, 0x0000FFFF, 0);
+ do_rfi(env->lr, env->ctr, 0x0000FFFF, 0);
}
void do_store_hid0_601 (void)
}
#if !defined(CONFIG_USER_ONLY)
-void do_40x_rfci (void)
+void helper_40x_rfci (void)
{
- __do_rfi(env->spr[SPR_40x_SRR2], env->spr[SPR_40x_SRR3],
- ~((target_ulong)0xFFFF0000), 0);
+ do_rfi(env->spr[SPR_40x_SRR2], env->spr[SPR_40x_SRR3],
+ ~((target_ulong)0xFFFF0000), 0);
}
-void do_rfci (void)
+void helper_rfci (void)
{
- __do_rfi(env->spr[SPR_BOOKE_CSRR0], SPR_BOOKE_CSRR1,
- ~((target_ulong)0x3FFF0000), 0);
+ do_rfi(env->spr[SPR_BOOKE_CSRR0], SPR_BOOKE_CSRR1,
+ ~((target_ulong)0x3FFF0000), 0);
}
-void do_rfdi (void)
+void helper_rfdi (void)
{
- __do_rfi(env->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,
- ~((target_ulong)0x3FFF0000), 0);
+ do_rfi(env->spr[SPR_BOOKE_DSRR0], SPR_BOOKE_DSRR1,
+ ~((target_ulong)0x3FFF0000), 0);
}
-void do_rfmci (void)
+void helper_rfmci (void)
{
- __do_rfi(env->spr[SPR_BOOKE_MCSRR0], SPR_BOOKE_MCSRR1,
- ~((target_ulong)0x3FFF0000), 0);
+ do_rfi(env->spr[SPR_BOOKE_MCSRR0], SPR_BOOKE_MCSRR1,
+ ~((target_ulong)0x3FFF0000), 0);
}
void do_load_403_pb (int num)
void do_print_mem_EA (target_ulong EA);
/* Registers load and stores */
-void do_load_cr (void);
-void do_store_cr (uint32_t mask);
#if defined(TARGET_PPC64)
void do_store_pri (int prio);
#endif
/* Misc */
#if !defined(CONFIG_USER_ONLY)
void do_store_msr (void);
-void do_rfi (void);
-#if defined(TARGET_PPC64)
-void do_rfid (void);
-void do_hrfid (void);
-#endif
#endif
/* POWER / PowerPC 601 specific helpers */
void do_POWER_mulo (void);
#if !defined(CONFIG_USER_ONLY)
void do_POWER_rac (void);
-void do_POWER_rfsvc (void);
void do_store_hid0_601 (void);
#endif
void do_load_dcr (void);
void do_store_dcr (void);
#if !defined(CONFIG_USER_ONLY)
-void do_40x_rfci (void);
-void do_rfci (void);
-void do_rfdi (void);
-void do_rfmci (void);
void do_4xx_tlbre_lo (void);
void do_4xx_tlbre_hi (void);
void do_4xx_tlbwe_lo (void);
GEN_EXCP_PRIVOPC(ctx);
return;
}
- gen_op_rfi();
+ gen_helper_rfi();
GEN_SYNC(ctx);
#endif
}
GEN_EXCP_PRIVOPC(ctx);
return;
}
- gen_op_rfid();
+ gen_helper_rfid();
GEN_SYNC(ctx);
#endif
}
GEN_EXCP_PRIVOPC(ctx);
return;
}
- gen_op_hrfid();
+ gen_helper_hrfid();
GEN_SYNC(ctx);
#endif
}
GEN_EXCP_PRIVOPC(ctx);
return;
}
- gen_op_POWER_rfsvc();
+ gen_helper_rfsvc();
GEN_SYNC(ctx);
#endif
}
return;
}
/* Restore CPU state */
- gen_op_40x_rfci();
+ gen_helper_40x_rfci();
GEN_SYNC(ctx);
#endif
}
return;
}
/* Restore CPU state */
- gen_op_rfci();
+ gen_helper_rfci();
GEN_SYNC(ctx);
#endif
}
return;
}
/* Restore CPU state */
- gen_op_rfdi();
+ gen_helper_rfdi();
GEN_SYNC(ctx);
#endif
}
return;
}
/* Restore CPU state */
- gen_op_rfmci();
+ gen_helper_rfmci();
GEN_SYNC(ctx);
#endif
}