]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Fix disassembly of locfh/locfhr, update S390_MAX_MNEMONIC_LEN
authorAndreas Arnez <arnez@linux.ibm.com>
Thu, 8 Aug 2024 12:56:50 +0000 (14:56 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 8 Aug 2024 12:56:50 +0000 (14:56 +0200)
The length of the "longest mnemonic" for the s390x disassembler is
currently defined in s390_defs.h to be 8 characters, where in fact it
should be 9.  Update the constant to reflect that.

Also fix the disassembly of the instructions locfh and locfhr, changing
them from their current wrong representations `locgh' and `locghr'.

VEX/priv/s390_defs.h
VEX/priv/s390_disasm.c

index 80d7336061dc45d54daab201f406f72b4748ed7e..da5113f7deb18e8a9fa801eec2a697553bb40ab8 100644 (file)
@@ -166,8 +166,8 @@ typedef enum
 #define S390_PPNO_MAX_SIZE_SHA512_GEN  64
 
 
-/* The length of the longest mnemonic: locgrnhe */
-#define S390_MAX_MNEMONIC_LEN  8
+/* The length of the longest mnemonic: locfhrnhe */
+#define S390_MAX_MNEMONIC_LEN  9
 
 
 /*---------------------------------------------------------------*/
index 16b9560cbd885b2568763b26d71446a98cad0123..a1cf61bb4d90f8b717ffac163b906fc22c7b2834 100644 (file)
@@ -251,8 +251,8 @@ cls_operand(Int kind, UInt mask)
    case S390_XMNM_STOC:   prefix = "stoc";  break;
    case S390_XMNM_STOCG:  prefix = "stocg"; break;
    case S390_XMNM_STOCFH: prefix = "stocfh"; break;
-   case S390_XMNM_LOCFH:  prefix = "locgh"; break;
-   case S390_XMNM_LOCFHR: prefix = "locghr"; break;
+   case S390_XMNM_LOCFH:  prefix = "locfh"; break;
+   case S390_XMNM_LOCFHR: prefix = "locfhr"; break;
    case S390_XMNM_LOCHI:  prefix = "lochi"; break;
    case S390_XMNM_LOCGHI: prefix = "locghi"; break;
    case S390_XMNM_LOCHHI: prefix = "lochhi"; break;