This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Floating Point Register saves
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: David Brennan <eCos at brennanhome dot com>
- Cc: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: 01 Oct 2004 10:02:58 +0100
- Subject: Re: [ECOS] Floating Point Register saves
- References: <4158C862.6090402@brennanhome.com><m34qli21ig.fsf@xl5.calivar.com> <415A38D6.7050001@brennanhome.com><m3is9xzakg.fsf@xl5.calivar.com> <415CC4D8.304@brennanhome.com>
David Brennan <eCos@brennanhome.com> writes:
> Nick Garnett wrote:
> >It should still work. The interrupt disable only blocks external
> >interrupts, the FPU unavailable exception is not blocked by this.
> >
> We found that the compiler was doing something funky with our virtual
> tables. We changed our compile options and removed the -fvtable-gc and
> that problem has gone away.
More recent compiler versions seem to have broken that and it is now
recommended that this option be removed.
> However, now we get an occasional SIGILL
> after running for a while with Lazy FPU on. (Program stops at pc
> $000000008 and the backtrace cannot show how it got there.) With Lazy
> FPU off, we have no problems.
Looks like a jump to zero. Maybe stack corruption/overflow caused by
FP save/restore, or something?
> >However, lazy FPU switching is intended to work in ISRs, all the code
> >is in place. I suspect that there is a fairly simple reason for it not
> >working at present. That SIGFPE you see should be cought by the FP
> >switch handler and not get passed back the RedBoot. It is probably
> >still simpler to find out why that is not working.
> >
> We probably will not pursue this. However, if we decide to dig in,
> where exactly would this be happening.
The code is in a set of macros in arch.inc and the FP unavailable
handler in vectors.S. There's not much of it, so it should be easy to
understand.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss