- CGAL_IA_FORCE_TO_DOUBLE() for MipsPro using an inline function, since the

previous fix uses a GNU extension ({...}).
- However it appears to not work, so I'll remove it in the next patch.
This commit is contained in:
Sylvain Pion 1999-06-24 11:51:22 +00:00
parent 836b620f1f
commit bef05d6d19
1 changed files with 16 additions and 2 deletions

View File

@ -17,7 +17,7 @@
// package : Interval Arithmetic
// author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
//
// coordinator : INRIA Sophia-Antipolis (<Mariette.Yvinec@sophia.inria.fr>)
// coordinator : INRIA Sophia-Antipolis <Mariette.Yvinec@sophia.inria.fr>
//
// ============================================================================
@ -88,7 +88,7 @@ CGAL_BEGIN_NAMESPACE
// The other possible workaround is to use intervals of "long doubles"
// directly, but I think it would be much slower.
#undef CGAL_IA_FORCE_TO_DOUBLE
#define CGAL_IA_FORCE_TO_DOUBLE(x) ( { volatile double __x = (x); __x; } )
#define CGAL_IA_FORCE_TO_DOUBLE(x) ({ volatile double y = (x); y; })
#ifdef CGAL_IA_USE_ASSEMBLY
#define CGAL_IA_SETFPCW(CW) asm volatile ("fldcw %0" : :"m" (CW))
@ -125,6 +125,20 @@ enum {
#endif
#endif // __sparc__
#ifdef __sgi
// It seems MipsPro needs that too, and it doesn't understand the GNU
// extension ({ ... }). It would be nice to have informations
// on that processor though...
inline double ia_force_to_double(double a)
{
volatile double b = a;
return b;
}
#undef CGAL_IA_FORCE_TO_DOUBLE
#define CGAL_IA_FORCE_TO_DOUBLE(x) ia_force_to_double(x)
#endif // __sgi
#if defined(__mips__) || defined(__sgi)
#ifdef CGAL_IA_USE_ASSEMBLY
#define CGAL_IA_SETFPCW(CW) asm volatile ("ctc1 %0,$31" : :"r" (CW))