From 345aee3bce68b6c6fd16ab5b361db8f748e7032e Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 1 Jun 2007 05:56:51 +0000 Subject: amd64 version of __signbit() (pedro sized quad floats... really just IEEE extended padded to 16 bytes) --- lib/libm/arch/amd64/s_signbitl_e.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/libm/arch/amd64/s_signbitl_e.c (limited to 'lib') diff --git a/lib/libm/arch/amd64/s_signbitl_e.c b/lib/libm/arch/amd64/s_signbitl_e.c new file mode 100644 index 00000000000..110377a2e0c --- /dev/null +++ b/lib/libm/arch/amd64/s_signbitl_e.c @@ -0,0 +1,19 @@ +/* $OpenBSD: s_signbitl_e.c,v 1.1 2007/06/01 05:56:50 jason Exp $ */ + +/* + * Written by Jason L. Wright (jason@thought.net) in 2007 and placed + * into the public domain. + */ + +#include "math.h" +#include "math_private.h" + +/* __signbitl for extended long double */ + +int +__signbitl(long double l) +{ + ieee_quad_shape_type e; + e.value = l; + return (e.parts.mswlo & 0x8000); +} -- cgit v1.2.3