Commit 27c35f4b by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

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
parent 4a7da9b5
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> 2000-10-18 Michael Hayes <mhayes@cygnus.com>
* basic-block.h (struct loop): Delete fields pre_header_root * basic-block.h (struct loop): Delete fields pre_header_root
......
...@@ -169,11 +169,13 @@ dw_fde_node; ...@@ -169,11 +169,13 @@ dw_fde_node;
((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY)) ((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY))
/* Offsets recorded in opcodes are a multiple of this alignment factor. */ /* Offsets recorded in opcodes are a multiple of this alignment factor. */
#ifndef DWARF_CIE_DATA_ALIGNMENT
#ifdef STACK_GROWS_DOWNWARD #ifdef STACK_GROWS_DOWNWARD
#define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD)) #define DWARF_CIE_DATA_ALIGNMENT (-((int) UNITS_PER_WORD))
#else #else
#define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD) #define DWARF_CIE_DATA_ALIGNMENT ((int) UNITS_PER_WORD)
#endif #endif
#endif /* not DWARF_CIE_DATA_ALIGNMENT */
/* A pointer to the base of a table that contains frame description /* A pointer to the base of a table that contains frame description
information for each routine. */ information for each routine. */
...@@ -940,6 +942,18 @@ reg_save (label, reg, sreg, offset) ...@@ -940,6 +942,18 @@ reg_save (label, reg, sreg, offset)
else else
cfi->dw_cfi_opc = DW_CFA_offset; 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; offset /= DWARF_CIE_DATA_ALIGNMENT;
if (offset < 0) if (offset < 0)
{ {
......
...@@ -6682,6 +6682,15 @@ default. ...@@ -6682,6 +6682,15 @@ default.
If this macro is defined to anything, the DWARF 2 unwinder will be used 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. 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 @end table
@node Alignment Output @node Alignment Output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment