xref: /original-bsd/lib/libc/hp300/gen/ldexp.s (revision 55bd9343)
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 "@(#)ldexp.s	8.1 (Berkeley) 06/04/93"
14#endif /* LIBC_SCCS and not lint */
15
16#include "DEFS.h"
17
18/*
19 * double ldexp(val, exp)
20 * returns: val * (2**exp), for integer exp
21 */
22ENTRY(ldexp)
23	fmoved		sp@(4),fp0
24	fbeq		Ldone
25	ftwotoxl	sp@(12),fp1
26	fmulx		fp1,fp0
27Ldone:
28	fmoved		fp0,sp@-
29	movel		sp@+,d0
30	movel		sp@+,d1
31	rts
32