diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-07-26 19:07:10 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-07-26 19:07:10 +0000 |
commit | 7be1b07afad34d8e30960b2ba4ef0345981de096 (patch) | |
tree | 3bce595df93e3d0c9100618218c9ccfb59b154b7 /lib/libc/arch/sh/gen | |
parent | d9f6c851eb9fb66fff25d6f2669cd86def7a5363 (diff) |
Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh)
go direct instead of through the PLT.
ok millert@ kettenis@
Diffstat (limited to 'lib/libc/arch/sh/gen')
-rw-r--r-- | lib/libc/arch/sh/gen/flt_rounds.c | 4 | ||||
-rw-r--r-- | lib/libc/arch/sh/gen/fpgetround.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/arch/sh/gen/flt_rounds.c b/lib/libc/arch/sh/gen/flt_rounds.c index 31fe8e2af30..4add477ab84 100644 --- a/lib/libc/arch/sh/gen/flt_rounds.c +++ b/lib/libc/arch/sh/gen/flt_rounds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flt_rounds.c,v 1.5 2015/10/27 05:54:49 guenther Exp $ */ +/* $OpenBSD: flt_rounds.c,v 1.6 2016/07/26 19:07:09 guenther Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -18,7 +18,7 @@ #include <sys/types.h> #include <float.h> -#include <machine/ieeefp.h> +#include <ieeefp.h> static const int rndmap[] = { 1, /* round to nearest */ diff --git a/lib/libc/arch/sh/gen/fpgetround.c b/lib/libc/arch/sh/gen/fpgetround.c index 3f45ea139ed..de61effe63b 100644 --- a/lib/libc/arch/sh/gen/fpgetround.c +++ b/lib/libc/arch/sh/gen/fpgetround.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpgetround.c,v 1.2 2014/04/18 15:09:52 guenther Exp $ */ +/* $OpenBSD: fpgetround.c,v 1.3 2016/07/26 19:07:09 guenther Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -20,10 +20,11 @@ #include <ieeefp.h> fp_rnd -fpgetround() +fpgetround(void) { register_t fpscr; __asm__ volatile ("sts fpscr, %0" : "=r" (fpscr)); return (fpscr & 0x3); } +DEF_WEAK(fpgetround); |