tm.texi (DWARF_FRAME_REGISTERS): Add documentation.
* doc/tm.texi (DWARF_FRAME_REGISTERS): Add documentation. (PRE_GCC3_DWARF_FRAME_REGISTERS): Same. * unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS to PRE_GCC3_DWARF_FRAME_REGISTERS. (frame_state): Same. (PRE_GCC3_DWARF_FRAME_REGISTERS): Define if not already defined. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r47730
This commit is contained in:
parent
9d6a24bd51
commit
919543abfe
3 changed files with 46 additions and 3 deletions
|
@ -1,3 +1,14 @@
|
|||
2001-12-06 Aldy Hernandez <aldyh@redhat.com>
|
||||
Richard Henderson <rth@redhat.com>
|
||||
|
||||
* doc/tm.texi (DWARF_FRAME_REGISTERS): Add documentation.
|
||||
(PRE_GCC3_DWARF_FRAME_REGISTERS): Same.
|
||||
|
||||
* unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS
|
||||
to PRE_GCC3_DWARF_FRAME_REGISTERS.
|
||||
(frame_state): Same.
|
||||
(PRE_GCC3_DWARF_FRAME_REGISTERS): Define if not already defined.
|
||||
|
||||
2001-12-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* langhooks.c (lhd_staticp): Mark parameter with
|
||||
|
|
|
@ -3011,6 +3011,33 @@ macros and should be used to refer to those items.
|
|||
|
||||
If the static chain is passed in a register, the two previous macros should
|
||||
be defined instead.
|
||||
|
||||
@findex DWARF_FRAME_REGISTERS
|
||||
@item DWARF_FRAME_REGISTERS
|
||||
This macro specifies the maximum number of hard registers that can be
|
||||
saved in a call frame. This is used to size data structures used in
|
||||
DWARF2 exception handling.
|
||||
|
||||
Prior to GCC 3.0, this macro was needed in order to establish a stable
|
||||
exception handling ABI in the face of adding new hard registers for ISA
|
||||
extensions. In GCC 3.0 and later, the EH ABI is insulated from changes
|
||||
in the number of hard registers. Nevertheless, this macro can still be
|
||||
used to reduce the runtime memory requirements of the exception handling
|
||||
routines, which can be substantial if the ISA contains a lot of
|
||||
registers that are not call-saved.
|
||||
|
||||
If this macro is not defined, it defaults to
|
||||
@code{FIRST_PSEUDO_REGISTER}.
|
||||
|
||||
@findex PRE_GCC3_DWARF_FRAME_REGISTERS
|
||||
@item PRE_GCC3_DWARF_FRAME_REGISTERS
|
||||
|
||||
This macro is similar to @code{DWARF_FRAME_REGISTERS}, but is provided
|
||||
for backward compatibility in pre GCC 3.0 compiled code.
|
||||
|
||||
If this macro is not defined, it defaults to
|
||||
@code{DWARF_FRAME_REGISTERS}.
|
||||
|
||||
@end table
|
||||
|
||||
@node Elimination
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
|
||||
#endif
|
||||
|
||||
/* Dwarf frame registers used for pre gcc 3.0 compiled glibc. */
|
||||
#ifndef PRE_GCC3_DWARF_FRAME_REGISTERS
|
||||
#define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
|
||||
#endif
|
||||
|
||||
/* This is the register and unwind state for a particular frame. */
|
||||
struct _Unwind_Context
|
||||
{
|
||||
|
@ -944,10 +949,10 @@ typedef struct frame_state
|
|||
void *eh_ptr;
|
||||
long cfa_offset;
|
||||
long args_size;
|
||||
long reg_or_offset[DWARF_FRAME_REGISTERS+1];
|
||||
long reg_or_offset[PRE_GCC3_DWARF_FRAME_REGISTERS+1];
|
||||
unsigned short cfa_reg;
|
||||
unsigned short retaddr_column;
|
||||
char saved[DWARF_FRAME_REGISTERS+1];
|
||||
char saved[PRE_GCC3_DWARF_FRAME_REGISTERS+1];
|
||||
} frame_state;
|
||||
|
||||
struct frame_state * __frame_state_for (void *, struct frame_state *);
|
||||
|
@ -974,7 +979,7 @@ __frame_state_for (void *pc_target, struct frame_state *state_in)
|
|||
if (fs.cfa_how == CFA_EXP)
|
||||
return 0;
|
||||
|
||||
for (reg = 0; reg < DWARF_FRAME_REGISTERS + 1; reg++)
|
||||
for (reg = 0; reg < PRE_GCC3_DWARF_FRAME_REGISTERS + 1; reg++)
|
||||
{
|
||||
state_in->saved[reg] = fs.regs.reg[reg].how;
|
||||
switch (state_in->saved[reg])
|
||||
|
|
Loading…
Add table
Reference in a new issue