亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wm_sqrt.s

?? 內(nèi)核是系統(tǒng)的心臟
?? S
字號:
	.file	"wm_sqrt.S"
/*---------------------------------------------------------------------------+
 |  wm_sqrt.S                                                                |
 |                                                                           |
 | Fixed point arithmetic square root evaluation.                            |
 |                                                                           |
 | Copyright (C) 1992,1993                                                   |
 |                       W. Metzenthen, 22 Parker St, Ormond, Vic 3163,      |
 |                       Australia.  E-mail   billm@vaxc.cc.monash.edu.au    |
 |                                                                           |
 | Call from C as:                                                           |
 |   void wm_sqrt(FPU_REG *n, unsigned int control_word)                     |
 |                                                                           |
 +---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------+
 |  wm_sqrt(FPU_REG *n, unsigned int control_word)                           |
 |    returns the square root of n in n.                                     |
 |                                                                           |
 |  Use Newton's method to compute the square root of a number, which must   |
 |  be in the range  [1.0 .. 4.0),  to 64 bits accuracy.                     |
 |  Does not check the sign or tag of the argument.                          |
 |  Sets the exponent, but not the sign or tag of the result.                |
 |                                                                           |
 |  The guess is kept in %esi:%edi                                           |
 +---------------------------------------------------------------------------*/

#include "exception.h"
#include "fpu_asm.h"


#ifdef REENTRANT_FPU
/*	Local storage on the stack: */
#define FPU_accum_3	-4(%ebp)	/* ms word */
#define FPU_accum_2	-8(%ebp)
#define FPU_accum_1	-12(%ebp)
#define FPU_accum_0	-16(%ebp)

/*
 * The de-normalised argument:
 *                  sq_2                  sq_1              sq_0
 *        b b b b b b b ... b b b   b b b .... b b b   b 0 0 0 ... 0
 *           ^ binary point here
 */
#define FPU_fsqrt_arg_2	-20(%ebp)	/* ms word */
#define FPU_fsqrt_arg_1	-24(%ebp)
#define FPU_fsqrt_arg_0	-28(%ebp)	/* ls word, at most the ms bit is set */

#else
/*	Local storage in a static area: */
.data
	.align 4,0
FPU_accum_3:
	.long	0		/* ms word */
FPU_accum_2:
	.long	0
FPU_accum_1:
	.long	0
FPU_accum_0:
	.long	0

/* The de-normalised argument:
                    sq_2                  sq_1              sq_0
          b b b b b b b ... b b b   b b b .... b b b   b 0 0 0 ... 0
             ^ binary point here
 */
FPU_fsqrt_arg_2:
	.long	0		/* ms word */
FPU_fsqrt_arg_1:
	.long	0
FPU_fsqrt_arg_0:
	.long	0		/* ls word, at most the ms bit is set */
#endif REENTRANT_FPU


.text
	.align 2,144

.globl _wm_sqrt
_wm_sqrt:
	pushl	%ebp
	movl	%esp,%ebp
#ifdef REENTRANT_FPU
	subl	$28,%esp
#endif REENTRANT_FPU
	pushl	%esi
	pushl	%edi
	pushl	%ebx

	movl	PARAM1,%esi

	movl	SIGH(%esi),%eax
	movl	SIGL(%esi),%ecx
	xorl	%edx,%edx

/* We use a rough linear estimate for the first guess.. */

	cmpl	EXP_BIAS,EXP(%esi)
	jnz	sqrt_arg_ge_2

	shrl	$1,%eax			/* arg is in the range  [1.0 .. 2.0) */
	rcrl	$1,%ecx
	rcrl	$1,%edx

sqrt_arg_ge_2:
/* From here on, n is never accessed directly again until it is
   replaced by the answer. */

	movl	%eax,FPU_fsqrt_arg_2		/* ms word of n */
	movl	%ecx,FPU_fsqrt_arg_1
	movl	%edx,FPU_fsqrt_arg_0

/* Make a linear first estimate */
	shrl	$1,%eax
	addl	$0x40000000,%eax
	movl	$0xaaaaaaaa,%ecx
	mull	%ecx
	shll	%edx			/* max result was 7fff... */
	testl	$0x80000000,%edx	/* but min was 3fff... */
	jnz	sqrt_prelim_no_adjust

	movl	$0x80000000,%edx	/* round up */

