Save/restore fpiar.

This commit is contained in:
Ulrich Drepper 1997-12-14 22:09:13 +00:00
parent 49f3765caf
commit 053ed29047
3 changed files with 4 additions and 4 deletions

View File

@ -23,5 +23,5 @@
void void
fegetenv (fenv_t *envp) fegetenv (fenv_t *envp)
{ {
__asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
} }

View File

@ -26,7 +26,7 @@ feholdexcept (fenv_t *envp)
fexcept_t fpcr, fpsr; fexcept_t fpcr, fpsr;
/* Store the environment. */ /* Store the environment. */
__asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp)); __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
/* Now clear all exceptions. */ /* Now clear all exceptions. */
fpsr = envp->status_register & ~FE_ALL_EXCEPT; fpsr = envp->status_register & ~FE_ALL_EXCEPT;

View File

@ -29,7 +29,7 @@ fesetenv (const fenv_t *envp)
values which we do not want to come from the saved environment. values which we do not want to come from the saved environment.
Therefore, we get the current environment and replace the values Therefore, we get the current environment and replace the values
we want to use from the environment specified by the parameter. */ we want to use from the environment specified by the parameter. */
__asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp)); __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp));
temp.status_register &= ~FE_ALL_EXCEPT; temp.status_register &= ~FE_ALL_EXCEPT;
temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD); temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
@ -44,5 +44,5 @@ fesetenv (const fenv_t *envp)
temp.status_register |= envp->status_register & FE_ALL_EXCEPT; temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
} }
__asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr" : : "m" (temp)); __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));
} }