This series makes some further unwinder improvements. Unfortunately, not many targets define __LIBGCC_DWARF_REG_SIZES_CONSTANT__; x86-64 does, and it makes uw_install_context_1 quite a bit faster because GCC no longer has to emit generic memcpy code for it. In general, it may be worthwhile to replace this code with target-specific implementations.
Tested on powerpc64le-linux-gnu, x86_64-linux-gnu; I didn't see any test result differences. Built GCC for msp430-elf, too. The revision for the patch I posted earlier (using SWAR techniques for get_cie_encoding) is not ready yet and probably won't make GCC 13. It requires some header cleanups first. Thanks, Florian Florian Weimer (3): Compute a table of DWARF register sizes at compile Define __LIBGCC_DWARF_REG_SIZES_CONSTANT__ if DWARF register size is constant libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments gcc/c-family/c-cppbuiltin.cc | 8 + gcc/config/msp430/msp430.cc | 11 +- gcc/config/rs6000/rs6000.cc | 14 +- gcc/debug.h | 2 + gcc/doc/tm.texi | 7 +- gcc/dwarf2cfi.cc | 116 +++++----- gcc/target.def | 8 +- libgcc/unwind-dw2-execute_cfa.h | 322 ++++++++++++++++++++++++++++ libgcc/unwind-dw2.c | 360 ++++++-------------------------- 9 files changed, 472 insertions(+), 376 deletions(-) create mode 100644 libgcc/unwind-dw2-execute_cfa.h base-commit: 5d060d8b0477ff4911f41c816281daaa24b41a13 -- 2.38.1