[BACK]Return to copyi.asm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / mpn / sparc64

Diff for /OpenXM_contrib/gmp/mpn/sparc64/Attic/copyi.asm between version 1.1 and 1.1.1.2

version 1.1, 2000/09/09 14:12:41 version 1.1.1.2, 2003/08/25 16:06:26
Line 1 
Line 1 
 ! SPARC v9 __gmpn_copy -- Copy a limb vector.  dnl  SPARC v9 mpn_copyi -- Copy a limb vector, incrementing.
   
 ! Copyright (C) 1999, 2000 Free Software Foundation, Inc.  dnl  Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
   
 ! This file is part of the GNU MP Library.  dnl  This file is part of the GNU MP Library.
   
 ! The GNU MP Library is free software; you can redistribute it and/or modify  dnl  The GNU MP Library is free software; you can redistribute it and/or modify
 ! it under the terms of the GNU Lesser General Public License as published by  dnl  it under the terms of the GNU Lesser General Public License as published
 ! the Free Software Foundation; either version 2.1 of the License, or (at your  dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
 ! option) any later version.  dnl  your option) any later version.
   
 ! The GNU MP Library is distributed in the hope that it will be useful, but  dnl  The GNU MP Library is distributed in the hope that it will be useful, but
 ! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 ! or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public  dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 ! License for more details.  dnl  License for more details.
   
 ! You should have received a copy of the GNU Lesser General Public License  dnl  You should have received a copy of the GNU Lesser General Public License
 ! along with the GNU MP Library; see the file COPYING.LIB.  If not, write to  dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
 ! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,  dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ! MA 02111-1307, USA.  dnl  MA 02111-1307, USA.
   
   include(`../config.m4')
   
 ! INPUT PARAMETERS  C INPUT PARAMETERS
 ! rptr  %o0  C rptr  %o0
 ! sptr  %o1  C sptr  %o1
 ! n     %o2  C n     %o2
   
 include(`../config.m4')  C This code runs at 2 cycles/limb on UltraSPARC 1 and 2.
   
 ASM_START()  ASM_START()
         .register       %g2,#scratch          REGISTER(%g2,#scratch)
         .register       %g3,#scratch          REGISTER(%g3,#scratch)
 PROLOGUE(mpn_copyi)  PROLOGUE(mpn_copyi)
         add     %o2,-8,%o2          addcc   %o2,-8,%o2
         brlz,pn %o2,L(skip)          bl,pt   %icc,L(end01234567)
         nop          nop
         b,a     L(loop1)  
         nop  
   
         ALIGN(16)  
 L(loop1):  L(loop1):
         ldx     [%o1+0],%g1          ldx     [%o1+0],%g1
         ldx     [%o1+8],%g2          ldx     [%o1+8],%g2
Line 56  L(loop1):
Line 53  L(loop1):
         stx     %o3,[%o0+40]          stx     %o3,[%o0+40]
         stx     %o4,[%o0+48]          stx     %o4,[%o0+48]
         stx     %o5,[%o0+56]          stx     %o5,[%o0+56]
         add     %o2,-8,%o2          addcc   %o2,-8,%o2
         brgez,pt        %o2,L(loop1)          bge,pt  %icc,L(loop1)
         add     %o0,64,%o0          add     %o0,64,%o0
   L(end01234567):
 L(skip):          addcc   %o2,8,%o2
         add     %o2,8,%o2          bz,pn   %icc,L(end)
         brz,pt  %o2,L(end)  
         nop          nop
   
 L(loop2):  L(loop2):
         ldx     [%o1],%g1          ldx     [%o1+0],%g1
         add     %o1,8,%o1          add     %o1,8,%o1
         add     %o2,-1,%o2          addcc   %o2,-1,%o2
         stx     %g1,[%o0]          stx     %g1,[%o0+0]
           bg,pt   %icc,L(loop2)
         add     %o0,8,%o0          add     %o0,8,%o0
         brgz,pt %o2,L(loop2)  
         nop  
   
 L(end): retl  L(end): retl
         nop          nop
 EPILOGUE(mpn_copyi)  EPILOGUE(mpn_copyi)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>