From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PATCH 1/2] target/xtensa: Describe RER and WER register operands
Date: Fri, 20 Nov 2026 00:02:04 +0100 [thread overview]
Message-ID: <20261119230205.4744-2-philmd@oss.qualcomm.com> (raw)
In-Reply-To: <20261119230205.4744-1-philmd@oss.qualcomm.com>
Supply the two register operands missing from the dc233c, lx106
and dsp3400 ISA tables. RER writes its destination and reads its
address; WER reads both.
The translator expects these operands and otherwise consumes
uninitialized arguments when a guest accesses an external register.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
target/xtensa/core-dc233c/xtensa-modules.c.inc | 14 ++++++++++++--
target/xtensa/core-dsp3400/xtensa-modules.c.inc | 14 ++++++++++++--
target/xtensa/core-lx106/xtensa-modules.c.inc | 14 ++++++++++++--
3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/target/xtensa/core-dc233c/xtensa-modules.c.inc b/target/xtensa/core-dc233c/xtensa-modules.c.inc
index 0f32f0804ab3..30a7970207cb 100644
--- a/target/xtensa/core-dc233c/xtensa-modules.c.inc
+++ b/target/xtensa/core-dc233c/xtensa-modules.c.inc
@@ -5814,6 +5814,16 @@ static xtensa_arg_internal Iclass_xt_iclass_div_args[] = {
{ { OPERAND_art }, 'i' }
};
+static xtensa_arg_internal Iclass_xt_iclass_rer_args[] = {
+ { { OPERAND_art }, 'o' },
+ { { OPERAND_ars }, 'i' }
+};
+
+static xtensa_arg_internal Iclass_xt_iclass_wer_args[] = {
+ { { OPERAND_art }, 'i' },
+ { { OPERAND_ars }, 'i' }
+};
+
static xtensa_arg_internal Iclass_xt_iclass_rer_stateArgs[] = {
{ { STATE_PSEXCM }, 'i' },
{ { STATE_PSRING }, 'i' }
@@ -6519,9 +6529,9 @@ static xtensa_iclass_internal iclasses[] = {
4, Iclass_xt_iclass_xsr_atomctl_stateArgs, 0, 0 },
{ 3, Iclass_xt_iclass_div_args,
0, 0, 0, 0 },
- { 0, 0 /* xt_iclass_rer */,
+ { 2, Iclass_xt_iclass_rer_args,
2, Iclass_xt_iclass_rer_stateArgs, 0, 0 },
- { 0, 0 /* xt_iclass_wer */,
+ { 2, Iclass_xt_iclass_wer_args,
2, Iclass_xt_iclass_wer_stateArgs, 0, 0 },
{ 1, Iclass_rur_expstate_args,
2, Iclass_rur_expstate_stateArgs, 0, 0 },
diff --git a/target/xtensa/core-dsp3400/xtensa-modules.c.inc b/target/xtensa/core-dsp3400/xtensa-modules.c.inc
index 28ea3d75fef0..5c358207ed69 100644
--- a/target/xtensa/core-dsp3400/xtensa-modules.c.inc
+++ b/target/xtensa/core-dsp3400/xtensa-modules.c.inc
@@ -54194,6 +54194,16 @@ static xtensa_arg_internal Iclass_wur_phasor_offset_stateArgs[] = {
{ { STATE_CPENABLE }, 'i' }
};
+static xtensa_arg_internal Iclass_xt_iclass_rer_args[] = {
+ { { OPERAND_art }, 'o' },
+ { { OPERAND_ars }, 'i' }
+};
+
+static xtensa_arg_internal Iclass_xt_iclass_wer_args[] = {
+ { { OPERAND_art }, 'i' },
+ { { OPERAND_ars }, 'i' }
+};
+
static xtensa_iclass_internal iclasses[] = {
{ 0, 0 /* xt_iclass_excw */,
0, 0, 0, 0 },
@@ -54719,9 +54729,9 @@ static xtensa_iclass_internal iclasses[] = {
2, Iclass_xt_iclass_wsr_atomctl_stateArgs, 0, 0 },
{ 1, Iclass_xt_iclass_xsr_atomctl_args,
2, Iclass_xt_iclass_xsr_atomctl_stateArgs, 0, 0 },
- { 0, 0 /* xt_iclass_rer */,
+ { 2, Iclass_xt_iclass_rer_args,
0, 0, 0, 0 },
- { 0, 0 /* xt_iclass_wer */,
+ { 2, Iclass_xt_iclass_wer_args,
0, 0, 0, 0 },
{ 1, Iclass_rur_fcr_args,
9, Iclass_rur_fcr_stateArgs, 0, 0 },
diff --git a/target/xtensa/core-lx106/xtensa-modules.c.inc b/target/xtensa/core-lx106/xtensa-modules.c.inc
index f2b5efc6ec88..d7889e707932 100644
--- a/target/xtensa/core-lx106/xtensa-modules.c.inc
+++ b/target/xtensa/core-lx106/xtensa-modules.c.inc
@@ -3291,6 +3291,16 @@ static xtensa_arg_internal Iclass_xt_iclass_nsa_args[] = {
{ { OPERAND_ars }, 'i' }
};
+static xtensa_arg_internal Iclass_xt_iclass_rer_args[] = {
+ { { OPERAND_art }, 'o' },
+ { { OPERAND_ars }, 'i' }
+};
+
+static xtensa_arg_internal Iclass_xt_iclass_wer_args[] = {
+ { { OPERAND_art }, 'i' },
+ { { OPERAND_ars }, 'i' }
+};
+
static xtensa_iclass_internal iclasses[] = {
{ 0, 0 /* xt_iclass_excw */,
0, 0, 0, 0 },
@@ -3606,9 +3616,9 @@ static xtensa_iclass_internal iclasses[] = {
0, 0, 0, 0 },
{ 2, Iclass_xt_iclass_nsa_args,
0, 0, 0, 0 },
- { 0, 0 /* xt_iclass_rer */,
+ { 2, Iclass_xt_iclass_rer_args,
0, 0, 0, 0 },
- { 0, 0 /* xt_iclass_wer */,
+ { 2, Iclass_xt_iclass_wer_args,
0, 0, 0, 0 }
};
--
2.55.0
next prev parent reply other threads:[~2026-11-19 23:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 23:02 [PATCH 0/2] target/xtensa: Describe RER and WER register operands Philippe Mathieu-Daudé
2026-11-19 23:02 ` Philippe Mathieu-Daudé [this message]
2026-11-19 23:02 ` [PATCH 2/2] tests/qtest: Execute Xtensa external register instructions Philippe Mathieu-Daudé
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=20261119230205.4744-2-philmd@oss.qualcomm.com \
--to=philmd@oss.qualcomm.com \
--cc=farosas@suse.de \
--cc=jcmvbkbc@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.