[binutils-gdb] c6x: fix unwinding instructions for some values of cfa_offset

Jan Beulich jbeulich@sourceware.org
Wed Aug 26 07:01:59 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f9477698f2506e5a2d71ac90fb58d39d056015c3

commit f9477698f2506e5a2d71ac90fb58d39d056015c3
Author: Richard Braun <richard.braun@sbg-systems.com>
Date:   Wed Aug 26 08:58:47 2026 +0200

    c6x: fix unwinding instructions for some values of cfa_offset
    
    See C6000 EABI (SPRAB89A) Table 21. Stack unwinding instructions.
    
    gas/
            * config/tc-tic6x.c (tic6x_output_unwinding): Fix unwinding
            byte value.

Diff:
---
 gas/config/tc-tic6x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c
index bfd45f056b4..0db9fd5152a 100644
--- a/gas/config/tc-tic6x.c
+++ b/gas/config/tc-tic6x.c
@@ -4973,7 +4973,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-cvs mailing list