Note to all sites using Power PCs, all EPICS versions.
There is a problem in ccppc when it generates code that copies a struct
timespec, which happens quite a lot in base/src/db/drvTS.c. The compiler
uses a floating-point register to assign values of this 8-byte structure
type, which is unfortunate if the resulting code is called from an
Interrupt Service Routine without having saved the floating point
registers (no floating-point source numbers are involved, so fppSave() and
fppRestore() do not seem necessary). The same effect could potentially
occur with any 8-byte structure, but note that the problem only happens
when you have code like sp = sp2 where these are both 8-byte structs
(not pointers to structs).
We have been wrestling with this problem at APS on our first PPC system to
incorporate an event receiver card (which provides accurate timestamps to
the card). Systems that just use the normal EPICS soft time do not seem
to suffer from it. The compilers from Tornado 1.0.1 and 2.0 both exhibit
the fault.
I have just checked WindSurf and found that this has already been reported
as SPR#28373 and a workaround is discussed in that report: add the
compiler flag -mstrict-align which tells ccppc not to assume that such a
struct is 8-byte aligned, so it reverts to using standard register
load/save instructions. This flag will be added to the EPICS file
base/config/CONFIG.Vx.ppc604 and equivalents for all future EPICS
releases, but sites using the PPC are advised to make this change to their
existing installations to avoid having it bite you unexpectedly. I would
also recommend at least recompiling drvTS.c and rebuilding the EPICS
libraries afterwards.
- Andrew
--
Every great idea appears crazy to start with.
- Navigate by Date:
- Prev:
Re: intConnect vs ipmIntConnect vs devConnectInterrupt Andrew Johnson
- Next:
PowerPC again: Use of floating point in vxWorks shell Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
<2000>
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: intConnect vs ipmIntConnect vs devConnectInterrupt Bernd Schoeneburg
- Next:
PowerPC again: Use of floating point in vxWorks shell Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
<2000>
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|