~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to gmp3/mpn/sparc64/copyd.asm

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

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