From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnrRv-0002hr-JJ for qemu-devel@nongnu.org; Fri, 23 May 2014 11:32:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnrRp-0001wN-07 for qemu-devel@nongnu.org; Fri, 23 May 2014 11:31:59 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnrRo-0001tx-Q5 for qemu-devel@nongnu.org; Fri, 23 May 2014 11:31:52 -0400 From: Peter Maydell Date: Fri, 23 May 2014 16:31:40 +0100 Message-Id: <1400859102-15779-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1400859102-15779-1-git-send-email-peter.maydell@linaro.org> References: <1400859102-15779-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 3/5] target-arm/translate.c: Use get_mem_index() for SRS memory accesses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , peter.crosthwaite@xilinx.com, patches@linaro.org, aggelerf@ethz.ch, alex.bennee@linaro.org, rth@twiddle.net The SRS instruction was using a hardcoded 0 for the memory accesses. This happens to be OK since the SRS instruction is UNPREDICTABLE in User and System modes, but is awkward if we want to rearrange the MMU index uses. Switch to using get_mem_index() like all the other accesses. Signed-off-by: Peter Maydell --- target-arm/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index e708f4a..e40b0a7 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -7338,11 +7338,11 @@ static void gen_srs(DisasContext *s, } tcg_gen_addi_i32(addr, addr, offset); tmp = load_reg(s, 14); - gen_aa32_st32(tmp, addr, 0); + gen_aa32_st32(tmp, addr, get_mem_index(s)); tcg_temp_free_i32(tmp); tmp = load_cpu_field(spsr); tcg_gen_addi_i32(addr, addr, 4); - gen_aa32_st32(tmp, addr, 0); + gen_aa32_st32(tmp, addr, get_mem_index(s)); tcg_temp_free_i32(tmp); if (writeback) { switch (amode) { -- 1.9.2