valgrind/SOURCES/0009-s390x-Minor-fixes-in-extension-s390x.c.patch

67 lines
2.7 KiB
Diff

From ebe5fd9c0aae97767a4418d2f26f3281065b3e6a Mon Sep 17 00:00:00 2001
From: Andreas Arnez <arnez@linux.ibm.com>
Date: Wed, 15 May 2024 14:32:42 +0200
Subject: [PATCH 09/11] s390x: Minor fixes in extension-s390x.c
Some tracker names for registers are not consistent with the naming
scheme. Also, there is a dead assignment to orig_addr2 and orig_len2.
Fix both.
(cherry picked from commit 76f2218924f85547f670969b1a0b59e5200e22ec)
---
coregrind/m_extension/extension-s390x.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c
index fd45c7ee948f..735406e6e4c5 100644
--- a/coregrind/m_extension/extension-s390x.c
+++ b/coregrind/m_extension/extension-s390x.c
@@ -37,9 +37,9 @@
#undef SYSNO
-#define READ_FUNCTION_CODE(tst) \
+#define READ_FUNCTION_CODE(tst, extname) \
({ \
- PRE_REG_READ(tst, "func_code", r0, 7, sizeof(UChar)); \
+ PRE_REG_READ(tst, extname "(func_code)", r0, 7, sizeof(UChar)); \
tst->arch.vex.guest_r0 & 0xff; \
})
@@ -141,10 +141,10 @@ static enum ExtensionError do_extension_PRNO(ThreadState* tst, ULong variant)
{
UChar r1 = variant & 0xf;
UChar r2 = (variant >> 4) & 0xf;
- UChar func = READ_FUNCTION_CODE(tst);
+ UChar func = READ_FUNCTION_CODE(tst, "PRNO");
UChar fc = func & 0x7f;
UChar mflag = func & 128;
- ULong parms = READ_GPR(tst, "r1", 1);
+ ULong parms = READ_GPR(tst, "PRNO(r1)", 1);
ULong parms_len;
Int cc = 0;
ULong orig_addr1 = 0, orig_len1 = 0, orig_addr2 = 0, orig_len2 = 0;
@@ -175,8 +175,8 @@ static enum ExtensionError do_extension_PRNO(ThreadState* tst, ULong variant)
PRE_MEM_WRITE(tst, "PRNO(op1)", addr1, len1);
} else {
// Seed operation
- addr2 = orig_addr2 = READ_GPR(tst, "PRNO(op2_addr)", r2);
- len2 = orig_len2 = READ_GPR(tst, "PRNO(op2_len)", r2 + 1);
+ addr2 = READ_GPR(tst, "PRNO(op2_addr)", r2);
+ len2 = READ_GPR(tst, "PRNO(op2_len)", r2 + 1);
PRE_MEM_READ(tst, "PRNO(op2)", addr2, len2);
}
PRE_MEM_WRITE(tst, "PRNO(parms)", parms, parms_len);
@@ -474,7 +474,7 @@ static enum ExtensionError do_extension_NNPA(ThreadState* tst, ULong variant)
{
ULong gpr0 = READ_GPR(tst, "NNPA(r0)", 0);
UChar fc = gpr0 & 0x7f;
- ULong parms_addr = READ_GPR(tst, "r1", 1);
+ ULong parms_addr = READ_GPR(tst, "NNPA(r1)", 1);
Int cc = 0;
ULong parms_len;
--
2.45.2