[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in

From: Andreas Färber
Subject: [Qemu-ppc] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()
Date: Fri, 10 May 2013 16:39:59 +0200

A transition from CPUPPCState to PowerPCCPU can be considered safe,
just like PowerPCCPU::env access in the opposite direction.

This should slightly improve interrupt performance.

Reported-by: Anthony Liguori <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
 target-ppc/cpu-qom.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h
index eb03a00..f62181f 100644
--- a/target-ppc/cpu-qom.h
+++ b/target-ppc/cpu-qom.h
@@ -91,7 +91,7 @@ typedef struct PowerPCCPU {
 static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env)
-    return POWERPC_CPU(container_of(env, PowerPCCPU, env));
+    return container_of(env, PowerPCCPU, env);
 #define ENV_GET_CPU(e) CPU(ppc_env_get_cpu(e))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]