Annotation of OpenXM_contrib/gmp/mpn/sparc64/copyi.asm, Revision 1.1.1.2
1.1.1.2 ! ohara 1: dnl SPARC v9 mpn_copyi -- Copy a limb vector, incrementing.
1.1 maekawa 2:
1.1.1.2 ! ohara 3: dnl Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1.1 maekawa 4:
1.1.1.2 ! ohara 5: dnl This file is part of the GNU MP Library.
1.1 maekawa 6:
1.1.1.2 ! ohara 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.
1.1 maekawa 21:
1.1.1.2 ! ohara 22: include(`../config.m4')
1.1 maekawa 23:
1.1.1.2 ! ohara 24: C INPUT PARAMETERS
! 25: C rptr %o0
! 26: C sptr %o1
! 27: C n %o2
1.1 maekawa 28:
1.1.1.2 ! ohara 29: C This code runs at 2 cycles/limb on UltraSPARC 1 and 2.
1.1 maekawa 30:
31: ASM_START()
1.1.1.2 ! ohara 32: REGISTER(%g2,#scratch)
! 33: REGISTER(%g3,#scratch)
1.1 maekawa 34: PROLOGUE(mpn_copyi)
1.1.1.2 ! ohara 35: addcc %o2,-8,%o2
! 36: bl,pt %icc,L(end01234567)
1.1 maekawa 37: nop
38: L(loop1):
39: ldx [%o1+0],%g1
40: ldx [%o1+8],%g2
41: ldx [%o1+16],%g3
42: ldx [%o1+24],%g4
43: ldx [%o1+32],%g5
44: ldx [%o1+40],%o3
45: ldx [%o1+48],%o4
46: ldx [%o1+56],%o5
47: add %o1,64,%o1
48: stx %g1,[%o0+0]
49: stx %g2,[%o0+8]
50: stx %g3,[%o0+16]
51: stx %g4,[%o0+24]
52: stx %g5,[%o0+32]
53: stx %o3,[%o0+40]
54: stx %o4,[%o0+48]
55: stx %o5,[%o0+56]
1.1.1.2 ! ohara 56: addcc %o2,-8,%o2
! 57: bge,pt %icc,L(loop1)
1.1 maekawa 58: add %o0,64,%o0
1.1.1.2 ! ohara 59: L(end01234567):
! 60: addcc %o2,8,%o2
! 61: bz,pn %icc,L(end)
1.1 maekawa 62: nop
63: L(loop2):
1.1.1.2 ! ohara 64: ldx [%o1+0],%g1
1.1 maekawa 65: add %o1,8,%o1
1.1.1.2 ! ohara 66: addcc %o2,-1,%o2
! 67: stx %g1,[%o0+0]
! 68: bg,pt %icc,L(loop2)
1.1 maekawa 69: add %o0,8,%o0
70: L(end): retl
71: nop
72: EPILOGUE(mpn_copyi)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>