Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.sys.m68k Subject: Re: 68882 Exception Handling Keywords: 68882, exceptions, floating point Message-ID: <520@taniwha.UUCP> Date: 13 Mar 90 17:14:05 GMT References: <1990Mar12.222857.19372@sctc.com> Reply-To: paul@taniwha.UUCP (Paul Campbell) Distribution: comp Organization: Taniwha Systems Design, Oakland Lines: 22 In article <1990Mar12.222857.19372@sctc.com> briel@sctc.com (Marc Briel ) writes: >A question on the 68882 Floating Point Coprocessor: >The manual states that FSAVE/FRESTORE must be performed on entry/exit >for any exception or interrupt regardless of whether it if FPU related >or not. Is this an absolute requirement or just an easy way to solve >an otherwise complex problem? >I have performance concerns and would like to avoid time consuming >FSAVE/FRESTORE operations wherever possible. Does anyone know the >specific cases where save/restore are absolutely required? Basicly you must restore the internal state if you are going to execute any FP coprocessor instructions (except for FSAVE/FRESTORE) even the FMOVEM instructions your C compiler may put in procedure prologs and epilogs (some compilers put these in with empty masks even if you use no FP in your program). The usual way of telling you have a problem is when you see coprocessor protocol violation traps. Paul -- Paul Campbell UUCP: ..!mtxinu!taniwha!paul AppleLink: CAMPBELL.P Remember 1990? that was the year the US government funded a Communist election victory in Nicaragua and claimed it a victory for Capitalism.