* [PATCH v2] target/mips: Fix msaregnames and mxuregnames off-by-one
@ 2025-09-19 20:26 Anton Johansson via
0 siblings, 0 replies; only message in thread
From: Anton Johansson via @ 2025-09-19 20:26 UTC (permalink / raw)
To: qemu-devel; +Cc: philmd, Richard Henderson
The msaregnames and mxuregnames arrays contains strings of 7 bytes
("w10.d0", ...) and 5 bytes ("XR10", ...) in length including the
NULL byte.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
target/mips/tcg/msa_translate.c | 2 +-
target/mips/tcg/mxu_translate.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c
index 82b149922f..0e947125a0 100644
--- a/target/mips/tcg/msa_translate.c
+++ b/target/mips/tcg/msa_translate.c
@@ -32,7 +32,7 @@ static inline int plus_2(DisasContext *s, int x)
/* Include the auto-generated decoder. */
#include "decode-msa.c.inc"
-static const char msaregnames[][6] = {
+static const char msaregnames[][7] = {
"w0.d0", "w0.d1", "w1.d0", "w1.d1",
"w2.d0", "w2.d1", "w3.d0", "w3.d1",
"w4.d0", "w4.d1", "w5.d0", "w5.d1",
diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c
index 35ebb0397d..7e8cc8b06f 100644
--- a/target/mips/tcg/mxu_translate.c
+++ b/target/mips/tcg/mxu_translate.c
@@ -609,7 +609,7 @@ enum {
static TCGv mxu_gpr[NUMBER_OF_MXU_REGISTERS - 1];
static TCGv mxu_CR;
-static const char mxuregnames[NUMBER_OF_MXU_REGISTERS][4] = {
+static const char mxuregnames[NUMBER_OF_MXU_REGISTERS][5] = {
"XR1", "XR2", "XR3", "XR4", "XR5", "XR6", "XR7", "XR8",
"XR9", "XR10", "XR11", "XR12", "XR13", "XR14", "XR15", "XCR",
};
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-19 20:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 20:26 [PATCH v2] target/mips: Fix msaregnames and mxuregnames off-by-one Anton Johansson via
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).