xref: /original-bsd/sys/tahoe/math/Knegd.s (revision feb5f8e2)
1/*-
2 * Copyright (c) 1985 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Computer Consoles Inc.
7 *
8 * %sccs.include.redist.c%
9 *
10 *	@(#)Knegd.s	7.1 (Berkeley) 12/06/90
11 */
12
13#include "../math/fp.h"
14#include "../math/Kfp.h"
15#include "../tahoe/SYS.h"
16
17	.text
18ENTRY(Knegd, 0)
19	andl3	$EXPMASK,4(fp),r0	/* check for reserved operand,zero. */
20	beql	retzero
21	movl	4(fp),r0		/* fetch operand. */
22	movl	8(fp),r1
23	bbc	$31,r0,seton
24	andl2	$(0!SIGNBIT),r0		/* turn it off. */
25	ret
26seton:	orl2	$SIGNBIT,r0		/* turn it on. */
27	ret
28retzero:
29	clrl	r0
30	clrl	r1
31	ret
32