mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 08:03:41 +08:00
Restore i386 binary compatibility in Dwarf EH info.
* config/i386/i386.h (DWARF_FRAME_REGISTERS): Define as 17, the old value of FIRST_PSEUDO_REGISTER. * frame.h (DWARF_FRAME_REGISTERS): Default to FIRST_PSEUDO_REGISTER. (struct frame_state): Use DWARF_FRAME_REGISTERS. * dwarfout.c (output_reg_number): Ditto. * dwarf2out.c (reg_number, expand_builtin_init_dwarf_reg_sizes): Ditto. (DWARF_FRAME_RETURN_COLUMN): Default to DWARF_FRAME_REGISTERS. From-SVN: r31127
This commit is contained in:
parent
87ad679bfb
commit
3073d01c3d
@ -1,3 +1,13 @@
|
||||
1999-12-29 "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
|
||||
|
||||
Restore i386 binary compatibility in Dwarf EH info.
|
||||
* config/i386/i386.h (DWARF_FRAME_REGISTERS): Define as 17, the old
|
||||
value of FIRST_PSEUDO_REGISTER.
|
||||
* frame.h (DWARF_FRAME_REGISTERS): Default to FIRST_PSEUDO_REGISTER.
|
||||
(struct frame_state): Use DWARF_FRAME_REGISTERS.
|
||||
* dwarfout.c (output_reg_number): Ditto.
|
||||
* dwarf2out.c (reg_number, expand_builtin_init_dwarf_reg_sizes): Ditto.
|
||||
(DWARF_FRAME_RETURN_COLUMN): Default to DWARF_FRAME_REGISTERS.
|
||||
|
||||
1999-12-29 Bruce Korb <autogen@linuxbox.com>
|
||||
|
||||
|
@ -612,6 +612,11 @@ extern int ix86_arch;
|
||||
|
||||
#define FIRST_PSEUDO_REGISTER 19
|
||||
|
||||
/* Number of hardware registers that go into the DWARF-2 unwind info.
|
||||
If not defined, equals FIRST_PSEUDO_REGISTER. */
|
||||
|
||||
#define DWARF_FRAME_REGISTERS 17
|
||||
|
||||
/* 1 for registers that have pervasive standard uses
|
||||
and are not available for the register allocator.
|
||||
On the 80386, the stack pointer is such, as is the arg pointer. */
|
||||
|
@ -515,7 +515,7 @@ static void dwarf2out_frame_debug_expr PROTO((rtx, char *));
|
||||
#ifdef PC_REGNUM
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM)
|
||||
#else
|
||||
#define DWARF_FRAME_RETURN_COLUMN FIRST_PSEUDO_REGISTER
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGISTERS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -566,7 +566,7 @@ reg_number (rtl)
|
||||
{
|
||||
register unsigned regno = REGNO (rtl);
|
||||
|
||||
if (regno >= FIRST_PSEUDO_REGISTER)
|
||||
if (regno >= DWARF_FRAME_REGISTERS)
|
||||
{
|
||||
warning ("internal regno botch: regno = %d\n", regno);
|
||||
regno = 0;
|
||||
@ -587,7 +587,7 @@ expand_builtin_init_dwarf_reg_sizes (address)
|
||||
rtx addr = expand_expr (address, NULL_RTX, VOIDmode, 0);
|
||||
rtx mem = gen_rtx_MEM (mode, addr);
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
|
||||
for (i = 0; i < DWARF_FRAME_REGISTERS; ++i)
|
||||
{
|
||||
int offset = i * GET_MODE_SIZE (mode);
|
||||
int size = GET_MODE_SIZE (reg_raw_mode[i]);
|
||||
|
@ -1680,7 +1680,7 @@ output_reg_number (rtl)
|
||||
{
|
||||
register unsigned regno = REGNO (rtl);
|
||||
|
||||
if (regno >= FIRST_PSEUDO_REGISTER)
|
||||
if (regno >= DWARF_FRAME_REGISTERS)
|
||||
{
|
||||
warning_with_decl (dwarf_last_decl, "internal regno botch: regno = %d\n",
|
||||
regno);
|
||||
|
10
gcc/frame.h
10
gcc/frame.h
@ -1,6 +1,6 @@
|
||||
/* Header file for unwinding stack frames for exception handling. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Contributed by Jason Merrill <jason@cygnus.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
@ -21,16 +21,20 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#ifndef DWARF_FRAME_REGISTERS
|
||||
#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER
|
||||
#endif
|
||||
|
||||
typedef struct frame_state
|
||||
{
|
||||
void *cfa;
|
||||
void *eh_ptr;
|
||||
long cfa_offset;
|
||||
long args_size;
|
||||
long reg_or_offset[FIRST_PSEUDO_REGISTER+1];
|
||||
long reg_or_offset[DWARF_FRAME_REGISTERS+1];
|
||||
unsigned short cfa_reg;
|
||||
unsigned short retaddr_column;
|
||||
char saved[FIRST_PSEUDO_REGISTER+1];
|
||||
char saved[DWARF_FRAME_REGISTERS+1];
|
||||
} frame_state;
|
||||
|
||||
/* Values for 'saved' above. */
|
||||
|
Loading…
Reference in New Issue
Block a user