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