This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (lack of) Thread-safe exceptions on AIX (gcc-2.95.1)


The following message is a courtesy copy of an article
that has been posted to cygnus.egcs as well.

Stuart Jarriel <sjarriel@motive.com> writes:

> From my niave reading of the libgcc2.a code it seems that AIX can
> only use setjmp/longjmp exception handling due to the lack of
> necessary stack unwinding support.

This is true at present, but will be different very soon.

> If this is true, is it possible to affect the generated assembly
> code to use thread-safe registers?  The stack unwind code seems to
> use registers r9 & r11 to walk the eh_context structure.  The
> Power[PC] calling conventions show those registers to be volatile
> across a context switch, and I assume the same is true across a
> thread switch.

They're volatile across procedure calls (in fact, r9 is an
argument-passing register).  They are not clobbered at random by the
OS.  I don't remember what the problem with threads and sj/lj
exceptions is, but that isn't it.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]