136829Sbostic/* 2*61181Sbostic * Copyright (c) 1986, 1993 3*61181Sbostic * The Regents of the University of California. All rights reserved. 436829Sbostic * 536829Sbostic * This code is derived from software contributed to Berkeley by 636829Sbostic * Computer Consoles Inc. 736829Sbostic * 842637Sbostic * %sccs.include.redist.c% 936829Sbostic */ 1029518Ssam 1136829Sbostic#if defined(SYSLIBC_SCCS) && !defined(lint) 12*61181Sbostic .asciz "@(#)negf.s 8.1 (Berkeley) 06/04/93" 1336829Sbostic#endif /* SYSLIBC_SCCS and not lint */ 1436829Sbostic 1529518Ssam#include <tahoemath/fp.h> 1629518Ssam#include "DEFS.h" 1729518Ssam 1829518SsamXENTRY(negf, 0) 1929518Ssam clrl r1 2029518Ssam andl3 $EXPMASK,4(fp),r0 /* check for reserved operand,zero. */ 2129518Ssam beql isreserved 2229518Ssam movl 4(fp),r0 /* fetch operand. */ 2329518Ssam bbc $31,r0,seton 2429518Ssam andl2 $(0!SIGNBIT),r0 /* turn it off. */ 2529518Ssam ret 2629518Ssamseton: orl2 $SIGNBIT,r0 /* turn it on. */ 2729518Ssam ret 2829518Ssamisreserved: 2929518Ssam bbc $31,4(fp),retzero 3029518Ssam callf $4,sfpresop 3129518Ssam ret 3229518Ssamretzero: 3329518Ssam clrl r0 3429518Ssam ret 35