* sysdeps/m68k/fpu/bits/fenv.h (fenv_t): Prepend __ to member

names to protect from user's macro namespace. 
* sysdeps/m68k/fpu/feholdexcpt.c, sysdeps/m68k/fpu/fesetenv.c: 
Adapted.
This commit is contained in:
Andreas Schwab 1999-05-22 17:14:30 +00:00
parent d32a40205f
commit 0151001634
3 changed files with 14 additions and 14 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -64,9 +64,9 @@ typedef unsigned int fexcept_t;
corresponds to the layout of the block written by `fmovem'. */
typedef struct
{
unsigned int control_register;
unsigned int status_register;
unsigned int instruction_address;
unsigned int __control_register;
unsigned int __status_register;
unsigned int __instruction_address;
}
fenv_t;

View file

@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@ -29,10 +29,10 @@ feholdexcept (fenv_t *envp)
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
/* Now clear all exceptions. */
fpsr = envp->status_register & ~FE_ALL_EXCEPT;
fpsr = envp->__status_register & ~FE_ALL_EXCEPT;
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
/* And set all exceptions to non-stop. */
fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 6);
fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6);
__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
return 1;

View file

@ -1,5 +1,5 @@
/* Install given floating-point environment.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@ -31,17 +31,17 @@ fesetenv (const fenv_t *envp)
we want to use from the environment specified by the parameter. */
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp));
temp.status_register &= ~FE_ALL_EXCEPT;
temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
temp.__status_register &= ~FE_ALL_EXCEPT;
temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
if (envp == FE_DFL_ENV)
;
else if (envp == FE_NOMASK_ENV)
temp.control_register |= FE_ALL_EXCEPT << 6;
temp.__control_register |= FE_ALL_EXCEPT << 6;
else
{
temp.control_register |= (envp->control_register
& ((FE_ALL_EXCEPT << 6) | FE_UPWARD));
temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
temp.__control_register |= (envp->__control_register
& ((FE_ALL_EXCEPT << 6) | FE_UPWARD));
temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT;
}
__asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));