[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 08/11] softmmu: make do_unaligned_access extern
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [RFC PATCH 08/11] softmmu: make do_unaligned_access extern |
Date: |
Thu, 8 May 2014 18:09:48 +0200 |
We will reference it from more files in the next patch.
Signed-off-by: Paolo Bonzini <address@hidden>
---
target-alpha/cpu.h | 3 +++
target-alpha/mem_helper.c | 4 ++--
target-mips/cpu.h | 3 +++
target-mips/op_helper.c | 8 ++------
target-sparc/cpu.h | 4 ++++
target-sparc/ldst_helper.c | 9 +++------
target-xtensa/cpu.h | 3 +++
target-xtensa/op_helper.c | 5 +----
8 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h
index d9b861f..242068f 100644
--- a/target-alpha/cpu.h
+++ b/target-alpha/cpu.h
@@ -498,6 +498,9 @@ static inline void cpu_get_tb_cpu_state(CPUAlphaState *env,
target_ulong *pc,
*pflags = flags;
}
+void do_unaligned_access(CPUAlphaState *env, target_ulong addr,
+ int is_write, int is_user, uintptr_t retaddr);
+
#include "exec/exec-all.h"
#endif /* !defined (__CPU_ALPHA_H__) */
diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c
index 5a94f3e..1e80167 100644
--- a/target-alpha/mem_helper.c
+++ b/target-alpha/mem_helper.c
@@ -96,8 +96,8 @@ uint64_t helper_stq_c_phys(CPUAlphaState *env, uint64_t p,
uint64_t v)
return ret;
}
-static void do_unaligned_access(CPUAlphaState *env, target_ulong addr,
- int is_write, int is_user, uintptr_t retaddr)
+void do_unaligned_access(CPUAlphaState *env, target_ulong addr,
+ int is_write, int is_user, uintptr_t retaddr)
{
AlphaCPU *cpu = alpha_env_get_cpu(env);
CPUState *cs = CPU(cpu);
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index a9b2c7a..29d3d8f 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -782,4 +782,7 @@ static inline void compute_hflags(CPUMIPSState *env)
}
}
+void do_unaligned_access(CPUMIPSState *env, target_ulong addr,
+ int is_write, int is_user, uintptr_t retaddr);
+
#endif /* !defined (__MIPS_CPU_H__) */
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index b0e8165..aebd1e4 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -2128,12 +2128,8 @@ void helper_wait(CPUMIPSState *env)
#if !defined(CONFIG_USER_ONLY)
-static void QEMU_NORETURN do_unaligned_access(CPUMIPSState *env,
- target_ulong addr, int is_write,
- int is_user, uintptr_t retaddr);
-
-static void do_unaligned_access(CPUMIPSState *env, target_ulong addr,
- int is_write, int is_user, uintptr_t retaddr)
+void do_unaligned_access(CPUMIPSState *env, target_ulong addr,
+ int is_write, int is_user, uintptr_t retaddr)
{
env->CP0_BadVAddr = addr;
do_raise_exception(env, (is_write == 1) ? EXCP_AdES : EXCP_AdEL, retaddr);
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 836f87f..aaedf43 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -751,6 +751,10 @@ static inline bool tb_am_enabled(int tb_flags)
#endif
}
+void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env,
+ target_ulong addr, int is_write,
+ int is_user, uintptr_t retaddr);
+
#include "exec/exec-all.h"
#endif
diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 2d6ea70..2bc9b3a 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -65,9 +65,6 @@
#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"
#endif
@@ -2411,9 +2408,9 @@ 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 do_unaligned_access(CPUSPARCState *env,
+ target_ulong addr, int is_write,
+ int is_user, uintptr_t retaddr)
{
SPARCCPU *cpu = sparc_env_get_cpu(env);
#ifdef DEBUG_UNALIGNED
diff --git a/target-xtensa/cpu.h b/target-xtensa/cpu.h
index d797d26..ecb7ae6 100644
--- a/target-xtensa/cpu.h
+++ b/target-xtensa/cpu.h
@@ -523,6 +523,9 @@ static inline void cpu_get_tb_cpu_state(CPUXtensaState
*env, target_ulong *pc,
}
}
+void do_unaligned_access(CPUXtensaState *env,
+ target_ulong addr, int is_write, int is_user, uintptr_t retaddr);
+
#include "exec/cpu-all.h"
#include "exec/exec-all.h"
diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
index f421c18..4a174a3 100644
--- a/target-xtensa/op_helper.c
+++ b/target-xtensa/op_helper.c
@@ -31,10 +31,7 @@
#include "exec/softmmu_exec.h"
#include "exec/address-spaces.h"
-static void do_unaligned_access(CPUXtensaState *env,
- target_ulong addr, int is_write, int is_user, uintptr_t retaddr);
-
-static void do_unaligned_access(CPUXtensaState *env,
+void do_unaligned_access(CPUXtensaState *env,
target_ulong addr, int is_write, int is_user, uintptr_t retaddr)
{
XtensaCPU *cpu = xtensa_env_get_cpu(env);
--
1.8.3.1
- Re: [Qemu-devel] [RFC PATCH 01/11] hw: use ld_p/st_p instead of ld_raw/st_raw, (continued)
- [Qemu-devel] [RFC PATCH 11/11] softmmu: move all load/store functions to cpu_ldst.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 09/11] target-arm: move arm_*_code to a separate file, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 05/11] softmmu: move ALIGNED_ONLY to cpu.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 04/11] softmmu: move definition of CPU_MMU_INDEX to inclusion site, drop ACCESS_TYPE, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 02/11] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 08/11] softmmu: make do_unaligned_access extern,
Paolo Bonzini <=
- [Qemu-devel] [RFC PATCH 03/11] softmmu: move MMUSUFFIX under SOFTMMU_CODE_ACCESS, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 07/11] softmmu: move softmmu_template.h out of include/, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 10/11] softmmu: introduce cpu_ldst.h, Paolo Bonzini, 2014/05/08
- [Qemu-devel] [RFC PATCH 06/11] softmmu: commonize helper definitions, Paolo Bonzini, 2014/05/08
- Re: [Qemu-devel] [RFC PATCH 00/11] Cleanup load/store functions in headers and C files, Richard Henderson, 2014/05/12