diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-08 22:28:34 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-08 22:28:34 +0000 |
commit | be65d6d7e1f061af2670f80ac19b96d6f5087483 (patch) | |
tree | 821ad079f8bfc5480adb0a9d1cfa0ed3e14cbeb4 /lib/libc/arch/hppa | |
parent | b92b45c9b21020f776996a6fcf1a2eebe2ee71d9 (diff) |
Revert (leaving the complex math part alone). Some stuff is depending
on this historical behavior; so we're stuck in this stupid situation.
No cookie for me.
Diffstat (limited to 'lib/libc/arch/hppa')
-rw-r--r-- | lib/libc/arch/hppa/gen/Makefile.inc | 5 | ||||
-rw-r--r-- | lib/libc/arch/hppa/gen/fabs.c | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/lib/libc/arch/hppa/gen/Makefile.inc b/lib/libc/arch/hppa/gen/Makefile.inc index 99588741c72..318a2eb976b 100644 --- a/lib/libc/arch/hppa/gen/Makefile.inc +++ b/lib/libc/arch/hppa/gen/Makefile.inc @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.inc,v 1.12 2011/07/08 19:21:41 martynas Exp $ +# $OpenBSD: Makefile.inc,v 1.13 2011/07/08 22:28:33 martynas Exp $ SRCS+= setjmp.S -SRCS+= infinity.c ldexp.c nan.c setjmp.S +SRCS+= fabs.c +SRCS+= infinity.c ldexp.c modf.c nan.c setjmp.S SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ fpsetround.c fpsetsticky.c diff --git a/lib/libc/arch/hppa/gen/fabs.c b/lib/libc/arch/hppa/gen/fabs.c new file mode 100644 index 00000000000..d234fb01850 --- /dev/null +++ b/lib/libc/arch/hppa/gen/fabs.c @@ -0,0 +1,17 @@ +/* $OpenBSD: fabs.c,v 1.7 2011/07/08 22:28:33 martynas Exp $ */ + +/* + * Written by Miodrag Vallat. Public domain + */ + +#include <sys/cdefs.h> + +double +fabs(double val) +{ + + __asm__ __volatile__("fabs,dbl %0,%0" : "+f" (val)); + return (val); +} + +__weak_alias(fabsl, fabs); |