9pc64: handle special case in fpurestore() for procexec()/procsetup()
when a process does an exec, it calls procsetup() which unconditionally sets the sets the TS flag and fpstate=FPinit and fpurestore() should not revert the fpstate.
This commit is contained in:
parent
859d5c9146
commit
435a9a150e
|
@ -721,16 +721,14 @@ void
|
||||||
fpurestore(int ostate)
|
fpurestore(int ostate)
|
||||||
{
|
{
|
||||||
int astate = up->fpstate;
|
int astate = up->fpstate;
|
||||||
if((astate & ~(FPnouser|FPkernel|FPindexm)) == FPactive)
|
if(astate == (FPpush | (ostate & ~FPillegal))){
|
||||||
_stts();
|
if((ostate & ~(FPnouser|FPkernel|FPindexm)) == FPactive)
|
||||||
if((astate & FPindexm) == (ostate & FPindexm)){
|
|
||||||
if((ostate & ~(FPnouser|FPkernel|FPindexm)) == FPactive){
|
|
||||||
if((astate & ~(FPpush|FPnouser|FPkernel|FPindexm)) != FPactive)
|
|
||||||
goto saved;
|
|
||||||
_clts();
|
_clts();
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
saved:
|
if(astate == FPinit) /* don't restore on procexec()/procsetup() */
|
||||||
|
return;
|
||||||
|
if((astate & ~(FPnouser|FPkernel|FPindexm)) == FPactive)
|
||||||
|
_stts();
|
||||||
up->fpsave = up->fpslot[ostate>>FPindexs];
|
up->fpsave = up->fpslot[ostate>>FPindexs];
|
||||||
ostate = FPinactive | (ostate & (FPillegal|FPpush|FPnouser|FPkernel|FPindexm));
|
ostate = FPinactive | (ostate & (FPillegal|FPpush|FPnouser|FPkernel|FPindexm));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue