aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/timebase_helper.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-05-30 04:23:36 +0000
committerAlexander Graf <agraf@suse.de>2012-06-24 01:04:43 +0200
commitd0f1562d6ace0fdb7d2db190dd5a9a2e7492c3b3 (patch)
treee445fc1fd32eca7662933ffb496581c9d50e9092 /target-ppc/timebase_helper.c
parent6de673d40660abc43605789fa2010f20abc5a7a4 (diff)
downloadqemu-d0f1562d6ace0fdb7d2db190dd5a9a2e7492c3b3.zip
qemu-d0f1562d6ace0fdb7d2db190dd5a9a2e7492c3b3.tar.gz
qemu-d0f1562d6ace0fdb7d2db190dd5a9a2e7492c3b3.tar.bz2
ppc: Avoid AREG0 for timebase helpers
Add an explicit CPUPPCState parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/timebase_helper.c')
-rw-r--r--target-ppc/timebase_helper.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/target-ppc/timebase_helper.c b/target-ppc/timebase_helper.c
index 23f5cfa..fad738a 100644
--- a/target-ppc/timebase_helper.c
+++ b/target-ppc/timebase_helper.c
@@ -17,106 +17,105 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "cpu.h"
-#include "dyngen-exec.h"
#include "helper.h"
/*****************************************************************************/
/* SPR accesses */
-target_ulong helper_load_tbl(void)
+target_ulong helper_load_tbl(CPUPPCState *env)
{
return (target_ulong)cpu_ppc_load_tbl(env);
}
-target_ulong helper_load_tbu(void)
+target_ulong helper_load_tbu(CPUPPCState *env)
{
return cpu_ppc_load_tbu(env);
}
-target_ulong helper_load_atbl(void)
+target_ulong helper_load_atbl(CPUPPCState *env)
{
return (target_ulong)cpu_ppc_load_atbl(env);
}
-target_ulong helper_load_atbu(void)
+target_ulong helper_load_atbu(CPUPPCState *env)
{
return cpu_ppc_load_atbu(env);
}
#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
-target_ulong helper_load_purr(void)
+target_ulong helper_load_purr(CPUPPCState *env)
{
return (target_ulong)cpu_ppc_load_purr(env);
}
#endif
-target_ulong helper_load_601_rtcl(void)
+target_ulong helper_load_601_rtcl(CPUPPCState *env)
{
return cpu_ppc601_load_rtcl(env);
}
-target_ulong helper_load_601_rtcu(void)
+target_ulong helper_load_601_rtcu(CPUPPCState *env)
{
return cpu_ppc601_load_rtcu(env);
}
#if !defined(CONFIG_USER_ONLY)
-void helper_store_tbl(target_ulong val)
+void helper_store_tbl(CPUPPCState *env, target_ulong val)
{
cpu_ppc_store_tbl(env, val);
}
-void helper_store_tbu(target_ulong val)
+void helper_store_tbu(CPUPPCState *env, target_ulong val)
{
cpu_ppc_store_tbu(env, val);
}
-void helper_store_atbl(target_ulong val)
+void helper_store_atbl(CPUPPCState *env, target_ulong val)
{
cpu_ppc_store_atbl(env, val);
}
-void helper_store_atbu(target_ulong val)
+void helper_store_atbu(CPUPPCState *env, target_ulong val)
{
cpu_ppc_store_atbu(env, val);
}
-void helper_store_601_rtcl(target_ulong val)
+void helper_store_601_rtcl(CPUPPCState *env, target_ulong val)
{
cpu_ppc601_store_rtcl(env, val);
}
-void helper_store_601_rtcu(target_ulong val)
+void helper_store_601_rtcu(CPUPPCState *env, target_ulong val)
{
cpu_ppc601_store_rtcu(env, val);
}
-target_ulong helper_load_decr(void)
+target_ulong helper_load_decr(CPUPPCState *env)
{
return cpu_ppc_load_decr(env);
}
-void helper_store_decr(target_ulong val)
+void helper_store_decr(CPUPPCState *env, target_ulong val)
{
cpu_ppc_store_decr(env, val);
}
-target_ulong helper_load_40x_pit(void)
+target_ulong helper_load_40x_pit(CPUPPCState *env)
{
return load_40x_pit(env);
}
-void helper_store_40x_pit(target_ulong val)
+void helper_store_40x_pit(CPUPPCState *env, target_ulong val)
{
store_40x_pit(env, val);
}
-void helper_store_booke_tcr(target_ulong val)
+void helper_store_booke_tcr(CPUPPCState *env, target_ulong val)
{
store_booke_tcr(env, val);
}
-void helper_store_booke_tsr(target_ulong val)
+void helper_store_booke_tsr(CPUPPCState *env, target_ulong val)
{
store_booke_tsr(env, val);
}
@@ -126,7 +125,7 @@ void helper_store_booke_tsr(target_ulong val)
/* Embedded PowerPC specific helpers */
/* XXX: to be improved to check access rights when in user-mode */
-target_ulong helper_load_dcr(target_ulong dcrn)
+target_ulong helper_load_dcr(CPUPPCState *env, target_ulong dcrn)
{
uint32_t val = 0;
@@ -144,7 +143,7 @@ target_ulong helper_load_dcr(target_ulong dcrn)
return val;
}
-void helper_store_dcr(target_ulong dcrn, target_ulong val)
+void helper_store_dcr(CPUPPCState *env, target_ulong dcrn, target_ulong val)
{
if (unlikely(env->dcr_env == NULL)) {
qemu_log("No DCR environment\n");