[PATCH, V1 1/2] gas: ginsn: do not emit an unnecessary trailing comma in textual dump

Indu Bhagat indu.bhagat@oracle.com
Thu Aug 1 05:38:11 GMT 2024


On 7/31/24 4:31 AM, Jan Beulich wrote:
>> --- a/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
>> +++ b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
>> @@ -18,7 +18,7 @@ GAS LISTING .*
>>     11 \?\?\?\? E200     		loop    foo
>>     11              	ginsn: JCC
>>     12 \?\?\?\? 3EFFE0   		notrack jmp     \*%rax
>> -  12              	ginsn: JMP %r0,
>> +  12              	ginsn: JMP %r0
>>     13 \?\?\?\? 41FFD0   		call    \*%r8
>>     13              	ginsn: CALL
> Any reason the JMP is printed with an operand, but the CALL isn't?

The current implementation in ginsn_print () keeps the CALL/RETURN 
similar looking by:

/* For some ginsn types, no further information is printed for now.  */
if (ginsn->type == GINSN_TYPE_CALL
     || ginsn->type == GINSN_TYPE_RETURN)
   goto end;

Now that you point out, perhaps it is better to print the operand with 
CALL ginsn.  I can get to this change in a subsequent patch.

Thanks for reviewing
Indu


More information about the Binutils mailing list