sqrt_prelim_no_adjust:
	movl	%edx,%esi	/* Our first guess */

/* We have now computed (approx)   (2 + x) / 3, which forms the basis
   for a few iterations of Newton's method */

	movl	FPU_fsqrt_arg_2,%ecx	/* ms word */

/*
 * From our initial estimate, three iterations are enough to get us
 * to 30 bits or so. This will then allow two iterations at better
 * precision to complete the process.
 */

/* Compute  (g + n/g)/2  at each iteration (g is the guess). */
	shrl	%ecx		/* Doing this first will prevent a divide */
				/* overflow later. */

	movl	%ecx,%edx	/* msw of the arg / 2 */
	divl	%esi		/* current estimate */
	shrl	%esi		/* divide by 2 */
	addl	%eax,%esi	/* the new estimate */

	movl	%ecx,%edx
	divl	%esi
	shrl	%esi
	addl	%eax,%esi

	movl	%ecx,%edx
	divl	%esi
	shrl	%esi
	addl	%eax,%esi

/*
 * Now that an estimate accurate to about 30 bits has been obtained (in %esi),
 * we improve it to 60 bits or so.
 *
 * The strategy from now on is to compute new estimates from
 *      guess := guess + (n - guess^2) / (2 * guess)
 */

/* First, find the square of the guess */
	movl	%esi,%eax
	mull	%esi
/* guess^2 now in %edx:%eax */

	movl	FPU_fsqrt_arg_1,%ecx
	subl	%ecx,%eax
	movl	FPU_fsqrt_arg_2,%ecx	/* ms word of normalized n */
	sbbl	%ecx,%edx
	jnc	sqrt_stage_2_positive

/* Subtraction gives a negative result,
   negate the result before division. */
	notl	%edx
	notl	%eax
	addl	$1,%eax
	adcl	$0,%edx

	divl	%esi
	movl	%eax,%ecx

	movl	%edx,%eax
	divl	%esi
	jmp	sqrt_stage_2_finish

sqrt_stage_2_positive:
	divl	%esi
	movl	%eax,%ecx

	movl	%edx,%eax
	divl	%esi

	notl	%ecx
	notl	%eax
	addl	$1,%eax
	adcl	$0,%ecx

sqrt_stage_2_finish:
	sarl	$1,%ecx		/* divide by 2 */
	rcrl	$1,%eax

	/* Form the new estimate in %esi:%edi */
	movl	%eax,%edi
	addl	%ecx,%esi

	jnz	sqrt_stage_2_done	/* result should be [1..2) */

#ifdef PARANOID
/* It should be possible to get here only if the arg is ffff....ffff */
	cmp	$0xffffffff,FPU_fsqrt_arg_1
	jnz	sqrt_stage_2_error
#endif PARANOID

/* The best rounded result. */
	xorl	%eax,%eax
	decl	%eax
	movl	%eax,%edi
	movl	%eax,%esi
	movl	$0x7fffffff,%eax
	jmp	sqrt_round_result

#ifdef PARANOID
sqrt_stage_2_error:
	pushl	EX_INTERNAL|0x213
	call	EXCEPTION
#endif PARANOID

sqrt_stage_2_done:

/* Now the square root has been computed to better than 60 bits. */

/* Find the square of the guess. */
	movl	%edi,%eax		/* ls word of guess */
	mull	%edi
	movl	%edx,FPU_accum_1

	movl	%esi,%eax
	mull	%esi
	movl	%edx,FPU_accum_3
	movl	%eax,FPU_accum_2

	movl	%edi,%eax
	mull	%esi
	addl	%eax,FPU_accum_1
	adcl	%edx,FPU_accum_2
	adcl	$0,FPU_accum_3

/*	movl	%esi,%eax */
/*	mull	%edi */
	addl	%eax,FPU_accum_1
	adcl	%edx,FPU_accum_2
	adcl	$0,FPU_accum_3

