@@ -889,6 +889,10 @@ void helper_hrfid(CPUPPCState *env)
do_rfi(env, env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
~((target_ulong)0x783F0000), 0);
}
+
+void helper_nap(CPUPPCState *env)
+{
+}
#endif
/*****************************************************************************/
@@ -17,6 +17,7 @@ DEF_HELPER_1(rfmci, void, env)
#if defined(TARGET_PPC64)
DEF_HELPER_1(rfid, void, env)
DEF_HELPER_1(hrfid, void, env)
+DEF_HELPER_1(nap, void, env)
#endif
#endif
@@ -3798,6 +3798,11 @@ static void gen_hrfid(DisasContext *ctx)
gen_sync_exception(ctx);
#endif
}
+
+static void gen_nap(DisasContext *ctx)
+{
+ gen_helper_nap(cpu_env);
+}
#endif
/* sc */
@@ -8732,6 +8737,7 @@ GEN_HANDLER(rfi, 0x13, 0x12, 0x01, 0x03FF8001, PPC_FLOW),
#if defined(TARGET_PPC64)
GEN_HANDLER(rfid, 0x13, 0x12, 0x00, 0x03FF8001, PPC_64B),
GEN_HANDLER(hrfid, 0x13, 0x12, 0x08, 0x03FF8001, PPC_64H),
+GEN_HANDLER(nap, 0x13, 0x12, 0x0d, 0x03FF8001, PPC_64H),
#endif
GEN_HANDLER(sc, 0x11, 0xFF, 0xFF, 0x03FFF01D, PPC_FLOW),
GEN_HANDLER(tw, 0x1F, 0x04, 0x00, 0x00000001, PPC_FLOW),
Add the emulation of insn "nap" for hypervisor Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com> --- target-ppc/excp_helper.c | 4 ++++ target-ppc/helper.h | 1 + target-ppc/translate.c | 6 ++++++ 3 files changed, 11 insertions(+)