This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Exception causing insns in delay slots
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: jason at redhat dot com (Jason Merrill)
- Cc: davem at redhat dot com, gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com, java at gcc dot gnu dot org, dave dot anglin at nrc dot ca
- Date: Fri, 26 Apr 2002 16:03:32 -0400 (EDT)
- Subject: Re: Exception causing insns in delay slots
> > Hmmm... ok, but does PC need to be accurate for other purposes?
>
> The uses of PC in the EH mechanism are only interested in the location of
> the throw. The return address is just a way of getting at it.
One of the optimizations that was disabled in the hppa-linux dw2
implementation was the return pointer adjustment for unconditional
branches in the delay slot of a call sequence. In this optimization,
the return pointer is adjusted to effect the branch when the return
occurs. This causes the loss of the location of the throw.
I must admit that I find it strange that the compiler puts these
insns into the delay slot at all. In all other cases, the delay
slot insn executes before the branch is actually taken. This seems
inconsistent.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)