This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CFT] re-organize var-tracking frame_base
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: sje at cup dot hp dot com, gcc-patches at gcc dot gnu dot org, dave dot anglin at nrc dot ca, law at redhat dot com
- Date: Mon, 24 Oct 2005 15:31:40 -0400 (EDT)
- Subject: Re: [CFT] re-organize var-tracking frame_base
> On Thu, Sep 08, 2005 at 10:00:46PM -0400, John David Anglin wrote:
> > ../../gcc/gcc/libgcc2.c:1168: internal compiler error: in dbx_reg_number...
>
> Try number 2. This one at least builds libgcc on cross.
I've installed the pa.c portion of your patch. It's been tested on
hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
More work is still needed on the other PA specific parts.
I've resolved most of the problems on hppa2.0w-hp-hpux11.11. It needs
MD_FALLBACK_FRAME_STATE_FOR to unwind through stubs and signal frames.
However, I'm having trouble with cxa_vec.C. Debugging this is
tricky but it appears __cxa_throw can't be found because pc_begin for
libstdc++.sl is getting set to the same address as main. This causes
the fde search to terminate early. I'm guessing but I think this test
must be overloading a function in libstdc++. Then, the dynamic loader
does something wierd with the frame table generated by collect2 for
libstdc++ (one of the fdes in the frame table points to an fde in the
main object).
Aside from the problem with cxa_vec.C, I haven't seen any issues that
could be attributed to the gcc portion of your patch. Thus, it could
be installed if it's ok.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-10-24 Richard Henderson <rth@redhat.com>
* pa.c (store_reg_modify): Set RTX_FRAME_RELATED_P on each set in
parallel.
(hppa_expand_prologue): Likewise.
Index: config/pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.309
diff -u -3 -p -r1.309 pa.c
--- config/pa/pa.c 24 Oct 2005 02:38:25 -0000 1.309
+++ config/pa/pa.c 24 Oct 2005 18:40:06 -0000
@@ -3325,25 +3326,9 @@ store_reg_modify (int base, int reg, HOS
RTX_FRAME_RELATED_P (insn) = 1;
/* RTX_FRAME_RELATED_P must be set on each frame related set
- in a parallel with more than one element. Don't set
- RTX_FRAME_RELATED_P in the first set if reg is temporary
- register 1. The effect of this operation is recorded in
- the initial copy. */
- if (reg != 1)
- {
- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 0)) = 1;
- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
- }
- else
- {
- /* The first element of a PARALLEL is always processed if it is
- a SET. Thus, we need an expression list for this case. */
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, basereg,
- gen_rtx_PLUS (word_mode, basereg, delta)),
- REG_NOTES (insn));
- }
+ in a parallel with more than one element. */
+ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 0)) = 1;
+ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
}
}
@@ -3577,17 +3562,7 @@ hppa_expand_prologue (void)
frames. */
insn = emit_move_insn (tmpreg, frame_pointer_rtx);
if (DO_FRAME_NOTES)
- {
- /* We need to record the frame pointer save here since the
- new frame pointer is set in the following insn. */
- RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- gen_rtx_MEM (word_mode, stack_pointer_rtx),
- frame_pointer_rtx),
- REG_NOTES (insn));
- }
+ RTX_FRAME_RELATED_P (insn) = 1;
insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
if (DO_FRAME_NOTES)