new copyright notice
[unix-history] / usr / src / lib / libc / tahoe / fpe / negf.s
/*
* Copyright (c) 1986 Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Computer Consoles Inc.
*
* %sccs.include.redist.c%
*/
#if defined(SYSLIBC_SCCS) && !defined(lint)
.asciz "@(#)negf.s 1.3 (Berkeley) %G%"
#endif /* SYSLIBC_SCCS and not lint */
#include <tahoemath/fp.h>
#include "DEFS.h"
XENTRY(negf, 0)
clrl r1
andl3 $EXPMASK,4(fp),r0 /* check for reserved operand,zero. */
beql isreserved
movl 4(fp),r0 /* fetch operand. */
bbc $31,r0,seton
andl2 $(0!SIGNBIT),r0 /* turn it off. */
ret
seton: orl2 $SIGNBIT,r0 /* turn it on. */
ret
isreserved:
bbc $31,4(fp),retzero
callf $4,sfpresop
ret
retzero:
clrl r0
ret