File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / lib / libc / tahoe / gen / cmpf.s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

/*	  
/*	
/*	  The assembler version is the output of cct for this whith minor editing
/*	  (_cmpf --> cmpf 8(fp) --> 12(fp)).
/*	 
/*	
/*	  cmpf(hi1, hi2 )
/*	  {
/*		if ( hi1 == hi2 ) return (0);
/*	  	if(hi1 < 0) {
/*	  		hi1 ^= 0x80000000;
/*	  		hi1 = -hi1;
/*	  	}
/*	  	if(hi2 < 0) {
/*	  		hi2 ^= 0x80000000;
/*	  		hi2 = -hi2;
/*	  	}
/*	  		return(hi1>hi2 ? 1 : -1);
/*	  }
/*	
/*	
/*	 */
.data
.text
LL0:.align	1
.globl	_cmpf
.globl	Xcmpf
.set	L12,0x0
.data
.text
_cmpf:
Xcmpf:.word	L12
cmpl	4(fp),12(fp)
jneq	L16
clrl	r0
ret
L16:tstl	4(fp)
jgeq	L17
xorl2	$-2147483648,4(fp)
mnegl	4(fp),4(fp)
L17:tstl	12(fp)
jgeq	L18
xorl2	$-2147483648,12(fp)
mnegl	12(fp),12(fp)
L18:cmpl	4(fp),12(fp)
jleq	L9999
movl	$1,r0
jbr	L9998
L9999:mnegl	$1,r0
L9998:ret


unix.superglobalmegacorp.com

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