This is an archive of the discontinued LLVM Phabricator instance.

Support for signed def_cfa_offset instruction
Needs ReviewPublic

Authored by 20ashah on Aug 16 2023, 9:42 AM.

Details

Summary

Support for signed def_cfa_offset instruction

When writing dwarf information for the debug frame section, the signed version of the def_cfa_offset instruction is required since our stack grows up (adding to the SP to allocate more space). Currently, only the unsigned version is being emitted, and it encodes the offset as a ULEB instead of an SLEB.

Diff Detail

Event Timeline

20ashah created this revision.Aug 16 2023, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 9:42 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
20ashah requested review of this revision.Aug 16 2023, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 9:42 AM

We need tests. Is this the only place that needs to be patched to support stacks going upward?