/* guess^2 now in FPU_accum_3:FPU_accum_2:FPU_accum_1 */

	movl	FPU_fsqrt_arg_0,%eax		/* get normalized n */
	subl	%eax,FPU_accum_1
	movl	FPU_fsqrt_arg_1,%eax
	sbbl	%eax,FPU_accum_2
	movl	FPU_fsqrt_arg_2,%eax		/* ms word of normalized n */
	sbbl	%eax,FPU_accum_3
	jnc	sqrt_stage_3_positive

/* Subtraction gives a negative result,
   negate the result before division */
	notl	FPU_accum_1
	notl	FPU_accum_2
	notl	FPU_accum_3
	addl	$1,FPU_accum_1
	adcl	$0,FPU_accum_2

#ifdef PARANOID
	adcl	$0,FPU_accum_3	/* This must be zero */
	jz	sqrt_stage_3_no_error

sqrt_stage_3_error:
	pushl	EX_INTERNAL|0x207
	call	EXCEPTION

sqrt_stage_3_no_error:
#endif PARANOID

	movl	FPU_accum_2,%edx
	movl	FPU_accum_1,%eax
	divl	%esi
	movl	%eax,%ecx

	movl	%edx,%eax
	divl	%esi

	sarl	$1,%ecx		/* divide by 2 */
	rcrl	$1,%eax

	/* prepare to round the result */

	addl	%ecx,%edi
	adcl	$0,%esi

	jmp	sqrt_stage_3_finished

sqrt_stage_3_positive:
	movl	FPU_accum_2,%edx
	movl	FPU_accum_1,%eax
	divl	%esi
	movl	%eax,%ecx

	movl	%edx,%eax
	divl	%esi

	sarl	$1,%ecx		/* divide by 2 */
	rcrl	$1,%eax

	/* prepare to round the result */

	notl	%eax		/* Negate the correction term */
	notl	%ecx
	addl	$1,%eax
	adcl	$0,%ecx		/* carry here ==> correction == 0 */
	adcl	$0xffffffff,%esi

	addl	%ecx,%edi
	adcl	$0,%esi

sqrt_stage_3_finished:

/*
 * The result in %esi:%edi:%esi should be good to about 90 bits here,
 * and the rounding information here does not have sufficient accuracy
 * in a few rare cases.
 */
	cmpl	$0xffffffe0,%eax
	ja	sqrt_near_exact_x

	cmpl	$0x00000020,%eax
	jb	sqrt_near_exact

	cmpl	$0x7fffffe0,%eax
	jb	sqrt_round_result

	cmpl	$0x80000020,%eax
	jb	sqrt_get_more_precision

sqrt_round_result:
/* Set up for rounding operations */
	movl	%eax,%edx
	movl	%esi,%eax
	movl	%edi,%ebx
	movl	PARAM1,%edi
	movl	EXP_BIAS,EXP(%edi)	/* Result is in  [1.0 .. 2.0) */
	movl	PARAM2,%ecx
	jmp	fpu_reg_round_sqrt


sqrt_near_exact_x:
/* First, the estimate must be rounded up. */
	addl	$1,%edi
	adcl	$0,%esi

sqrt_near_exact:
/*
 * This is an easy case because x^1/2 is monotonic.
 * We need just find the square of our estimate, compare it
 * with the argument, and deduce whether our estimate is
 * above, below, or exact. We use the fact that the estimate
 * is known to be accurate to about 90 bits.
 */
	movl	%edi,%eax		/* ls word of guess */
	mull	%edi
	movl	%edx,%ebx		/* 2nd ls word of square */
	movl	%eax,%ecx		/* ls word of square */

	movl	%edi,%eax
	mull	%esi
	addl	%eax,%ebx
	addl	%eax,%ebx

#ifdef PARANOID
	cmp	$0xffffffb0,%ebx
	jb	sqrt_near_exact_ok

	cmp	$0x00000050,%ebx
	ja	sqrt_near_exact_ok

	pushl	EX_INTERNAL|0x214
	call	EXCEPTION

sqrt_near_exact_ok:
#endif PARANOID

	or	%ebx,%ebx
	js	sqrt_near_exact_small

	jnz	sqrt_near_exact_large

	or	%ebx,%edx
	jnz	sqrt_near_exact_large

/* Our estimate is exactly the right answer */
	xorl	%eax,%eax
	jmp	sqrt_round_result

sqrt_near_exact_small:
/* Our estimate is too small */
	movl	$0x000000ff,%eax
	jmp	sqrt_round_result
	
