xref: /original-bsd/lib/libc/hp300/gen/fixunsdfsi.s (revision c3e32dec)
1/*-
2 * Copyright (c) 1990, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * the Systems Programming Group of the University of Utah Computer
7 * Science Department.
8 *
9 * %sccs.include.redist.c%
10 */
11
12#if defined(LIBC_SCCS) && !defined(lint)
13	.asciz "@(#)fixunsdfsi.s	8.1 (Berkeley) 06/04/93"
14#endif /* LIBC_SCCS and not lint */
15
16#include "DEFS.h"
17
18/* (unsigned) double */
19ENTRY(__fixunsdfsi)
20	fintrzd	sp@(4),fp0
21	fcmpd	#0r2147483648.0,fp0
22	fbge	Lwaybig
23	fmovel	fp0,d0
24	rts
25Lwaybig:
26	fsubd	#0r2147483648.0,fp0
27	fmovel	fp0,d0
28	bset	#31,d0
29	rts
30