aboutsummaryrefslogtreecommitdiffstats
path: root/target-sparc
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2010-03-01 04:11:28 +0000
committerPaul Brook <paul@codesourcery.com>2010-03-12 18:44:24 +0000
commit3c7b48b74cb017ab6da7c3c0bc205a03943a6274 (patch)
treeed0713ad05f3ea31fbb3d7c9e546fa0f45c86666 /target-sparc
parent4fcc562bff94c28cc06d510d87280afc467add6d (diff)
Target specific usermode cleanup
Disable various target specific code that is only relevant to system emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
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 0c5a7ef54..580f4d46c 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 eb4f5a433..704631a24 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)
{