pc: use fpsave() instead of fpenv() to capture fp exception context

This commit is contained in:
cinap_lenrek 2016-05-01 21:51:15 +02:00
parent e880549da6
commit 5aa224c153
3 changed files with 3 additions and 13 deletions

View file

@ -35,7 +35,6 @@ int ecread(uchar addr);
int ecwrite(uchar addr, uchar val);
#define evenaddr(x) /* x86 doesn't care */
void fpclear(void);
void fpenv(FPsave*);
void fpinit(void);
void fpoff(void);
void (*fprestore)(FPsave*);
@ -44,7 +43,6 @@ void fpsserestore(FPsave*);
void fpsserestore0(FPsave*);
void fpssesave(FPsave*);
void fpssesave0(FPsave*);
ulong fpstatus(void);
void fpx87restore(FPsave*);
void fpx87restore0(FPsave*);
void fpx87save(FPsave*);

View file

@ -612,15 +612,6 @@ TEXT fpx87restore0(SB), $0 /* enable and restore state */
WAIT
RET
TEXT fpstatus(SB), $0 /* get floating point status */
FSTSW AX
RET
TEXT fpenv(SB), $0 /* save state without waiting */
MOVL p+0(FP), AX
FSTENV 0(AX)
RET
TEXT fpclear(SB), $0 /* clear pending exceptions */
FPON
FCLEX /* no WAIT */

View file

@ -706,8 +706,9 @@ matherror(Ureg*, void*)
/*
* get floating point state to check out error
*/
fpenv(&up->fpsave);
mathnote(up->fpsave.status, up->fpsave.pc);
fpsave(&up->fpsave);
up->fpstate = FPinactive;
mathnote(up->fpsave.fsw, up->fpsave.fpuip);
}
/*