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