mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-09 04:11:27 +08:00
Save/restore fpiar.
This commit is contained in:
parent
49f3765caf
commit
053ed29047
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user