@@ -28,6 +28,8 @@ DEF_HELPER_FLAGS_1(lookup_tb_ptr, TCG_CALL_NO_WG_SE, cptr, env)
DEF_HELPER_FLAGS_1(exit_atomic, TCG_CALL_NO_WG, noreturn, env)
+DEF_HELPER_FLAGS_5(probe_access, TCG_CALL_NO_WG, void, env, i64, i32, i32, i32)
+
#ifndef IN_HELPER_PROTO
/*
* Pass calls to memset directly to libc, without a thunk in qemu.
@@ -101,8 +101,6 @@ DEF_HELPER_FLAGS_1(rebuild_hflags_a32_newel, TCG_CALL_NO_RWG, void, env)
DEF_HELPER_FLAGS_2(rebuild_hflags_a32, TCG_CALL_NO_RWG, void, env, int)
DEF_HELPER_FLAGS_2(rebuild_hflags_a64, TCG_CALL_NO_RWG, void, env, int)
-DEF_HELPER_FLAGS_5(probe_access, TCG_CALL_NO_WG, void, env, i64, i32, i32, i32)
-
DEF_HELPER_1(vfp_get_fpscr, i32, env)
DEF_HELPER_2(vfp_set_fpscr, void, env, i32)
@@ -152,3 +152,19 @@ void HELPER(exit_atomic)(CPUArchState *env)
{
cpu_loop_exit_atomic(env_cpu(env), GETPC());
}
+
+void HELPER(probe_access)(CPUArchState *env, uint64_t ptr,
+ uint32_t access_type, uint32_t mmu_idx,
+ uint32_t size)
+{
+ uint32_t in_page = -((uint32_t)ptr | TARGET_PAGE_SIZE);
+ uintptr_t ra = GETPC();
+
+ if (likely(size <= in_page)) {
+ probe_access(env, ptr, size, access_type, mmu_idx, ra);
+ } else {
+ probe_access(env, ptr, in_page, access_type, mmu_idx, ra);
+ probe_access(env, ptr + in_page, size - in_page,
+ access_type, mmu_idx, ra);
+ }
+}
@@ -1009,22 +1009,6 @@ uint32_t HELPER(ror_cc)(CPUARMState *env, uint32_t x, uint32_t i)
}
}
-void HELPER(probe_access)(CPUArchState *env, uint64_t ptr,
- uint32_t access_type, uint32_t mmu_idx,
- uint32_t size)
-{
- uint32_t in_page = -((uint32_t)ptr | TARGET_PAGE_SIZE);
- uintptr_t ra = GETPC();
-
- if (likely(size <= in_page)) {
- probe_access(env, ptr, size, access_type, mmu_idx, ra);
- } else {
- probe_access(env, ptr, in_page, access_type, mmu_idx, ra);
- probe_access(env, ptr + in_page, size - in_page,
- access_type, mmu_idx, ra);
- }
-}
-
/*
* This function corresponds to AArch64.vESBOperation().
* Note that the AArch32 version is not functionally different.
probe_access() is not ARM specific and can be reused by other targets. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/tcg/tcg-runtime.h | 2 ++ target/arm/helper.h | 2 -- accel/tcg/tcg-runtime.c | 16 ++++++++++++++++ target/arm/tcg/op_helper.c | 16 ---------------- 4 files changed, 18 insertions(+), 18 deletions(-)