Annotation of OpenXM_contrib/gmp/mpn/pa32/hppa1_1/pa7100/rshift.asm, Revision 1.1
1.1 ! ohara 1: dnl HP-PA mpn_rshift -- Shift a number right.
! 2: dnl Optimized for the PA7100, where is runs at 3.25 cycles/limb.
! 3:
! 4: dnl Copyright 1992, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
! 5:
! 6: dnl This file is part of the GNU MP Library.
! 7:
! 8: dnl The GNU MP Library is free software; you can redistribute it and/or modify
! 9: dnl it under the terms of the GNU Lesser General Public License as published
! 10: dnl by the Free Software Foundation; either version 2.1 of the License, or (at
! 11: dnl your option) any later version.
! 12:
! 13: dnl The GNU MP Library is distributed in the hope that it will be useful, but
! 14: dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 15: dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! 16: dnl License for more details.
! 17:
! 18: dnl You should have received a copy of the GNU Lesser General Public License
! 19: dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! 20: dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! 21: dnl MA 02111-1307, USA.
! 22:
! 23: include(`../config.m4')
! 24:
! 25: C INPUT PARAMETERS
! 26: C res_ptr r26
! 27: C s_ptr r25
! 28: C size r24
! 29: C cnt r23
! 30:
! 31: ASM_START()
! 32: PROLOGUE(mpn_rshift)
! 33: ldws,ma 4(0,%r25),%r22
! 34: mtsar %r23
! 35: addib,= -1,%r24,L(0004)
! 36: vshd %r22,%r0,%r28 C compute carry out limb
! 37: ldws,ma 4(0,%r25),%r29
! 38: addib,<= -5,%r24,L(rest)
! 39: vshd %r29,%r22,%r20
! 40:
! 41: .label L(loop)
! 42: ldws,ma 4(0,%r25),%r22
! 43: stws,ma %r20,4(0,%r26)
! 44: vshd %r22,%r29,%r20
! 45: ldws,ma 4(0,%r25),%r29
! 46: stws,ma %r20,4(0,%r26)
! 47: vshd %r29,%r22,%r20
! 48: ldws,ma 4(0,%r25),%r22
! 49: stws,ma %r20,4(0,%r26)
! 50: vshd %r22,%r29,%r20
! 51: ldws,ma 4(0,%r25),%r29
! 52: stws,ma %r20,4(0,%r26)
! 53: addib,> -4,%r24,L(loop)
! 54: vshd %r29,%r22,%r20
! 55:
! 56: .label L(rest)
! 57: addib,= 4,%r24,L(end1)
! 58: nop
! 59:
! 60: .label L(eloop)
! 61: ldws,ma 4(0,%r25),%r22
! 62: stws,ma %r20,4(0,%r26)
! 63: addib,<= -1,%r24,L(end2)
! 64: vshd %r22,%r29,%r20
! 65: ldws,ma 4(0,%r25),%r29
! 66: stws,ma %r20,4(0,%r26)
! 67: addib,> -1,%r24,L(eloop)
! 68: vshd %r29,%r22,%r20
! 69:
! 70: .label L(end1)
! 71: stws,ma %r20,4(0,%r26)
! 72: vshd %r0,%r29,%r20
! 73: bv 0(%r2)
! 74: stw %r20,0(0,%r26)
! 75:
! 76: .label L(end2)
! 77: stws,ma %r20,4(0,%r26)
! 78:
! 79: .label L(0004)
! 80: vshd %r0,%r22,%r20
! 81: bv 0(%r2)
! 82: stw %r20,0(0,%r26)
! 83: EPILOGUE()
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>