LLVM previously used DW_CFA_def_cfa instruction in .eh_frame to set the register
and offset for current CFA rule. We change it to DW_CFA_def_cfa_register which
is the same one used by GAS that only changes the register but keeping the old
offset.
Details
Details
- Reviewers
atanasyan petarj sdardis mstojanovic - Commits
- rZORGf8365ccdad99: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
rZORGf972298e202f: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
rGf8365ccdad99: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
rGf972298e202f: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
rG4c68c5ae7194: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
rL360765: [mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
It seems that using the instruction without offset does not affect exception
handling. Testing it on a couple of simple examples where unwinding the stack
is necessary gives correct output. This is expected since GAS uses the same
instructions. Documentation does not indicate that there are any differences
between these two instructions if we don't change the offset (in code before the
patch value passed was +0). This patch may be unnecessary but if we want to be
sure that there aren't any unexpected problems down the line we could apply it.
Now in .eh_frame instead of:
DW_CFA_def_cfa: reg29 +0
we have:
DW_CFA_def_cfa_register: reg29 DW_CFA_nop:
DW_CFA_nop is used for padding since DW_CFA_def_cfa_register is shorter (has one
less operand).