⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idigitdiv.s

📁 Arithmetic for integers of almost unlimited size for C and C++. Developed and copyrighted by Ra
💻 S
字号:
#include <config.h>/*  Alpha assembly support for libI  Written by Thomas Papanikolaou, June 2 1998  internal version for John Cremona  IMPORTANT NOTE:  ---------------  This file is based on the file  	mpn/alpha/udiv_qrnnd.S  from GNU MP version 2.0.2  and has been modified by Thomas Papanikolaou on June 2 1998.    Modifications:   - function name is now DigitDiv instead of __udiv_qrnnd  - function now returns the remainder instead fo the quotient  - similarly, the input register 16 is now supposed to contain a pointer    to the quotient instead of a pointer to the remainder  ----------------------------------------------------------------------  original comment block [START]  ----------------------------------------------------------------------  Alpha 21064 DigitDiv  Copyright (C) 1993, 1994 Free Software Foundation, Inc.  This file is part of the GNU MP Library.  The GNU MP Library is free software; you can redistribute it and/or modify  it under the terms of the GNU Library General Public License as published by  the Free Software Foundation; either version 2 of the License, or (at your  option) any later version.  The GNU MP Library is distributed in the hope that it will be useful, but  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public  License for more details.  You should have received a copy of the GNU Library General Public License  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,  MA 02111-1307, USA.  ----------------------------------------------------------------------  original comment block [END]  ----------------------------------------------------------------------*/        .set noreorder        .set noat	.text        .align	3        .globl	DigitDiv        .ent	DigitDivDigitDiv:        .frame $30,0,$26,0        .prologue 0	ldiq	$2 ,16	blt	$19 ,.Largedivisor.Loop1:	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$19 ,$17 ,$20 	subq	$17 ,$19 ,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$19 ,$17 ,$20 	subq	$17 ,$19 ,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$19 ,$17 ,$20 	subq	$17 ,$19 ,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$19 ,$17 ,$20 	subq	$17 ,$19 ,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	subq	$2 ,1,$2 	bgt	$2 ,.Loop1	stq	$18 ,0($16 )	bis	$31,$17 ,$0	ret	$31,($26),1.Largedivisor:	and	$18 ,1,$4	srl	$18 ,1,$18 	sll	$17 ,63,$3 	or	$3 ,$18 ,$18 	srl	$17 ,1,$17 	and	$19 ,1,$6	srl	$19 ,1,$5	addq	$5,$6,$5.Loop2:	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$5,$17 ,$20 	subq	$17 ,$5,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$5,$17 ,$20 	subq	$17 ,$5,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$5,$17 ,$20 	subq	$17 ,$5,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	cmplt	$18 ,0,$3 	addq	$17 ,$17 ,$17 	bis	$17 ,$3 ,$17 	addq	$18 ,$18 ,$18 	cmpule	$5,$17 ,$20 	subq	$17 ,$5,$3 	cmovne	$20 ,$3 ,$17 	bis	$18 ,$20 ,$18 	subq	$2 ,1,$2 	bgt	$2 ,.Loop2	addq	$17 ,$17 ,$17 	addq	$4,$17 ,$17 	bne	$6,.LOdd	stq	$18 ,0($16 )	bis	$31,$17 ,$0	ret	$31,($26),1.LOdd:	 	addq	$17 ,$18 ,$17 	cmpult	$17 ,$18 ,$3	beq	$3 ,.LLp6	addq	$18 ,1,$18 	subq	$17 ,$19 ,$17 .LLp6:	cmpult	$17 ,$19 ,$3 	bne	$3 ,.LLp7	addq	$18 ,1,$18 	subq	$17 ,$19 ,$17 .LLp7:	stq	$18 ,0($16 )	bis	$31,$17 ,$0	ret	$31,($26),1	.end	DigitDiv

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -