[PATCH] c6x: fix unwinding instructions for some values of cfa_offset

Jan Beulich jbeulich@suse.com
Fri Aug 14 13:27:55 GMT 2026


On 29.12.2025 08:08, Jan Beulich wrote:
> On 27.12.2025 22:31, Richard Braun wrote:
>> From: Richard Braun <richard.braun@sbg-systems.com>
>>
>> See C6000 EABI (SPRAB89A) Table 21. Stack unwinding instructions.
>>
>> gas/
>> 	* config/tc-tic6x.c (tic6x_output_unwinding): Fix unwinding
>> 	byte value.
>> ---
>>  gas/config/tc-tic6x.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Cc-ing the maintainer to (hopefully) approve this.

Joseph,

would you please take a moment to indicate whether this is okay to go in?

Thanks, Jan

>> diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
>> index eb19309d5c9..39a8a7c7eaa 100644
>> --- a/gas/config/tc-tic6x.c
>> +++ b/gas/config/tc-tic6x.c
>> @@ -4975,7 +4975,7 @@ tic6x_output_unwinding (bool need_extab)
>>  	  else if (cfa_offset > 0x40)
>>  	    {
>>  	      tic6x_unwind_byte (UNWIND_OP_ADD_SP | 0x3f);
>> -	      tic6x_unwind_byte (UNWIND_OP_ADD_SP | (cfa_offset - 0x40));
>> +	      tic6x_unwind_byte (UNWIND_OP_ADD_SP | (cfa_offset - 0x40 - 1));
>>  	    }
>>  	  else
>>  	    {
> 



More information about the Binutils mailing list