diff options
author | raj <raj@FreeBSD.org> | 2008-02-24 19:22:53 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-02-24 19:22:53 +0000 |
commit | 69575dab5278af6417ba186bc878ac07a058e66c (patch) | |
tree | f597ddba01b642786124c14eddc6e4bf3de65a48 /lib/msun | |
parent | a1bea77d138ffb6cfd42610b2b91e82d8710297d (diff) | |
download | FreeBSD-src-69575dab5278af6417ba186bc878ac07a058e66c.zip FreeBSD-src-69575dab5278af6417ba186bc878ac07a058e66c.tar.gz |
Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
variations (e500 currently), this provides a gcc-level FPU emulation and is an
alternative approach to the recently introduced kernel-level emulation
(FPU_EMU).
Approved by: cognet (mentor)
MFp4: e500
Diffstat (limited to 'lib/msun')
-rw-r--r-- | lib/msun/powerpc/fenv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/msun/powerpc/fenv.h b/lib/msun/powerpc/fenv.h index 3010472..c29f8a0 100644 --- a/lib/msun/powerpc/fenv.h +++ b/lib/msun/powerpc/fenv.h @@ -82,8 +82,13 @@ extern const fenv_t __fe_dfl_env; #define _ENABLE_MASK ((FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \ FE_OVERFLOW | FE_UNDERFLOW) >> _FPUSW_SHIFT) +#ifndef _SOFT_FLOAT #define __mffs(__env) __asm __volatile("mffs %0" : "=f" (*(__env))) #define __mtfsf(__env) __asm __volatile("mtfsf 255,%0" : : "f" (__env)) +#else +#define __mffs(__env) +#define __mtfsf(__env) +#endif union __fpscr { double __d; |