[PATCH 2/2] s390: Optionally print instruction description in disassembly

Nick Clifton nickc@redhat.com
Mon Dec 11 11:52:29 GMT 2023


Hi Jens,

> Print instruction description as comment in disassembly with s390
> architecture specific option "insndesc":

Please could you make one change and, optionally, add one extra feature:


>       int   flags;
> +    char  description[80];

Please could you replace "80" with a #define'd constant, eg MAX_DESC_LEN
and then...


>     op_array[ix].mode_bits = mode_bits;
>     op_array[ix].flags = flags;
> +  strcpy(op_array[ix].description, description);
>     no_ops++;

Use strncpy to ensure that the field is not overwritten by a erroneously
large description.


The optional extra feature is a new test case in the gas testsuite that
makes sure that the new feature actually works... :-)

Cheers
   Nick



More information about the Binutils mailing list