Annotation of OpenXM_contrib/gmp/mpn/pa32/hppa1_1/sqr_diagonal.asm, Revision 1.1
1.1 ! ohara 1: dnl HP-PA 1.1 32-bit mpn_sqr_diagonal.
! 2:
! 3: dnl Copyright 2001, 2002 Free Software Foundation, Inc.
! 4:
! 5: dnl This file is part of the GNU MP Library.
! 6:
! 7: dnl The GNU MP Library is free software; you can redistribute it and/or modify
! 8: dnl it under the terms of the GNU Lesser General Public License as published
! 9: dnl by the Free Software Foundation; either version 2.1 of the License, or (at
! 10: dnl your option) any later version.
! 11:
! 12: dnl The GNU MP Library is distributed in the hope that it will be useful, but
! 13: dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 14: dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! 15: dnl License for more details.
! 16:
! 17: dnl You should have received a copy of the GNU Lesser General Public License
! 18: dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! 19: dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! 20: dnl MA 02111-1307, USA.
! 21:
! 22: include(`../config.m4')
! 23:
! 24: C This code runs at 6 cycles/limb on the PA7100 and 2.5 cycles/limb on PA8x00.
! 25: C 2-way unrolling wouldn't help the PA7100; it could however bring times down
! 26: C to 2.0 cycles/limb for the PA8x00.
! 27:
! 28: C INPUT PARAMETERS
! 29: define(`rp',`%r26')
! 30: define(`up',`%r25')
! 31: define(`n',`%r24')
! 32:
! 33: ASM_START()
! 34: PROLOGUE(mpn_sqr_diagonal)
! 35: ldo 4(rp),rp
! 36: fldws,ma 4(up),%fr4r
! 37: addib,= -1,n,L(exit)
! 38: xmpyu %fr4r,%fr4r,%fr5
! 39:
! 40: .label L(loop)
! 41: fldws,ma 4(up),%fr4r
! 42: fstws %fr5r,-4(rp)
! 43: fstws,ma %fr5l,8(rp)
! 44: addib,<> -1,n,L(loop)
! 45: xmpyu %fr4r,%fr4r,%fr5
! 46:
! 47: .label L(exit)
! 48: fstws %fr5r,-4(rp)
! 49: bv 0(%r2)
! 50: fstws %fr5l,0(rp)
! 51: EPILOGUE(mpn_sqr_diagonal)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>