1# VAX mpn_rshift -- right shift. 2 3# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. 4 5# This file is part of the GNU MP Library. 6 7# The GNU MP Library is free software; you can redistribute it and/or modify 8# it under the terms of the GNU Lesser General Public License as published by 9# the Free Software Foundation; either version 3 of the License, or (at your 10# option) any later version. 11 12# The GNU MP Library is distributed in the hope that it will be useful, but 13# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15# License for more details. 16 17# You should have received a copy of the GNU Lesser General Public License 18# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 19 20 21# INPUT PARAMETERS 22# rptr (sp + 4) 23# sptr (sp + 8) 24# size (sp + 12) 25# cnt (sp + 16) 26# r0=retval r1=size r2,r3=itmp r4,r5=otmp call-used registers 27# r6=sptr r7=rptr r8=cnt r9 r10 r11 call-saved registers 28 29.text 30 .align 1 31.globl ___gmpn_rshift 32___gmpn_rshift: 33 .word 0x1c0 34 movl 4(ap),r7 35 movl 8(ap),r6 36 movl 12(ap),r1 37 movl 16(ap),r8 38 39 movl (r6)+,r2 40 subl3 r8,$32,r8 41 ashl r8,r2,r0 42 decl r1 43 jeql Lend 44 45Loop: movl (r6)+,r3 46 ashq r8,r2,r4 47 movl r5,(r7)+ 48 movl r3,r2 49 sobgtr r1,Loop 50 51Lend: clrl r3 52 ashq r8,r2,r4 53 movl r5,(r7) 54 ret 55