diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-09-05 20:35:53 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-09-05 20:35:53 +0900 |
commit | 16b1353a36171ae06d63fd309f4772dbfb1da113 (patch) | |
tree | cf6c297ee81aba0d9b47f23d78a889667e7bce48 /target-sparc | |
parent | a15119db2ff5c2fdfdeb913b297bf8aa3399132e (diff) | |
download | qemu-16b1353a36171ae06d63fd309f4772dbfb1da113.tar.gz qemu-16b1353a36171ae06d63fd309f4772dbfb1da113.tar.bz2 qemu-16b1353a36171ae06d63fd309f4772dbfb1da113.zip |
Imported Upstream version 2.1.0upstream/2.1.0
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/cc_helper.c | 2 | ||||
-rw-r--r-- | target-sparc/cpu-qom.h | 3 | ||||
-rw-r--r-- | target-sparc/cpu.c | 1 | ||||
-rw-r--r-- | target-sparc/cpu.h | 2 | ||||
-rw-r--r-- | target-sparc/fop_helper.c | 2 | ||||
-rw-r--r-- | target-sparc/helper.c | 2 | ||||
-rw-r--r-- | target-sparc/helper.h | 4 | ||||
-rw-r--r-- | target-sparc/int64_helper.c | 2 | ||||
-rw-r--r-- | target-sparc/ldst_helper.c | 34 | ||||
-rw-r--r-- | target-sparc/translate.c | 6 | ||||
-rw-r--r-- | target-sparc/vis_helper.c | 2 | ||||
-rw-r--r-- | target-sparc/win_helper.c | 2 |
12 files changed, 23 insertions, 39 deletions
diff --git a/target-sparc/cc_helper.c b/target-sparc/cc_helper.c index 63bab077d..35dab7321 100644 --- a/target-sparc/cc_helper.c +++ b/target-sparc/cc_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" static uint32_t compute_all_flags(CPUSPARCState *env) { diff --git a/target-sparc/cpu-qom.h b/target-sparc/cpu-qom.h index 8e3e0de27..477c4d513 100644 --- a/target-sparc/cpu-qom.h +++ b/target-sparc/cpu-qom.h @@ -81,5 +81,8 @@ void sparc_cpu_dump_state(CPUState *cpu, FILE *f, hwaddr sparc_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); int sparc_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg); int sparc_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); +void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cpu, + vaddr addr, int is_write, + int is_user, uintptr_t retaddr); #endif diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index d9f37e9b6..3a0ee504e 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -825,6 +825,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) cc->handle_mmu_fault = sparc_cpu_handle_mmu_fault; #else cc->do_unassigned_access = sparc_cpu_unassigned_access; + cc->do_unaligned_access = sparc_cpu_do_unaligned_access; cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug; #endif diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index f72451d53..836f87f42 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -5,6 +5,8 @@ #include "qemu-common.h" #include "qemu/bswap.h" +#define ALIGNED_ONLY + #if !defined(TARGET_SPARC64) #define TARGET_LONG_BITS 32 #define TARGET_DPREGS 16 diff --git a/target-sparc/fop_helper.c b/target-sparc/fop_helper.c index f4b62a5ba..ee4592ef2 100644 --- a/target-sparc/fop_helper.c +++ b/target-sparc/fop_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #define QT0 (env->qt0) #define QT1 (env->qt1) diff --git a/target-sparc/helper.c b/target-sparc/helper.c index ae7740bca..4850c7cec 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/sysemu.h" void helper_raise_exception(CPUSPARCState *env, int tt) diff --git a/target-sparc/helper.h b/target-sparc/helper.h index cd8d3fa9f..1ad23e8db 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - #ifndef TARGET_SPARC64 DEF_HELPER_1(rett, void, env) DEF_HELPER_2(wrpsr, void, env, tl) @@ -175,5 +173,3 @@ VIS_CMPHELPER(cmpne) #undef VIS_CMPHELPER DEF_HELPER_1(compute_psr, void, env) DEF_HELPER_1(compute_C_icc, i32, env) - -#include "exec/def-helper.h" diff --git a/target-sparc/int64_helper.c b/target-sparc/int64_helper.c index bf242323a..b02d22b19 100644 --- a/target-sparc/int64_helper.c +++ b/target-sparc/int64_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "trace.h" #define DEBUG_PCALL diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index ec1480257..03bd9f970 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -18,7 +18,8 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/cpu_ldst.h" //#define DEBUG_MMU //#define DEBUG_MXCC @@ -64,27 +65,6 @@ #define QT0 (env->qt0) #define QT1 (env->qt1) -#if !defined(CONFIG_USER_ONLY) -static void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env, - target_ulong addr, int is_write, - int is_user, uintptr_t retaddr); -#include "exec/softmmu_exec.h" -#define MMUSUFFIX _mmu -#define ALIGNED_ONLY - -#define SHIFT 0 -#include "exec/softmmu_template.h" - -#define SHIFT 1 -#include "exec/softmmu_template.h" - -#define SHIFT 2 -#include "exec/softmmu_template.h" - -#define SHIFT 3 -#include "exec/softmmu_template.h" -#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, @@ -2425,11 +2405,13 @@ void sparc_cpu_unassigned_access(CPUState *cs, hwaddr addr, #endif #if !defined(CONFIG_USER_ONLY) -static void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env, - target_ulong addr, int is_write, - int is_user, uintptr_t retaddr) +void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cs, + vaddr addr, int is_write, + int is_user, uintptr_t retaddr) { - SPARCCPU *cpu = sparc_env_get_cpu(env); + SPARCCPU *cpu = SPARC_CPU(cs); + CPUSPARCState *env = &cpu->env; + #ifdef DEBUG_UNALIGNED printf("Unaligned access to 0x" TARGET_FMT_lx " from 0x" TARGET_FMT_lx "\n", addr, env->pc); diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 2de1c4a58..1ab07a18a 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -26,11 +26,11 @@ #include "cpu.h" #include "disas/disas.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "tcg-op.h" +#include "exec/cpu_ldst.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-gen.h" #define DEBUG_DISAS diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c index 9d2edb09b..383cc8bdf 100644 --- a/target-sparc/vis_helper.c +++ b/target-sparc/vis_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* This function uses non-native bit order */ #define GET_FIELD(X, FROM, TO) \ diff --git a/target-sparc/win_helper.c b/target-sparc/win_helper.c index 3e82eb71d..f01ae08f6 100644 --- a/target-sparc/win_helper.c +++ b/target-sparc/win_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "trace.h" static inline void memcpy32(target_ulong *dst, const target_ulong *src) |