EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: compiler bug in gcc version 2.8.1 (Tornado1) for PPC corrupts floationg point constants?
From: "J. Frederick Bartlett" <[email protected]>
To: Jeff Hill <[email protected]>, "'EPICS Tech Talk'" <[email protected]>
Date: Wed, 09 Feb 2005 12:02:35 -0600
Jeff,

Several years ago I encountered this problem when I was writing an EPICS driver for a MIL/STD1553B bus controller under the vxWorks OS. Another process on the IOC, which did use the FP registers and which had not set the FP save option in the task status, was throwing FP exceptions. Although the problem was corrected by setting the save-option bit, we did discover during the investigation that a FP register's contents was being altered during the execution of the driver's interrupt service routine (ISR) and that, even though no FP operations were being performed in the ISR, the compiler optimization level that we were using caused the FP registers to be used to store temporary values. As I recall, changing the compiler optimization level also eliminated this "hidden" use of the FP registers.

Fritz

Jeff Hill wrote:



-----Original Message-----
From: Ralph Lange [mailto:[email protected]]

is that true for all target architectures or just for
the PPC arch that
Dirk is seeing this on?




The WRS warnings concerning this issue are in an architecture independent section of the documentation, and I don't see anything specific on this issue in the PPC specific section of the vxWorks 5.4 documentation.

A potential pitfall might be that the PPC compiler used
the FP registers to pass integer parameters, and that
the user's ISR didn't anticipate that scenario.

Jeff



Jeff Hill wrote:



Dirk,

I don't know if anyone has made this suggestion, but
watch out for a driver that uses floating point in


its


interrupt service routines as, on vxWorks, the FP
register contents are not saved / restored when


entering


/ exiting interrupt context. The driver must do this
manually if it finds a need to use FP in its ISR.

Jeff








Replies:
Re: compiler bug in gcc version 2.8.1 (Tornado1) for PPC corrupts floationg point constants? Kay-Uwe Kasemir
References:
RE: compiler bug in gcc version 2.8.1 (Tornado1) for PPC corrupts floationg point constants? Jeff Hill

Navigate by Date:
Prev: Browsing the ioc error log file Ned Arnold
Next: Re: Browsing the ioc error log file Luedeke Andreas
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: compiler bug in gcc version 2.8.1 (Tornado1) for PPC corrupts floationg point constants? Jeff Hill
Next: Re: compiler bug in gcc version 2.8.1 (Tornado1) for PPC corrupts floationg point constants? Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·