aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-10-18 12:49:47 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2000-10-18 12:49:47 +0000
commit27c35f4b2435bc05271dca75ec26a585e6853f4a (patch)
treed5d06509d24b12adeb8adeeef6a987f7b8e85b26 /gcc
parent4a7da9b55397ecac9f71f3b4f3020ba242ee385c (diff)
downloadgcc-27c35f4b2435bc05271dca75ec26a585e6853f4a.zip
gcc-27c35f4b2435bc05271dca75ec26a585e6853f4a.tar.gz
gcc-27c35f4b2435bc05271dca75ec26a585e6853f4a.tar.bz2
tm.texi (Exception Region Output): Document DWARF_CIE_DATA_ALIGNMENT.
* tm.texi (Exception Region Output): Document DWARF_CIE_DATA_ALIGNMENT. * dwarf2out.c (DWARF_CIE_DATA_ALIGNMENT): Wrap definition in #ifndef. [ENABLE_CHECKING] (reg_save): Abort if offset is not a multiple of DWARF_CIE_DATA_ALIGNMENT. From-SVN: r36935
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/dwarf2out.c14
-rw-r--r--gcc/tm.texi9
3 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1345e5f..a78abfd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * tm.texi (Exception Region Output): Document
+ DWARF_CIE_DATA_ALIGNMENT.
+ * dwarf2out.c (DWARF_CIE_DATA_ALIGNMENT): Wrap definition in
+ #ifndef.
+ [ENABLE_CHECKING] (reg_save): Abort if offset is not a multiple of
+ DWARF_CIE_DATA_ALIGNMENT.
+
2000-10-18 Michael Hayes <mhayes@cygnus.com>
* basic-block.h (struct loop): Delete fields pre_header_root
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 017cc62..b362a1e 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -169,11 +169,13 @@ dw_fde_node;
((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY))
/* Offsets recorded in opcodes are a multiple of this alignment factor. */
+#ifndef DWARF_CIE_DATA_ALIGNMENT
#ifdef STACK_GROWS_DOWNWARD
#define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD))
#else
#define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD)
#endif
+#endif /* not DWARF_CIE_DATA_ALIGNMENT */
/* A pointer to the base of a table that contains frame description
information for each routine. */
@@ -940,6 +942,18 @@ reg_save (label, reg, sreg, offset)
else
cfi->dw_cfi_opc = DW_CFA_offset;
+#ifdef ENABLE_CHECKING
+ {
+ /* If we get an offset that is not a multiple of
+ DWARF_CIE_DATA_ALIGNMENT, there is either a bug in the
+ definition of DWARF_CIE_DATA_ALIGNMENT, or a bug in the machine
+ description. */
+ long check_offset = offset / DWARF_CIE_DATA_ALIGNMENT;
+
+ if (check_offset * DWARF_CIE_DATA_ALIGNMENT != offset)
+ abort ();
+ }
+#endif
offset /= DWARF_CIE_DATA_ALIGNMENT;
if (offset < 0)
{
diff --git a/gcc/tm.texi b/gcc/tm.texi
index 7849438..fd2403e 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -6682,6 +6682,15 @@ default.
If this macro is defined to anything, the DWARF 2 unwinder will be used
instead of inline unwinders and __unwind_function in the non-setjmp case.
+@findex DWARF_CIE_DATA_ALIGNMENT
+@item DWARF_CIE_DATA_ALIGNMENT
+This macro need only be defined if the target might save registers in the
+function prologue at an offset to the stack pointer that is not aligned to
+@code{UNITS_PER_WORD}. The definition should be the negative minimum
+alignment if @code{STACK_GROWS_DOWNWARD} is defined, and the positive
+minimum alignment otherwise. @xref{SDB and DWARF}. Only applicable if
+the target supports DWARF 2 frame unwind information.
+
@end table
@node Alignment Output