c6x: fix unwinding instructions for some values of cfa_offset
Corrects a bug in C6000 stack unwinding instructions to handle larger cfa_offset values.
This patch series addresses an issue in the C6000 stack unwinding instructions related to the cfa_offset. The original implementation had a bug when handling cfa_offset values greater than 0x40. This change corrects the calculation for such offsets, ensuring proper stack unwinding according to the C6000 EABI.
- proposer
Proposes a fix for C6000 stack unwinding instructions by adjusting the calculation of the cfa_offset.
“See C6000 EABI (SPRAB89A) Table 21. Stack unwinding instructions. gas/ * config/tc-tic6x.c (tic6x_output_unwinding): Fix unwinding byte value.”
- contributor
Forwards the patch and requests maintainer review.
“Cc-ing the maintainer to (hopefully) approve this. Joseph, would you please take a moment to indicate whether this is okay to go in?”
- maintainer
Acknowledges the forwarded patch and awaits further review or confirmation.
Technical Tradeoffs
- Ensures correct stack unwinding for the C6000 architecture.
- Minor code adjustment for accuracy.
In Details
The c6x target's unwinding mechanism, implemented in gas/config/tc-tic6x.c, incorrectly calculates byte values for cfa_offset when it exceeds 0x40. This patch adjusts the calculation to align with the C6000 EABI specification, specifically Table 21, ensuring correct dwarf unwinding information generation.