mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 13:54:19 +08:00
rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define.
* config/rs6000/rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define. * config/alpha/alpha.h (DWARF_FRAME_RETURN_COLUMN): Define. * config/sparc/sparc.h (DWARF_FRAME_RETURN_COLUMN): Define. * frame.h (frame_state): Revert last change. * frame.c (execute_cfa_insn): Just don't record the save of a CFA reg. * libgcc2.c (throw_helper): Revert last change. From-SVN: r32705
This commit is contained in:
parent
e77a2b027d
commit
8034da37ce
@ -1,3 +1,13 @@
|
||||
2000-03-22 Jason Merrill <jason@casey.cygnus.com>
|
||||
|
||||
* config/rs6000/rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define.
|
||||
* config/alpha/alpha.h (DWARF_FRAME_RETURN_COLUMN): Define.
|
||||
* config/sparc/sparc.h (DWARF_FRAME_RETURN_COLUMN): Define.
|
||||
|
||||
* frame.h (frame_state): Revert last change.
|
||||
* frame.c (execute_cfa_insn): Just don't record the save of a CFA reg.
|
||||
* libgcc2.c (throw_helper): Revert last change.
|
||||
|
||||
2000-03-22 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* stmt.c (expand_asm_operands): Don't promote the temporary.
|
||||
|
@ -1328,6 +1328,7 @@ do { \
|
||||
|
||||
/* Before the prologue, RA lives in $26. */
|
||||
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26)
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)
|
||||
|
||||
/* Addressing modes, and classification of registers for them. */
|
||||
|
||||
|
@ -2670,6 +2670,7 @@ do { \
|
||||
mechanism. */
|
||||
|
||||
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM)
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LINK_REGISTER_REGNUM)
|
||||
|
||||
/* Define results of standard character escape sequences. */
|
||||
#define TARGET_BELL 007
|
||||
|
@ -2184,6 +2184,7 @@ LFLGRET"ID":\n\
|
||||
is something you can return to. */
|
||||
#define INCOMING_RETURN_ADDR_RTX \
|
||||
plus_constant (gen_rtx_REG (word_mode, 15), 8)
|
||||
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (15)
|
||||
|
||||
/* The offset from the incoming value of %sp to the top of the stack frame
|
||||
for the current function. On sparc64, we have to account for the stack
|
||||
|
24
gcc/frame.c
24
gcc/frame.c
@ -694,11 +694,16 @@ execute_cfa_insn (void *p, struct frame_state_internal *state,
|
||||
{
|
||||
reg = (insn & 0x3f);
|
||||
p = decode_uleb128 (p, &offset);
|
||||
offset *= info->data_align;
|
||||
state->s.saved[reg] = REG_SAVED_OFFSET;
|
||||
state->s.reg_or_offset[reg] = offset;
|
||||
if (reg == state->s.cfa_reg)
|
||||
state->s.cfa_saved = 1;
|
||||
/* Don't record anything about this register; it's only used to
|
||||
reload SP in the epilogue. We don't want to copy in SP
|
||||
values for outer frames; we handle restoring SP specially. */;
|
||||
else
|
||||
{
|
||||
offset *= info->data_align;
|
||||
state->s.saved[reg] = REG_SAVED_OFFSET;
|
||||
state->s.reg_or_offset[reg] = offset;
|
||||
}
|
||||
}
|
||||
else if (insn & DW_CFA_restore)
|
||||
{
|
||||
@ -727,11 +732,14 @@ execute_cfa_insn (void *p, struct frame_state_internal *state,
|
||||
case DW_CFA_offset_extended:
|
||||
p = decode_uleb128 (p, ®);
|
||||
p = decode_uleb128 (p, &offset);
|
||||
offset *= info->data_align;
|
||||
state->s.saved[reg] = REG_SAVED_OFFSET;
|
||||
state->s.reg_or_offset[reg] = offset;
|
||||
if (reg == state->s.cfa_reg)
|
||||
state->s.cfa_saved = 1;
|
||||
/* Don't record anything; see above. */;
|
||||
else
|
||||
{
|
||||
offset *= info->data_align;
|
||||
state->s.saved[reg] = REG_SAVED_OFFSET;
|
||||
state->s.reg_or_offset[reg] = offset;
|
||||
}
|
||||
break;
|
||||
case DW_CFA_restore_extended:
|
||||
p = decode_uleb128 (p, ®);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Header file for unwinding stack frames for exception handling. */
|
||||
/* Compile this one with gcc. */
|
||||
/* Copyright (C) 1997, 1998, 1999, 2000 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.
|
||||
@ -34,7 +34,6 @@ typedef struct frame_state
|
||||
long reg_or_offset[DWARF_FRAME_REGISTERS+1];
|
||||
unsigned short cfa_reg;
|
||||
unsigned short retaddr_column;
|
||||
char cfa_saved;
|
||||
char saved[DWARF_FRAME_REGISTERS+1];
|
||||
} frame_state;
|
||||
|
||||
|
@ -3679,7 +3679,6 @@ throw_helper (struct eh_context *eh, void *pc, frame_state *my_udata,
|
||||
void *handler;
|
||||
void *handler_p = 0;
|
||||
void *pc_p = 0;
|
||||
void *restored_cfa = 0;
|
||||
frame_state saved_ustruct;
|
||||
int new_eh_model;
|
||||
int cleanup = 0;
|
||||
@ -3789,11 +3788,6 @@ throw_helper (struct eh_context *eh, void *pc, frame_state *my_udata,
|
||||
pc = saved_pc;
|
||||
memcpy (udata, my_udata, sizeof (*udata));
|
||||
|
||||
if (udata->cfa_saved)
|
||||
/* We saved the CFA register into the stack in this frame, so we
|
||||
will restore it in the __throw epilogue. Remember the value. */
|
||||
restored_cfa = udata->cfa;
|
||||
|
||||
while (pc != handler_pc)
|
||||
{
|
||||
frame_state *p = udata;
|
||||
@ -3814,9 +3808,6 @@ throw_helper (struct eh_context *eh, void *pc, frame_state *my_udata,
|
||||
copy_reg (i, udata, my_udata);
|
||||
}
|
||||
|
||||
if (udata->cfa_saved)
|
||||
restored_cfa = udata->cfa;
|
||||
|
||||
pc = get_return_addr (udata, sub_udata) - 1;
|
||||
}
|
||||
|
||||
@ -3832,13 +3823,6 @@ throw_helper (struct eh_context *eh, void *pc, frame_state *my_udata,
|
||||
}
|
||||
/* udata now refers to the frame called by the handler frame. */
|
||||
|
||||
if (my_udata->cfa_saved)
|
||||
/* If we saved the CFA register into the stack (after it became the
|
||||
CFA register), we'll restore that value into SP in the epilogue,
|
||||
as on the ARM. So calculate the adjustment based on the value that
|
||||
will be restored. */
|
||||
my_udata->cfa = restored_cfa;
|
||||
|
||||
/* We adjust SP by the difference between __throw's CFA and the CFA for
|
||||
the frame called by the handler frame, because those CFAs correspond
|
||||
to the SP values at the two call sites. We need to further adjust by
|
||||
|
Loading…
Reference in New Issue
Block a user