From a80670315ce377f65d0b82e01c8c0538cd176f39 Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Tue, 21 Jun 2011 18:04:33 -0700 Subject: 2409 libc needs more gcc 4 support on 32-bit SPARC Reviewed by: Jason King Reviewed by: Richard Elling Reviewed by: Igor Kozhukhov Reviewed by: Dan McDonald Reviewed by: Garrett D'Amore Approved by: Albert Lee --- usr/src/lib/libc/port/fp/floatundidf.c | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 usr/src/lib/libc/port/fp/floatundidf.c (limited to 'usr/src/lib/libc/port/fp/floatundidf.c') diff --git a/usr/src/lib/libc/port/fp/floatundidf.c b/usr/src/lib/libc/port/fp/floatundidf.c new file mode 100644 index 0000000000..097ab53bec --- /dev/null +++ b/usr/src/lib/libc/port/fp/floatundidf.c @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#include "quadint.h" + +#pragma weak __floatundidf = ___floatundidf + +/* + * Convert an unsigned longlong_t to a double-precision floating point value. + */ +double +___floatundidf(u_longlong_t a) +{ + union uu aa; + double d; + + aa.uq = a; + d = aa.ul[H]; + d *= (1 << HALF_BITS); + d *= (1 << HALF_BITS); + d += aa.ul[L]; + + return (d); +} -- cgit v1.2.3