From bccd9ec5f098668576342c83d90d6d6833d61d33 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Mon, 4 Jul 2011 20:57:05 +0000 Subject: softmmu_header: pass CPUState to tlb_fill Pass CPUState pointer to tlb_fill() instead of architecture local cpu_single_env hacks. Signed-off-by: Blue Swirl --- target-sparc/op_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'target-sparc/op_helper.c') diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 48e1db8227..1cb0636c30 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -4225,15 +4225,14 @@ static void do_unaligned_access(target_ulong addr, int is_write, int is_user, NULL, it means that the function was called in C code (i.e. not from generated code or from helper.c) */ /* XXX: fix it to restore all registers */ -void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) +void tlb_fill(CPUState *env1, target_ulong addr, int is_write, int mmu_idx, + void *retaddr) { int ret; CPUState *saved_env; - /* XXX: hack to restore env in all cases, even if not called from - generated code */ saved_env = env; - env = cpu_single_env; + env = env1; ret = cpu_sparc_handle_mmu_fault(env, addr, is_write, mmu_idx); if (ret) { -- cgit v1.2.3