date and time created 90/06/07 17:50:27 by bostic
[unix-history] / usr / src / lib / libc / hp300 / gen / modf.s
CommitLineData
120ce78b
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * 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 "@(#)modf.s 5.1 (Berkeley) %G%"
14#endif /* LIBC_SCCS and not lint */
15
16#include "DEFS.h"
17
18/*
19 * double modf(val, iptr)
20 * returns: xxx and n (in *iptr) where val == n.xxx
21 */
22ENTRY(modf)
23 fmoved sp@(4),fp0
24 movel sp@(12),a0
25 fintrzx fp0,fp1
26 fmoved fp1,a0@
27 fsubx fp1,fp0
28 fmoved fp0,sp@-
29 movel sp@+,d0
30 movel sp@+,d1
31 rts