aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-cppbuiltin.cc
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-01-03 16:47:32 +0100
committerFlorian Weimer <fweimer@redhat.com>2023-01-03 16:47:32 +0100
commit8fdef16cd5d1b89359db3cd9a9768ab2d1b5081f (patch)
tree6b44cd03f6f3e33953b8768e9eedd1cd99dcf55b /gcc/c-family/c-cppbuiltin.cc
parent455acc43518744b89d6a795bbba5045bd228060b (diff)
downloadgcc-8fdef16cd5d1b89359db3cd9a9768ab2d1b5081f.zip
gcc-8fdef16cd5d1b89359db3cd9a9768ab2d1b5081f.tar.gz
gcc-8fdef16cd5d1b89359db3cd9a9768ab2d1b5081f.tar.bz2
libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments [redo]
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.
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.cc')
-rw-r--r--gcc/c-family/c-cppbuiltin.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 333f3e1..35f3919 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1521,6 +1521,9 @@ c_cpp_builtins (cpp_reader *pfile)
#endif
builtin_define_with_int_value ("__LIBGCC_DWARF_FRAME_REGISTERS__",
DWARF_FRAME_REGISTERS);
+ builtin_define_with_int_value ("__LIBGCC_DWARF_CIE_DATA_ALIGNMENT__",
+ DWARF_CIE_DATA_ALIGNMENT);
+
#ifdef EH_RETURN_STACKADJ_RTX
cpp_define (pfile, "__LIBGCC_EH_RETURN_STACKADJ_RTX__");
#endif