From 3f208fd76bcc91a8506681bb8472f2398fe6f487 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 11 Feb 2016 11:17:31 +0000 Subject: target-arm: Add isread parameter to CPAccessFns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit System registers might have access requirements which need to be described via a CPAccessFn and which differ for reads and writes. For this to be possible we need to pass the access function a parameter to tell it whether the access being checked is a read or a write. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Edgar E. Iglesias Reviewed-by: Sergey Fedorov Message-id: 1454506721-11843-6-git-send-email-peter.maydell@linaro.org --- target-arm/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'target-arm/translate.c') diff --git a/target-arm/translate.c b/target-arm/translate.c index f6a38bcc09..2c8213b07a 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -7169,7 +7169,7 @@ static int disas_coproc_insn(DisasContext *s, uint32_t insn) * call in order to handle c15_cpar. */ TCGv_ptr tmpptr; - TCGv_i32 tcg_syn; + TCGv_i32 tcg_syn, tcg_isread; uint32_t syndrome; /* Note that since we are an implementation which takes an @@ -7214,9 +7214,12 @@ static int disas_coproc_insn(DisasContext *s, uint32_t insn) gen_set_pc_im(s, s->pc - 4); tmpptr = tcg_const_ptr(ri); tcg_syn = tcg_const_i32(syndrome); - gen_helper_access_check_cp_reg(cpu_env, tmpptr, tcg_syn); + tcg_isread = tcg_const_i32(isread); + gen_helper_access_check_cp_reg(cpu_env, tmpptr, tcg_syn, + tcg_isread); tcg_temp_free_ptr(tmpptr); tcg_temp_free_i32(tcg_syn); + tcg_temp_free_i32(tcg_isread); } /* Handle special cases first */ -- cgit v1.2.3