134480Sbostic/* 234480Sbostic * Copyright (c) 1983 Regents of the University of California. 334480Sbostic * All rights reserved. 434480Sbostic * 534480Sbostic * Redistribution and use in source and binary forms are permitted 6*34819Sbostic * provided that the above copyright notice and this paragraph are 7*34819Sbostic * duplicated in all such forms and that any documentation, 8*34819Sbostic * advertising materials, and other materials related to such 9*34819Sbostic * distribution and use acknowledge that the software was developed 10*34819Sbostic * by the University of California, Berkeley. The name of the 11*34819Sbostic * University may not be used to endorse or promote products derived 12*34819Sbostic * from this software without specific prior written permission. 13*34819Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*34819Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*34819Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1634480Sbostic */ 1713417Sroot 18*34819Sbostic#if defined(LIBC_SCCS) && !defined(lint) 19*34819Sbostic .asciz "@(#)modf.s 5.4 (Berkeley) 06/27/88" 20*34819Sbostic#endif /* LIBC_SCCS and not lint */ 2134480Sbostic 2213417Sroot/* 2313417Sroot * double modf (value, iptr) 2413417Sroot * double value, *iptr; 2513417Sroot * 2613417Sroot * Modf returns the fractional part of "value", 2713417Sroot * and stores the integer part indirectly through "iptr". 2813417Sroot */ 2913417Sroot 3013417Sroot#include "DEFS.h" 3113417Sroot 3217329SsamENTRY(modf, 0) 3313417Sroot emodd 4(ap),$0,$0f1.0,r2,r0 3413417Sroot jvs 1f # integer overflow 3513417Sroot cvtld r2,*12(ap) 3613417Sroot ret 3713417Sroot1: 3813417Sroot subd3 r0,4(ap),*12(ap) 3913417Sroot ret 40