URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [alpha/] [qrnnd.asm] - Rev 282
Compare with Previous | Blame | View Log
# Alpha 21064 __udiv_qrnnd# Copyright (C) 1992, 1994, 1995, 2000, 2009 Free Software Foundation, Inc.# This file is part of GCC.# The GNU MP Library is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 3 of the License, or (at your# option) any later version.# This file 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.# Under Section 7 of GPL version 3, you are granted additional# permissions described in the GCC Runtime Library Exception, version# 3.1, as published by the Free Software Foundation.# You should have received a copy of the GNU General Public License and# a copy of the GCC Runtime Library Exception along with this program;# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see# <http://www.gnu.org/licenses/>.#ifdef __ELF__.section .note.GNU-stack,""#endif.set noreorder.set noat.text.globl __udiv_qrnnd.ent __udiv_qrnnd__udiv_qrnnd:.frame $30,0,$26,0.prologue 0#define cnt $2#define tmp $3#define rem_ptr $16#define n1 $17#define n0 $18#define d $19#define qb $20#define AT $atldiq cnt,16blt d,$largedivisor$loop1: cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule d,n1,qbsubq n1,d,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule d,n1,qbsubq n1,d,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule d,n1,qbsubq n1,d,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule d,n1,qbsubq n1,d,tmpcmovne qb,tmp,n1bis n0,qb,n0subq cnt,1,cntbgt cnt,$loop1stq n1,0(rem_ptr)bis $31,n0,$0ret $31,($26),1$largedivisor:and n0,1,$4srl n0,1,n0sll n1,63,tmpor tmp,n0,n0srl n1,1,n1and d,1,$6srl d,1,$5addq $5,$6,$5$loop2: cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule $5,n1,qbsubq n1,$5,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule $5,n1,qbsubq n1,$5,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule $5,n1,qbsubq n1,$5,tmpcmovne qb,tmp,n1bis n0,qb,n0cmplt n0,0,tmpaddq n1,n1,n1bis n1,tmp,n1addq n0,n0,n0cmpule $5,n1,qbsubq n1,$5,tmpcmovne qb,tmp,n1bis n0,qb,n0subq cnt,1,cntbgt cnt,$loop2addq n1,n1,n1addq $4,n1,n1bne $6,$Oddstq n1,0(rem_ptr)bis $31,n0,$0ret $31,($26),1$Odd:/* q' in n0. r' in n1 */addq n1,n0,n1cmpult n1,n0,tmp # tmp := carry from addqsubq n1,d,ATaddq n0,tmp,n0cmovne tmp,AT,n1cmpult n1,d,tmpaddq n0,1,ATcmoveq tmp,AT,n0subq n1,d,ATcmoveq tmp,AT,n1stq n1,0(rem_ptr)bis $31,n0,$0ret $31,($26),1.end __udiv_qrnnd
