32-bit Changes

Peter Naulls peter at chocky.org
Mon Apr 21 12:20:39 PDT 2003

In message <2ba6c1e64b.ajw498 at mint.dnsalias.com>
          Alex Waugh <alex at alexwaugh.com> wrote:

> >  	; so we can get a proper stack backtrace in case anything
> >  	; goes horribly wrong.
> > +
> > +	STMFD	sp!, {a1-pc} ; Don't really want to store sp modified
> > +
> What is the purpose of this STM? There doesn't seem to be a matching
> LDM so if the error handler returned then things would break (although
> I'm not sure if it is sensible for the error handler to return anyway).
> I assume you know that the stored value of sp is UNPREDICTABLE, is this
> what the comment is refering to?

I'm afraid it's been some time since I wrote this code, and it was a
case of staring at my own code too long.  The comment there is
I agree is unclear, although I was well aware of sp being invalid when I
wrote it.

Part of the reason of course that I put it in as it is was certainly
that you guys could have a look.  Please fix anything you think is
obviously wrong.

The problem with the signal code is that it's called in several
different ways, with several different results intended, and things
sometimes act differently on RISC OS 5. This is why currently the
register dump is bust. I have a set of test programs, which stress
various kinds of crashes, which I'll look at putting in.  We should
require these tests to work correctly before allowing any changes to
the signal handers, since it's such a crucial piece of code, and caused
us vast headaches in the past.

 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
Free RISC OS Hosting - http://www.prowl.org/

More information about the gcc mailing list