@@ -1,6 +1,10 @@
/* Exceptions */
DEF_HELPER_2(raise_exception, noreturn, env, i32)
+/* Probe page */
+DEF_HELPER_FLAGS_3(check_probe_read, TCG_CALL_NO_WG, void, env, tl, tl)
+DEF_HELPER_FLAGS_3(check_probe_write, TCG_CALL_NO_WG, void, env, tl, tl)
+
/* Floating Point - rounding mode */
DEF_HELPER_FLAGS_2(set_rounding_mode, TCG_CALL_NO_WG, void, env, i32)
DEF_HELPER_FLAGS_2(set_rounding_mode_chkfrm, TCG_CALL_NO_WG, void, env, i32)
@@ -136,6 +136,18 @@ static void probe_pages(CPURISCVState *env, target_ulong addr,
}
}
+void HELPER(check_probe_read)(CPURISCVState *env, target_ulong addr,
+ target_ulong len)
+{
+ probe_pages(env, addr, len, GETPC(), MMU_DATA_LOAD);
+}
+
+void HELPER(check_probe_write)(CPURISCVState *env, target_ulong addr,
+ target_ulong len)
+{
+ probe_pages(env, addr, len, GETPC(), MMU_DATA_STORE);
+}
+
static inline void vext_set_elem_mask(void *v0, int index,
uint8_t value)
{
The helper_check_probe_[read|write] functions wrap the probe_pages function to perform virtual address resolution for continuous vector load/store instructions. Signed-off-by: Max Chou <max.chou@sifive.com> --- target/riscv/helper.h | 4 ++++ target/riscv/vector_helper.c | 12 ++++++++++++ 2 files changed, 16 insertions(+)