aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/cpu.h2
-rw-r--r--target-sparc/op_helper.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 0c5a7ef54d..580f4d46c8 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -550,8 +550,10 @@ static inline void PUT_CWP64(CPUSPARCState *env1, int cwp)
#endif
/* cpu-exec.c */
+#if !defined(CONFIG_USER_ONLY)
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi, int size);
+#endif
int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);
#define cpu_init cpu_sparc_init
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index eb4f5a4338..704631a24e 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -47,6 +47,11 @@
#endif
#endif
+#if defined(CONFIG_USER_ONLY) && defined(TARGET_SPARC64)
+static void do_unassigned_access(target_ulong addr, int is_write, int is_exec,
+ int is_asi, int size);
+#endif
+
#if defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY)
// Calculates TSB pointer value for fault page size 8k or 64k
static uint64_t ultrasparc_tsb_pointer(uint64_t tsb_register,
@@ -3707,9 +3712,10 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr)
env = saved_env;
}
-#endif
+#endif /* !CONFIG_USER_ONLY */
#ifndef TARGET_SPARC64
+#if !defined(CONFIG_USER_ONLY)
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi, int size)
{
@@ -3770,9 +3776,15 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
env = saved_env;
}
+#endif
+#else
+#if defined(CONFIG_USER_ONLY)
+static void do_unassigned_access(target_ulong addr, int is_write, int is_exec,
+ int is_asi, int size)
#else
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
int is_asi, int size)
+#endif
{
CPUState *saved_env;
@@ -3795,6 +3807,7 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
}
#endif
+
#ifdef TARGET_SPARC64
void helper_tick_set_count(void *opaque, uint64_t count)
{