xref: /csrg-svn/lib/libc/hp300/gen/modf.s (revision 61117)
141797Sbostic/*-
2*61117Sbostic * Copyright (c) 1990, 1993
3*61117Sbostic *	The Regents of the University of California.  All rights reserved.
441797Sbostic *
541797Sbostic * This code is derived from software contributed to Berkeley by
641797Sbostic * the Systems Programming Group of the University of Utah Computer
741797Sbostic * Science Department.
841797Sbostic *
941797Sbostic * %sccs.include.redist.c%
1041797Sbostic */
1141797Sbostic
1241797Sbostic#if defined(LIBC_SCCS) && !defined(lint)
13*61117Sbostic	.asciz "@(#)modf.s	8.1 (Berkeley) 06/04/93"
1441797Sbostic#endif /* LIBC_SCCS and not lint */
1541797Sbostic
1641797Sbostic#include "DEFS.h"
1741797Sbostic
1841797Sbostic/*
1941797Sbostic * double modf(val, iptr)
2041797Sbostic * returns: xxx and n (in *iptr) where val == n.xxx
2141797Sbostic */
2241797SbosticENTRY(modf)
2341797Sbostic	fmoved	sp@(4),fp0
2441797Sbostic	movel	sp@(12),a0
2541797Sbostic	fintrzx	fp0,fp1
2641797Sbostic	fmoved	fp1,a0@
2741797Sbostic	fsubx	fp1,fp0
2841797Sbostic	fmoved	fp0,sp@-
2941797Sbostic	movel	sp@+,d0
3041797Sbostic	movel	sp@+,d1
3141797Sbostic	rts
32