aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2023-12-20 11:34:15 +0100
committerAndreas Krebbel <krebbel@linux.ibm.com>2023-12-20 11:50:32 +0100
commitf96fe7f454bdd077abec2acc415f546bb5646189 (patch)
treeee9abf7a8ffe9b9d36236bab978e8a9da980062e /include
parenta3fa108623c51846ff019fbcba9f483897d6f5f7 (diff)
downloadgdb-f96fe7f454bdd077abec2acc415f546bb5646189.zip
gdb-f96fe7f454bdd077abec2acc415f546bb5646189.tar.gz
gdb-f96fe7f454bdd077abec2acc415f546bb5646189.tar.bz2
s390: Optionally print instruction description in disassembly
Print instruction description as comment in disassembly with s390 architecture specific option "insndesc": - For objdump it can be enabled with option "-M insndesc" - In gdb it can be enabled with "set disassembler-options insndesc" Since comments are not column aligned the output can enhanced for readability by postprocessing using a filter such as "expand": ... | expand -t 8,16,24,32,40,80 Or when using in combination with objdump option --visualize-jumps: ... | expand | sed -e 's/ *#/\t#/' | expand -t 1,80 Note that the instruction descriptions add about 128 KB to s390-opc.o: s390-opc.o without instruction descriptions: 216368 bytes s390-opc.o with instruction descriptions : 348432 bytes binutils/ * NEWS: Mention new s390-specific disassembler option "insndesc". include/ * opcode/s390.h (struct s390_opcode): Add field to hold instruction description. opcodes/ * s390-mkopc.c: Copy instruction description from s390-opc.txt into generated operation code table s390-opc.tab. * s390-opc.c (s390_opformats): Provide NULL as description in .insn pseudo-mnemonics opcode table. * s390-dis.c: Add s390-specific disassembler option "insndesc" and optionally print the instruction description as comment in the disassembly when it is specified. gas/ * testsuite/gas/s390/s390.exp: Add new test disassembly test case "zarch-insndesc". * testsuite/gas/s390/zarch-insndesc.s: New test case for s390- specific disassembler option "insndesc". * testsuite/gas/s390/zarch-insndesc.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com> Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/opcode/s390.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
index d540e1d..319bfe2 100644
--- a/include/opcode/s390.h
+++ b/include/opcode/s390.h
@@ -81,7 +81,7 @@ enum s390_opcode_cpu_val
struct s390_opcode
{
- /* The opcode name. */
+ /* The opcode name (mnemonic). */
const char * name;
/* The opcode itself. Those bits which will be filled in with
@@ -110,6 +110,9 @@ struct s390_opcode
/* Instruction specific flags. */
unsigned int flags;
+
+ /* Instruction description. */
+ const char * description;
};
/* The table itself is sorted by major opcode number, and is otherwise