This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: BOOTSTRAP FAILURE: segementation fault in genattrtab under hpux 10.20
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: BOOTSTRAP FAILURE: segementation fault in genattrtab under hpux 10.20
- From: Richard Henderson <rth at redhat dot com>
- Date: Mon, 13 Nov 2000 15:09:01 -0800
- Cc: gcc-bugs at gcc dot gnu dot org, "Jeffrey A. Law" <law at redhat dot com>
- References: <200011111930.OAA11828@hiauly1.hia.nrc.ca> <200011121949.OAA25722@hiauly1.hia.nrc.ca>
On Sun, Nov 12, 2000 at 02:49:29PM -0500, John David Anglin wrote:
> > > As can be seen, the return pointer rp has been used as a scratch register.
> > > Its value at the first return is 0.
>
> I added a `(use (reg:SI 2))' to the return insn to work around this problem.
Hmm, it appears some general cleanup is needed in this area.
Try the following.
> Another problem with regrename?
Dunno.. does it work with -fno-rename-registers?
r~
* config/pa/pa.md (return): Make a define_expand; use r2.
(epilogue): Don't try trivial return.
Index: pa.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/pa.md,v
retrieving revision 1.71
diff -c -p -d -r1.71 pa.md
*** pa.md 2000/10/17 04:43:58 1.71
--- pa.md 2000/11/13 23:07:16
***************
*** 5546,5565 ****
;; Unconditional and other jump instructions.
! (define_insn "return"
! [(return)]
"hppa_can_use_return_insn_p ()"
! "*
! {
! if (TARGET_PA_20)
! return \"bve%* (%%r2)\";
! return \"bv%* %%r0(%%r2)\";
! }"
! [(set_attr "type" "branch")
! (set_attr "length" "4")])
- ;; Use a different pattern for functions which have non-trivial
- ;; epilogues so as not to confuse jump and reorg.
(define_insn "return_internal"
[(return)
(use (reg:SI 2))]
--- 5546,5557 ----
;; Unconditional and other jump instructions.
! (define_expand "return"
! [(parallel [(return)
! (use (reg:SI 2))])]
"hppa_can_use_return_insn_p ()"
! "")
(define_insn "return_internal"
[(return)
(use (reg:SI 2))]
***************
*** 5576,5606 ****
(define_expand "prologue"
[(const_int 0)]
""
! "hppa_expand_prologue ();DONE;")
(define_expand "sibcall_epilogue"
[(return)]
""
! "
! {
! hppa_expand_epilogue ();
! DONE;
! }")
(define_expand "epilogue"
[(return)]
""
"
{
! /* Try to use the trivial return first. Else use the full
! epilogue. */
! if (hppa_can_use_return_insn_p ())
! emit_jump_insn (gen_return ());
! else
! {
! hppa_expand_epilogue ();
! emit_jump_insn (gen_return_internal ());
! }
DONE;
}")
--- 5568,5587 ----
(define_expand "prologue"
[(const_int 0)]
""
! "hppa_expand_prologue (); DONE;")
(define_expand "sibcall_epilogue"
[(return)]
""
! "hppa_expand_epilogue (); DONE;")
(define_expand "epilogue"
[(return)]
""
"
{
! hppa_expand_epilogue ();
! emit_jump_insn (gen_return_internal ());
DONE;
}")