aboutsummaryrefslogtreecommitdiff
path: root/libgcc/unwind-dw2-execute_cfa.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18libgcc: Fix uninitialized RA signing on AArch64 [PR107678]Wilco Dijkstra1-3/+8
A recent change only initializes the regs.how[] during Dwarf unwinding which resulted in an uninitialized offset used in return address signing and random failures during unwinding. The fix is to encode the return address signing state in REG_UNSAVED and a new state REG_UNSAVED_ARCHEXT. libgcc/ PR target/107678 * unwind-dw2.h (REG_UNSAVED_ARCHEXT): Add new enum. * unwind-dw2.c (uw_update_context_1): Add REG_UNSAVED_ARCHEXT case. * unwind-dw2-execute_cfa.h: Use REG_UNSAVED_ARCHEXT/REG_UNSAVED to encode the return address signing state. * config/aarch64/aarch64-unwind.h (aarch64_demangle_return_addr) Check current return address signing state. (aarch64_frob_update_contex): Remove.
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2023-01-03libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments [redo]Florian Weimer1-0/+322
The parameters fs->data_align and fs->code_align always have fixed values for a particular target in GCC-generated code. Specialize execute_cfa_program for these values, to avoid multiplications. gcc/c-family/ * c-cppbuiltin.cc (c_cpp_builtins): Define __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__. libgcc/ * unwind-dw2-execute_cfa.h: New file. Extracted from the execute_cfa_program function in unwind-dw2.c. * unwind-dw2.c (execute_cfa_program_generic): New function. (execute_cfa_program_specialized): Likewise. (execute_cfa_program): Call execute_cfa_program_specialized or execute_cfa_program_generic, as appropriate.
2023-01-03Revert "libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments"Florian Weimer1-322/+0
This reverts commit cb775ecd6e437de8fdba9a3f173f3787e90e98f2.
2023-01-02libgcc: Specialize execute_cfa_program in DWARF unwinder for alignmentsFlorian Weimer1-0/+322
The parameters fs->data_align and fs->code_align always have fixed values for a particular target in GCC-generated code. Specialize execute_cfa_program for these values, to avoid multiplications. gcc/c-family/ * c-cppbuiltin.cc (c_cpp_builtins): Define __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__. libgcc/ * unwind-dw2-execute_cfa.h: New file. Extracted from the execute_cfa_program function in unwind-dw2.c. * unwind-dw2.c (execute_cfa_program_generic): New function. (execute_cfa_program_specialized): Likewise. (execute_cfa_program): Call execute_cfa_program_specialized or execute_cfa_program_generic, as appropriate.