qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
	peter.crosthwaite@xilinx.com, patches@linaro.org,
	aggelerf@ethz.ch, alex.bennee@linaro.org, rth@twiddle.net
Subject: [Qemu-devel] [PATCH 3/5] target-arm/translate.c: Use get_mem_index() for SRS memory accesses
Date: Fri, 23 May 2014 16:31:40 +0100	[thread overview]
Message-ID: <1400859102-15779-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1400859102-15779-1-git-send-email-peter.maydell@linaro.org>

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 <peter.maydell@linaro.org>
---
 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

  parent reply	other threads:[~2014-05-23 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 15:31 [Qemu-devel] [PATCH 0/5] mmu index cleanup/fixes Peter Maydell
2014-05-23 15:31 ` [Qemu-devel] [PATCH 1/5] target-arm: Move get_mem_index to translate.h Peter Maydell
2014-05-23 15:31 ` [Qemu-devel] [PATCH 2/5] target-arm/translate.c: Clean up mmu index handling for ldrt/strt Peter Maydell
2014-05-23 15:31 ` Peter Maydell [this message]
2014-05-23 15:31 ` [Qemu-devel] [PATCH 4/5] target-arm: A32: Use get_mem_index for load/stores Peter Maydell
2014-05-23 15:31 ` [Qemu-devel] [PATCH 5/5] target-arm: Use a 1:1 mapping between EL and MMU index Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400859102-15779-4-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=aggelerf@ethz.ch \
    --cc=alex.bennee@linaro.org \
    --cc=edgar.iglesias@xilinx.com \
    --cc=patches@linaro.org \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).