xref: /csrg-svn/lib/libc/vax/gen/frexp.s (revision 26676)
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved.  The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifdef LIBC_SCCS
8	.asciz	"@(#)frexp.s	5.3 (Berkeley) 03/09/86"
9#endif LIBC_SCCS
10
11/* C library -- frexp(value, eptr) */
12
13#include "DEFS.h"
14
15ENTRY(frexp, 0)
16	movd	4(ap),r0		# (r0,r1) := value
17	extzv	$7,$8,r0,*12(ap)	# Fetch exponent
18	jeql	1f			# If exponent zero, we're done
19	subl2	$128,*12(ap)		# Bias the exponent appropriately
20	insv	$128,$7,$8,r0		# Force result exponent to biased 0
211:
22	ret
23