Mark, re...
> I am having intermittent problems which appear to be corruption of floating
> point operations. It just occurred to me that perhaps the problem is because I
> am doing floating point operations in an interrupt service routine. I am
> running vxWorks 5.3.1 on an MVME162 CPU. Is one allowed to do floating point
> arithmetic in an interrupt service routine, or are the FP registers not saved
> and restored in interrupt routines? Is there a compiler switch or directive
> to control this?
The floating point registers are not saved through interrupts. They're
not even saved though task switches unless the task using them was
spawned with the option VX_FP_TASK. You can save and restore them by
hand on entry to/exit from an interrupt handler by #include'ing ffpLib.h,
malloc'ing a context buffer, and calling fppSave(FP_CONTEXT *pContext)
and fppRestore(FP_CONTEXT *pContext). BTW, you can't call malloc()
from interrupt level because it takes a semaphore.
I don't know of a compiler switch that makes saving FP registers the
default behavior.
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab
- Navigate by Date:
- Prev:
Interrupt routines Mark Rivers
- Next:
Channel Access Client library Eric Boucher
- 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:
Interrupt routines Mark Rivers
- Next:
Channel Access Client library Eric Boucher
- 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
|