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 */ 1029517Ssam 1136829Sbostic#if defined(SYSLIBC_SCCS) && !defined(lint) 12*61181Sbostic .asciz "@(#)negd.s 8.1 (Berkeley) 06/04/93" 1336829Sbostic#endif /* SYSLIBC_SCCS and not lint */ 1436829Sbostic 1529517Ssam#include <tahoemath/fp.h> 1629517Ssam#include "DEFS.h" 1729517Ssam 1829517SsamXENTRY(negd, 0) 1929517Ssam andl3 $EXPMASK,4(fp),r0 /* check for reserved operand,zero. */ 2029517Ssam beql isreserved 2129517Ssam movl 4(fp),r0 /* fetch operand. */ 2229517Ssam movl 8(fp),r1 2329517Ssam bbc $31,r0,seton 2429517Ssam andl2 $(0!SIGNBIT),r0 /* turn it off. */ 2529517Ssam ret 2629517Ssamseton: orl2 $SIGNBIT,r0 /* turn it on. */ 2729517Ssam ret 2829517Ssamisreserved: 2929517Ssam bbc $31,4(fp),retzero 3029517Ssam callf $4,fpresop 3129517Ssam ret 3229517Ssamretzero: 3329517Ssam clrl r0 3429517Ssam clrl r1 3529517Ssam ret 36