qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH 1/4] target/xtensa: add translation for wsr.mpucfg
Date: Thu, 11 Jan 2024 20:21:25 -0800	[thread overview]
Message-ID: <20240112042128.3569220-2-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20240112042128.3569220-1-jcmvbkbc@gmail.com>

Although MPUCFG is not writable, the opcode wsr.mpucfg is defined and it
just does nothing. Define wsr.mpucfg as nop.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target/xtensa/translate.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index de899405994e..6a2f5d308e6a 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -5332,6 +5332,15 @@ static const XtensaOpcodeOps core_ops[] = {
             XTENSA_OPTION_TRACE_PORT,
         },
         .op_flags = XTENSA_OP_PRIVILEGED,
+    }, {
+        .name = "wsr.mpucfg",
+        .translate = translate_nop,
+        .test_exceptions = test_exceptions_sr,
+        .par = (const uint32_t[]){
+            MPUCFG,
+            XTENSA_OPTION_MPU,
+        },
+        .op_flags = XTENSA_OP_PRIVILEGED,
     }, {
         .name = "wsr.mpuenb",
         .translate = translate_wsr_mpuenb,
-- 
2.39.2



  reply	other threads:[~2024-01-12  4:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  4:21 [PATCH 0/4] target/xtensa: provide configuration with MPU Max Filippov
2024-01-12  4:21 ` Max Filippov [this message]
2024-01-12  4:21 ` [PATCH 2/4] target/xtensa: import sample_controller32 core Max Filippov
2024-01-12  4:21 ` [PATCH 3/4] tests/tcg/xtensa: tidy test linker script Max Filippov
2024-01-12  4:21 ` [PATCH 4/4] tests/tcg/xtensa: fix SR test for configs with MPU Max Filippov

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=20240112042128.3569220-2-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).