mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
accel/tcg: Implement helper_{ld,st}*_mmu for user-only
TCG backends may need to defer to a helper to implement the atomicity required by a given operation. Mirror the interface used in system mode. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
+274
-119
File diff suppressed because it is too large
Load Diff
@@ -25,8 +25,6 @@
|
||||
#ifndef TCG_LDST_H
|
||||
#define TCG_LDST_H
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
|
||||
/* Value zero-extended to tcg register size. */
|
||||
tcg_target_ulong helper_ldub_mmu(CPUArchState *env, target_ulong addr,
|
||||
MemOpIdx oi, uintptr_t retaddr);
|
||||
@@ -58,10 +56,10 @@ void helper_stl_mmu(CPUArchState *env, target_ulong addr, uint32_t val,
|
||||
void helper_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val,
|
||||
MemOpIdx oi, uintptr_t retaddr);
|
||||
|
||||
#else
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
|
||||
G_NORETURN void helper_unaligned_ld(CPUArchState *env, target_ulong addr);
|
||||
G_NORETURN void helper_unaligned_st(CPUArchState *env, target_ulong addr);
|
||||
|
||||
#endif /* CONFIG_SOFTMMU */
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
#endif /* TCG_LDST_H */
|
||||
|
||||
@@ -197,8 +197,7 @@ static void tcg_out_st_helper_args(TCGContext *s, const TCGLabelQemuLdst *l,
|
||||
const TCGLdstHelperParam *p)
|
||||
__attribute__((unused));
|
||||
|
||||
#ifdef CONFIG_SOFTMMU
|
||||
static void * const qemu_ld_helpers[MO_SSIZE + 1] = {
|
||||
static void * const qemu_ld_helpers[MO_SSIZE + 1] __attribute__((unused)) = {
|
||||
[MO_UB] = helper_ldub_mmu,
|
||||
[MO_SB] = helper_ldsb_mmu,
|
||||
[MO_UW] = helper_lduw_mmu,
|
||||
@@ -210,13 +209,12 @@ static void * const qemu_ld_helpers[MO_SSIZE + 1] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static void * const qemu_st_helpers[MO_SIZE + 1] = {
|
||||
static void * const qemu_st_helpers[MO_SIZE + 1] __attribute__((unused)) = {
|
||||
[MO_8] = helper_stb_mmu,
|
||||
[MO_16] = helper_stw_mmu,
|
||||
[MO_32] = helper_stl_mmu,
|
||||
[MO_64] = helper_stq_mmu,
|
||||
};
|
||||
#endif
|
||||
|
||||
TCGContext tcg_init_ctx;
|
||||
__thread TCGContext *tcg_ctx;
|
||||
|
||||
Reference in New Issue
Block a user