File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / sys / tahoe / Klogf.x
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:30:07 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

	.data
	.comm	_errno,4
	.align	2
_log2:	.long	0x40317217, 0xf7d1cf7a # .double 0.69314718055994531
	.align	2
_ln10:	.long	0x41135d8d, 0xddaaa8ac # .double 2.3025850929940457
	.align	2
_sqrto2:
	.long	0x403504f3, 0x33f9de65 # .double 0.70710678118654753
	.align	2
_p0:	.long	0xc154114d, 0xeb0ba468 # .double -3.31355617479
	.align	2
_p1:	.long	0x40654226, 0x56bd0c4c # .double 0.89554061525
	.align	2
_q0:	.long	0xc0d4114c, 0xfdc7df02 # .double -1.65677797691
	.align	2
_q1:	.long	0x40800000, 0x00000000 # .double 1
	.text
LL0:	.align	1
	.globl	_Klogf
	.data
	.align	2
L54:	.long	0xfffffffe, 0xfffffffe # .double -1.7014117331926443e+38
	.text
	.data
	.align	2
L57:	.long	0x40000000, 0x00000000 # .double 0.5
	.text
	.data
	.align	2
L58:	.long	0x41000000, 0x00000000 # .double 2
	.text
	.data
	.align	2
L60:	.long	0x41000000, 0x00000000 # .double 2
	.text
	.data
	.align	2
L61:	.long	0x40800000, 0x00000000 # .double 1
	.align	2
L62:	.long	0x40800000, 0x00000000 # .double 1
	.text
	.set	L49,0x3c		# Using registers 2,3,4,5
	.data
	.text
_Klogf:	.word	L49
	subl3	$88,fp,sp
	clrl	8(fp)
	tstl	4(fp)
	jgtr	L53
	movl	$33,_errno
	movl	L54+4,r1
	movl	L54,r0
	ret
L53:	pushal	20(fp)			# hfs
	subl3	$88,fp,-(sp)		# &exp
	pushl	8(fp)			# arg
	pushl	4(fp)
	callf	$20,_Kfrexpf
	ldd	r0
					# movl	r1,-56(fp)
	std	-60(fp)			# movl	r0,-60(fp)
	jbr	L55
L2000001:
	pushal	20(fp)			# hfs
	ldd	L58			# 2.0
	pushd
	ldd	-60(fp)			# x
	pushd	
	callf	$24,_Kmuld
	ldd	r0
	std	-60(fp)
	subl2	$1,-88(fp)
L55:	cmpd2	-60(fp),L57
	jlss	L2000001
	cmpd2	-60(fp),_sqrto2
	jgeq	L59
	pushal	20(fp)			# hfs
	ldd	-60(fp)			# x
	pushd
	ldd	L60			# 2.0
	pushd
	callf	$24,_Kmuld
	ldd	r0
	std	-60(fp)
	subl2	$1,-88(fp)
L59:	pushal	20(fp)			# hfs
	ldd	L61			# 1.0
	pushd
	ldd	-60(fp)			# x
	pushd
	callf	$24,_Ksubd	
	ldd	r0
	std	r2
	pushal	20(fp)			# hfs
	ldd	L62			# 1.0
	pushd
	ldd	-60(fp)			# x
	pushd
	callf	$24,_Kaddd
	ldd	r0
	std	r4
	pushal	20(fp)			# hfs
	ldd	r4			# temp result of x-1
	pushd
	ldd	r2			# temp result of x+1
	pushd
	callf	$24,_Kdivd
	ldd	r0
	std	-68(fp)			# z
	pushal	20(fp)			# hfs
	pushd				# z
	pushd				# z
	callf	$24,_Kmuld
	ldd	r0
	std	-76(fp)			# zsq
	pushal	20(fp)			# hfs
	ldd	-76(fp)			# zsq
	pushd
	ldd	_p1			# p1
	pushd
	callf	$24,_Kmuld
	ldd	r0
	std	r2
	pushal	20(fp)			# hfs
	ldd 	_p0			# p0
	pushd
	ldd	r2
	pushd
	callf	$24,_Kaddd
	ldd	r0
	std	-84(fp)			# temp
	pushal	20(fp)			# hfs
	ldd	-76(fp)			# zsq
	pushd
	ldd	_q1
	pushd
	callf	$24,_Kmuld
	ldd	r0
	std	r2
	pushal	20(fp)			# hfs
	ldd	_q0			# q0
	pushd
	ldd	r2
	pushd
	callf	$24,_Kaddd
	ldd	r0
	std	r2			# temp result of (q1*zsq+q0)
	pushal	20(fp)			# hfs
	ldd	r2
	pushd
	ldd	-84(fp)			# temp
	pushd
	callf	$24,_Kdivd
	ldd	r0
	std	-84(fp)			# put in temp
	pushal	20(fp)			# hfs
	ldd	-68(fp)			# z
	pushd
	ldd	-84(fp)
	pushd
	callf	$24,_Kmuld
	ldd	r0
	std	r2
	pushal	20(fp)			#hfs
	pushl	$0			# 0 pad
	pushl	-88(fp)			# exp
	pushl	$0			# dummy
	pushl	$0			# dummy
	callf	$24,_Kcvtld
	pushal	20(fp)			# hfs
	ldd	_log2			# log2
	pushd
	pushl	r1			# exp converted
	pushl	r0			
	callf	$24,_Kmuld
	ldd	r0
	std	r4
	pushal	20(fp)			# hfs
	ldd	r2			# result of temp*z
	pushd
	ldd	r4
	pushd
	callf	$24,_Kaddd
	ldd	r0
	cvdf
	stf	r0
	clrl	r1
	ret

unix.superglobalmegacorp.com

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