Patch: -fasynchronous-exceptions

Andrew Haley aph@pasanda.cygnus.co.uk
Thu Apr 27 02:00:00 GMT 2000


> From: Tom Tromey <tromey@cygnus.com>
> Date: 26 Apr 2000 11:32:46 -0600
> 
> Andrew notes that gcc's exception handling in leaf functions is
> currently broken, but that using -fasynchronous-exceptions works
> around it.  So, I'm committing this patch.

This obviously has a negative effect on code size, but the alternative
is far worse.  What has happened is that the gcc maintainers has made
leaf functions not emit exception tables at all, because (obviously)
they don't call any functions and therefore can't raise exceptions.
This isn't true for us Java users, becaue SEGV and FP signals can do
so.

I have a plan for a patch that will fix this forever.  It's like
asynchronous-exceptions, but limited to the cases we actually need,
which are divide instructions and pointer accesses.  I'd like to make
a new insn predicate called something like CAN_SIGNAL that returns
true only for divides and (non-stack) pointer references.  Given such
a predicate, we need only to generate unwinder information when really
necessary.

I don't have time to do this right now, but in my opinion it would be
a great improvement.

Andrew.


More information about the Java-patches mailing list