File:  [CSRG BSD Unix] / 43BSDReno / sys / tahoemath / Kcmpf.s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

/*	Kcmpf.s	1.3	86/01/05	*/

#include "../tahoe/SYS.h"

/*
 * cmpf(o1, o2)
 *	register o1, o2;
 *{
 *	if(o1 < 0) {
 *		o1 ^= 0x80000000;
 *		o1 = -o1;
 *	}
 *	if(o2 < 0) {
 *		o2 ^= 0x80000000;
 *		o2 = -o2;
 *	}
 *	if(o1 != o2)
 *		return(o1>o2 ? 1 : -1);
 *	return(0);
 *}
 */
	.text
ENTRY(Kcmpf, 0)
	movl	4(fp),r12
	jgeq	1f
	xorl2	$0x80000000,r12
	mnegl	r12,r12
1:
	movl	12(fp),r11
	jgeq	1f
	xorl2	$0x80000000,r11
	mnegl	r11,r11
1:
	cmpl	r12,r11
	jneq	1f
	clr	r0; ret
1:
	jleq	1f
	movl	$1,r0; ret
1:
	mnegl	$1,r0; ret

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.