# Alpha 21064 __udiv_qrnnd1# Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.23# This file is part of GCC.45# The GNU MP Library is free software; you can redistribute it and/or modify6# it under the terms of the GNU General Public License as published by7# the Free Software Foundation; either version 2 of the License, or (at your8# option) any later version.910# In addition to the permissions in the GNU General Public License, the11# Free Software Foundation gives you unlimited permission to link the12# compiled version of this file with other programs, and to distribute13# those programs without any restriction coming from the use of this14# file. (The General Public License restrictions do apply in other15# respects; for example, they cover modification of the file, and16# distribution when not linked into another program.)1718# This file is distributed in the hope that it will be useful, but19# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY20# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public21# License for more details.2223# You should have received a copy of the GNU General Public License24# along with GCC; see the file COPYING. If not, write to the25# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,26# MA 02111-1307, USA.2728.set noreorder29.set noat3031.text3233.globl __udiv_qrnnd34.ent __udiv_qrnnd35__udiv_qrnnd:36.frame $30,0,$26,037.prologue 03839#define cnt $240#define tmp $341#define rem_ptr $1642#define n1 $1743#define n0 $1844#define d $1945#define qb $2046#define AT $at4748ldiq cnt,1649blt d,$largedivisor5051$loop1: cmplt n0,0,tmp52addq n1,n1,n153bis n1,tmp,n154addq n0,n0,n055cmpule d,n1,qb56subq n1,d,tmp57cmovne qb,tmp,n158bis n0,qb,n059cmplt n0,0,tmp60addq n1,n1,n161bis n1,tmp,n162addq n0,n0,n063cmpule d,n1,qb64subq n1,d,tmp65cmovne qb,tmp,n166bis n0,qb,n067cmplt n0,0,tmp68addq n1,n1,n169bis n1,tmp,n170addq n0,n0,n071cmpule d,n1,qb72subq n1,d,tmp73cmovne qb,tmp,n174bis n0,qb,n075cmplt n0,0,tmp76addq n1,n1,n177bis n1,tmp,n178addq n0,n0,n079cmpule d,n1,qb80subq n1,d,tmp81cmovne qb,tmp,n182bis n0,qb,n083subq cnt,1,cnt84bgt cnt,$loop185stq n1,0(rem_ptr)86bis $31,n0,$087ret $31,($26),18889$largedivisor:90and n0,1,$49192srl n0,1,n093sll n1,63,tmp94or tmp,n0,n095srl n1,1,n19697and d,1,$698srl d,1,$599addq $5,$6,$5100101$loop2: cmplt n0,0,tmp102addq n1,n1,n1103bis n1,tmp,n1104addq n0,n0,n0105cmpule $5,n1,qb106subq n1,$5,tmp107cmovne qb,tmp,n1108bis n0,qb,n0109cmplt n0,0,tmp110addq n1,n1,n1111bis n1,tmp,n1112addq n0,n0,n0113cmpule $5,n1,qb114subq n1,$5,tmp115cmovne qb,tmp,n1116bis n0,qb,n0117cmplt n0,0,tmp118addq n1,n1,n1119bis n1,tmp,n1120addq n0,n0,n0121cmpule $5,n1,qb122subq n1,$5,tmp123cmovne qb,tmp,n1124bis n0,qb,n0125cmplt n0,0,tmp126addq n1,n1,n1127bis n1,tmp,n1128addq n0,n0,n0129cmpule $5,n1,qb130subq n1,$5,tmp131cmovne qb,tmp,n1132bis n0,qb,n0133subq cnt,1,cnt134bgt cnt,$loop2135136addq n1,n1,n1137addq $4,n1,n1138bne $6,$Odd139stq n1,0(rem_ptr)140bis $31,n0,$0141ret $31,($26),1142143$Odd:144/* q' in n0. r' in n1 */145addq n1,n0,n1146147cmpult n1,n0,tmp # tmp := carry from addq148subq n1,d,AT149addq n0,tmp,n0150cmovne tmp,AT,n1151152cmpult n1,d,tmp153addq n0,1,AT154cmoveq tmp,AT,n0155subq n1,d,AT156cmoveq tmp,AT,n1157158stq n1,0(rem_ptr)159bis $31,n0,$0160ret $31,($26),1161162.end __udiv_qrnnd163164165