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

Annotation of OpenXM_contrib/gmp/mpn/sparc64/copyd.asm, Revision 1.1.1.1

1.1       ohara       1: dnl  SPARC v9 mpn_copyd -- Copy a limb vector, decrementing.
                      2:
                      3: dnl  Copyright 1999, 2000, 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 INPUT PARAMETERS
                     25: C rptr %o0
                     26: C sptr %o1
                     27: C n            %o2
                     28:
                     29: C This code runs at 2 cycles/limb on UltraSPARC 1 and 2.
                     30:
                     31: ASM_START()
                     32:        REGISTER(%g2,#scratch)
                     33:        REGISTER(%g3,#scratch)
                     34: PROLOGUE(mpn_copyd)
                     35:        sllx    %o2,3,%g1
                     36:        add     %g1,%o0,%o0
                     37:        add     %g1,%o1,%o1
                     38:        addcc   %o2,-8,%o2
                     39:        bl,pt   %icc,L(end01234567)
                     40:        nop
                     41: L(loop1):
                     42:        ldx     [%o1-8],%g1
                     43:        ldx     [%o1-16],%g2
                     44:        ldx     [%o1-24],%g3
                     45:        ldx     [%o1-32],%g4
                     46:        ldx     [%o1-40],%g5
                     47:        ldx     [%o1-48],%o3
                     48:        ldx     [%o1-56],%o4
                     49:        ldx     [%o1-64],%o5
                     50:        add     %o1,-64,%o1
                     51:        stx     %g1,[%o0-8]
                     52:        stx     %g2,[%o0-16]
                     53:        stx     %g3,[%o0-24]
                     54:        stx     %g4,[%o0-32]
                     55:        stx     %g5,[%o0-40]
                     56:        stx     %o3,[%o0-48]
                     57:        stx     %o4,[%o0-56]
                     58:        stx     %o5,[%o0-64]
                     59:        addcc   %o2,-8,%o2
                     60:        bge,pt  %icc,L(loop1)
                     61:        add     %o0,-64,%o0
                     62: L(end01234567):
                     63:        addcc   %o2,8,%o2
                     64:        bz,pn   %icc,L(end)
                     65:        nop
                     66: L(loop2):
                     67:        ldx     [%o1-8],%g1
                     68:        add     %o1,-8,%o1
                     69:        addcc   %o2,-1,%o2
                     70:        stx     %g1,[%o0-8]
                     71:        bg,pt   %icc,L(loop2)
                     72:        add     %o0,-8,%o0
                     73: L(end):        retl
                     74:        nop
                     75: EPILOGUE(mpn_copyd)

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