Blame mpn/sparc64/copyd.asm
|
Packit |
5c3484 |
dnl SPARC v9 mpn_copyd -- Copy a limb vector, decrementing.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl Copyright 1999-2003 Free Software Foundation, Inc.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl This file is part of the GNU MP Library.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl The GNU MP Library is free software; you can redistribute it and/or modify
|
|
Packit |
5c3484 |
dnl it under the terms of either:
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl * the GNU Lesser General Public License as published by the Free
|
|
Packit |
5c3484 |
dnl Software Foundation; either version 3 of the License, or (at your
|
|
Packit |
5c3484 |
dnl option) any later version.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl or
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl * the GNU General Public License as published by the Free Software
|
|
Packit |
5c3484 |
dnl Foundation; either version 2 of the License, or (at your option) any
|
|
Packit |
5c3484 |
dnl later version.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl or both in parallel, as here.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl The GNU MP Library is distributed in the hope that it will be useful, but
|
|
Packit |
5c3484 |
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit |
5c3484 |
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
Packit |
5c3484 |
dnl for more details.
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
dnl You should have received copies of the GNU General Public License and the
|
|
Packit |
5c3484 |
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
|
|
Packit |
5c3484 |
dnl see https://www.gnu.org/licenses/.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
include(`../config.m4')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
C cycles/limb
|
|
Packit |
5c3484 |
C UltraSPARC 1&2: 2
|
|
Packit |
5c3484 |
C UltraSPARC 3: 2.5
|
|
Packit |
5c3484 |
C UltraSPARC T1: 17
|
|
Packit |
5c3484 |
C UltraSPARC T3: 6
|
|
Packit |
5c3484 |
C UltraSPARC T4/T5: 2
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
C INPUT PARAMETERS
|
|
Packit |
5c3484 |
C rptr %o0
|
|
Packit |
5c3484 |
C sptr %o1
|
|
Packit |
5c3484 |
C n %o2
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
ASM_START()
|
|
Packit |
5c3484 |
REGISTER(%g2,#scratch)
|
|
Packit |
5c3484 |
REGISTER(%g3,#scratch)
|
|
Packit |
5c3484 |
PROLOGUE(mpn_copyd)
|
|
Packit |
5c3484 |
sllx %o2,3,%g1
|
|
Packit |
5c3484 |
add %g1,%o0,%o0
|
|
Packit |
5c3484 |
add %g1,%o1,%o1
|
|
Packit |
5c3484 |
addcc %o2,-8,%o2
|
|
Packit |
5c3484 |
bl,pt %xcc,L(end01234567)
|
|
Packit |
5c3484 |
nop
|
|
Packit |
5c3484 |
L(loop1):
|
|
Packit |
5c3484 |
ldx [%o1-8],%g1
|
|
Packit |
5c3484 |
ldx [%o1-16],%g2
|
|
Packit |
5c3484 |
ldx [%o1-24],%g3
|
|
Packit |
5c3484 |
ldx [%o1-32],%g4
|
|
Packit |
5c3484 |
ldx [%o1-40],%g5
|
|
Packit |
5c3484 |
ldx [%o1-48],%o3
|
|
Packit |
5c3484 |
ldx [%o1-56],%o4
|
|
Packit |
5c3484 |
ldx [%o1-64],%o5
|
|
Packit |
5c3484 |
add %o1,-64,%o1
|
|
Packit |
5c3484 |
stx %g1,[%o0-8]
|
|
Packit |
5c3484 |
stx %g2,[%o0-16]
|
|
Packit |
5c3484 |
stx %g3,[%o0-24]
|
|
Packit |
5c3484 |
stx %g4,[%o0-32]
|
|
Packit |
5c3484 |
stx %g5,[%o0-40]
|
|
Packit |
5c3484 |
stx %o3,[%o0-48]
|
|
Packit |
5c3484 |
stx %o4,[%o0-56]
|
|
Packit |
5c3484 |
stx %o5,[%o0-64]
|
|
Packit |
5c3484 |
addcc %o2,-8,%o2
|
|
Packit |
5c3484 |
bge,pt %xcc,L(loop1)
|
|
Packit |
5c3484 |
add %o0,-64,%o0
|
|
Packit |
5c3484 |
L(end01234567):
|
|
Packit |
5c3484 |
addcc %o2,8,%o2
|
|
Packit |
5c3484 |
bz,pn %xcc,L(end)
|
|
Packit |
5c3484 |
nop
|
|
Packit |
5c3484 |
L(loop2):
|
|
Packit |
5c3484 |
ldx [%o1-8],%g1
|
|
Packit |
5c3484 |
add %o1,-8,%o1
|
|
Packit |
5c3484 |
addcc %o2,-1,%o2
|
|
Packit |
5c3484 |
stx %g1,[%o0-8]
|
|
Packit |
5c3484 |
bg,pt %xcc,L(loop2)
|
|
Packit |
5c3484 |
add %o0,-8,%o0
|
|
Packit |
5c3484 |
L(end): retl
|
|
Packit |
5c3484 |
nop
|
|
Packit |
5c3484 |
EPILOGUE(mpn_copyd)
|