Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcvax!cernvax!roberto From: roberto@cernvax.UUCP (roberto bagnara) Newsgroups: gnu.gcc Subject: math.h allowing for fast inline code generation (M68881) Keywords: math M68881 inline GCC Message-ID: <1045@cernvax.UUCP> Date: 13 Aug 89 11:49:14 GMT Organization: CERN, Geneva, Switzerland Lines: 30 I'm looking for a include file to allow GCC producing (fast) M68881 inline code for all the mathematical functions. I think it should be structured in a way like : #if defined (__GNUC__) && defined (__HAVE_68881__) /* GCC mathematical functions using M68881. */ #define sin(x) \ ({ double __value, __arg = (x); \ __asm("fsin.x %1,%0": "=f" (__value): "f" (__arg));\ __value; }) ... ... #else /* Standard math.h definitions. */ extern double sin(); ... ... #endif so to be safely included by any program/compiler/system combinations. Did anyone write such an include file ? Are there any possible problems in doing that ? I'll appreciate very much receiving it, if existing. Thank you for your time Roberto Bagnara