sqrt_near_exact_large:
/* Our estimate is too large, we need to decrement it */
	subl	$1,%edi
	sbbl	$0,%esi
	movl	$0xffffff00,%eax
	jmp	sqrt_round_result


sqrt_get_more_precision:
/* This case is almost the same as the above, except we start
   with an extra bit of precision in the estimate. */
	stc			/* The extra bit. */
	rcll	$1,%edi		/* Shift the estimate left one bit */
	rcll	$1,%esi

	movl	%edi,%eax		/* ls word of guess */
	mull	%edi
	movl	%edx,%ebx		/* 2nd ls word of square */
	movl	%eax,%ecx		/* ls word of square */

	movl	%edi,%eax
	mull	%esi
	addl	%eax,%ebx
	addl	%eax,%ebx

/* Put our estimate back to its original value */
	stc			/* The ms bit. */
	rcrl	$1,%esi		/* Shift the estimate left one bit */
	rcrl	$1,%edi

#ifdef PARANOID
	cmp	$0xffffff60,%ebx
	jb	sqrt_more_prec_ok

	cmp	$0x000000a0,%ebx
	ja	sqrt_more_prec_ok

	pushl	EX_INTERNAL|0x215
	call	EXCEPTION

sqrt_more_prec_ok:
#endif PARANOID

	or	%ebx,%ebx
	js	sqrt_more_prec_small

	jnz	sqrt_more_prec_large

	or	%ebx,%ecx
	jnz	sqrt_more_prec_large

/* Our estimate is exactly the right answer */
	movl	$0x80000000,%eax
	jmp	sqrt_round_result

sqrt_more_prec_small:
/* Our estimate is too small */
	movl	$0x800000ff,%eax
	jmp	sqrt_round_result
	
sqrt_more_prec_large:
/* Our estimate is too large */
	movl	$0x7fffff00,%eax
	jmp	sqrt_round_result

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美国产电影| 国产精品久久久久久久裸模| 中国av一区二区三区| 国产成人av影院| 久久精品人人爽人人爽| 91美女片黄在线观看| 中文字幕亚洲视频| 老司机午夜精品99久久| 中文字幕的久久| 国产成人av在线影院| 蜜桃av一区二区在线观看| 欧美日韩国产一二三| 欧美精品一区二区三区久久久| 国产精品一区二区在线看| 高清久久久久久| 欧美激情一区不卡| 欧美成人bangbros| 日日摸夜夜添夜夜添亚洲女人| 欧美性猛交一区二区三区精品| 日韩一区二区三| 捆绑紧缚一区二区三区视频 | 91精品1区2区| 午夜欧美大尺度福利影院在线看| 久久国内精品视频| 成+人+亚洲+综合天堂| 91婷婷韩国欧美一区二区| 99久久免费国产| 99国产精品99久久久久久| 久久精品视频网| 日韩精品一卡二卡三卡四卡无卡| 国产尤物一区二区在线| 成人一级黄色片| 91精品国产乱| 亚洲v日本v欧美v久久精品| 婷婷久久综合九色国产成人 | 精品国产sm最大网站免费看| 欧美日韩综合不卡| 在线电影院国产精品| 亚洲图片欧美激情| 国产一区二区三区黄视频| 日韩国产在线观看| 国产老妇另类xxxxx| 亚洲卡通动漫在线| 免费在线观看精品| 国产精品乱码一区二区三区软件 | 国产九色精品成人porny| 日本不卡视频在线| 亚洲成人你懂的| 国产一区二区成人久久免费影院| 一区二区成人在线| 日韩av不卡在线观看| 国产在线视频精品一区| aa级大片欧美| 亚洲欧洲成人精品av97| 2017欧美狠狠色| 欧美一区二区美女| 亚洲欧美日韩精品久久久久| 不卡一区在线观看| 国产精品久久久久久久久图文区 | 成人免费毛片aaaaa**| 国产清纯白嫩初高生在线观看91| 激情欧美一区二区| 一区二区三区资源| 激情综合亚洲精品| 亚洲大片免费看| 福利一区在线观看| 在线电影一区二区三区| 成人高清av在线| 国产精品成人免费| 蜜臂av日日欢夜夜爽一区| 日韩一区二区三免费高清| 亚洲狼人国产精品| 国产精品久久久久久久久免费相片 | 黑人精品欧美一区二区蜜桃 | wwwwxxxxx欧美| 国产亚洲人成网站| 国产精品免费人成网站| 成人av午夜影院| 波多野结衣在线一区| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美国产日韩一二三区| 五月激情六月综合| 中文字幕一区二区三区不卡| 欧洲在线/亚洲| 欧美日韩在线直播| 美女国产一区二区| 日韩欧美一卡二卡| 麻豆久久久久久久| 亚洲一区二区视频| 麻豆精品在线播放| 91麻豆精品国产91久久久资源速度| 青草国产精品久久久久久| 不卡的av在线播放| 91性感美女视频| 欧美xxxx老人做受| 成人免费观看男女羞羞视频| 天天综合色天天综合色h| 亚洲精品久久久蜜桃| 亚洲一二三四区| 2023国产精华国产精品| 91亚洲精品乱码久久久久久蜜桃| 国产精品区一区二区三区| 亚洲精品日韩专区silk| 91福利小视频| 26uuu色噜噜精品一区| 久久久久97国产精华液好用吗| 日韩不卡免费视频| 亚洲综合视频在线观看| 久久日韩精品一区二区五区| 成人精品鲁一区一区二区| 91精品国产入口在线| 99久久99精品久久久久久| 欧美丰满少妇xxxbbb| 国产自产视频一区二区三区| 日韩三级视频在线看| 强制捆绑调教一区二区| 国产精品一区二区x88av| 久久精品99久久久| 久久99热99| 最好看的中文字幕久久| av中文字幕亚洲| 91福利区一区二区三区| 亚洲一区在线视频观看| 国产精品福利一区二区| 欧美高清www午色夜在线视频| 免费在线观看一区二区三区| 欧美成人一区二区三区| 精品一区二区国语对白| 国产91露脸合集magnet| 欧美另类videos死尸| 午夜一区二区三区在线观看| 国产乱理伦片在线观看夜一区| 91视频在线看| 日本一区二区三区在线不卡| 久久女同精品一区二区| 欧美日韩黄色一区二区| 国产精品妹子av| 久久综合一区二区| 久久久精品影视| 欧美r级在线观看| 91视频精品在这里| 99久久精品免费| 一区二区三区四区国产精品| 天天操天天干天天综合网| 国产99久久久国产精品潘金| 日韩一区二区电影在线| 日本在线不卡一区| 视频在线观看91| 午夜av一区二区三区| 成人a区在线观看| 国产在线播精品第三| 国产精品乱码一区二区三区软件| 精品在线一区二区三区| 中文字幕日本不卡| 久久精品夜色噜噜亚洲aⅴ| 日韩一级在线观看| 欧美一区二区成人6969| 欧美日本一道本在线视频| 日本高清不卡视频| 欧美色视频一区| 欧美午夜影院一区| 色婷婷精品大视频在线蜜桃视频| 色综合天天综合色综合av| 91视频.com| 欧美在线不卡视频| 欧美色网站导航| 欧美一区二区三区成人| 久久亚洲一级片| 国产精品人成在线观看免费| 亚洲免费在线播放| 亚洲18色成人| 蜜桃av一区二区三区电影| 国产专区欧美精品| 成人爱爱电影网址| 一本大道久久a久久精二百| 欧美日韩一区不卡| 欧美一区二区日韩| 久久久青草青青国产亚洲免观| 国产精品黄色在线观看| 亚洲va国产天堂va久久en| 精品一区二区精品| 91麻豆免费看片| 911精品国产一区二区在线| www国产成人免费观看视频 深夜成人网| 久久久www成人免费毛片麻豆| 亚洲欧美日本在线| 调教+趴+乳夹+国产+精品| 国产激情91久久精品导航| 色94色欧美sute亚洲线路一ni | 国产精品久久网站| 亚洲va欧美va人人爽| 国产乱子伦视频一区二区三区 | 色久综合一二码| 欧美一区二区三区播放老司机| 欧洲国产伦久久久久久久| 欧美视频一区二区在线观看| 精品电影一区二区三区| 综合激情网...| 美腿丝袜一区二区三区| 91日韩在线专区|