~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/gmp/mpn/alpha/copyd.asm

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2007-04-09 11:51:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070409115151-ql8cr0kalzx1jmla
Tags: 0.9i-20070324-2
Upload to unstable. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl  Alpha mpn_copyd -- copy, decrementing.
 
2
 
 
3
dnl  Copyright 2002, 2003 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
 
19
dnl  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
20
dnl  Boston, MA 02110-1301, USA.
 
21
 
 
22
include(`../config.m4')
 
23
 
 
24
C      cycles/limb
 
25
C EV4:     4
 
26
C EV5:     1.75
 
27
C EV6:     1
 
28
 
 
29
C INPUT PARAMETERS
 
30
C rp    r16
 
31
C up    r17
 
32
C n     r18
 
33
 
 
34
 
 
35
ASM_START()
 
36
PROLOGUE(mpn_copyd)
 
37
        s8addq  r18,r16,r16             C E0
 
38
        s8addq  r18,r17,r17             C E1
 
39
        lda     r18,-8(r18)             C E0
 
40
        blt     r18,$Lend               C E1
 
41
$Loop:  ldq     r0,-8(r17)              C E0
 
42
        ldq     r1,-16(r17)             C E1
 
43
        ldq     r2,-24(r17)             C E0
 
44
        ldq     r3,-32(r17)             C E1
 
45
        ldq     r4,-40(r17)             C E0
 
46
        ldq     r5,-48(r17)             C E1
 
47
        ldq     r6,-56(r17)             C E0
 
48
        ldq     r7,-64(r17)             C E1
 
49
        stq     r0,-8(r16)              C E0
 
50
        lda     r17,-64(r17)            C E1
 
51
        stq     r1,-16(r16)             C E0
 
52
        bis     r31, r31, r31           C E1
 
53
        stq     r2,-24(r16)             C E0
 
54
        lda     r18,-8(r18)             C E1
 
55
        stq     r3,-32(r16)             C E0
 
56
        bis     r31, r31, r31           C E1
 
57
        stq     r4,-40(r16)             C E0
 
58
        bis     r31, r31, r31           C E1
 
59
        stq     r5,-48(r16)             C E0
 
60
        bis     r31, r31, r31           C E1
 
61
        stq     r6,-56(r16)             C E0
 
62
        bis     r31, r31, r31           C E1
 
63
        stq     r7,-64(r16)             C E0
 
64
        lda     r16,-64(r16)            C E1
 
65
        bge     r18,$Loop               C E1
 
66
$Lend:  lda     r18,7(r18)              C E0
 
67
        blt     r18,$Lret               C E1
 
68
        ldq     r0,-8(r17)              C E0
 
69
        beq     r18,$Lend0              C E1
 
70
$Loop0: stq     r0,-8(r16)              C E0
 
71
        lda     r16,-8(r16)             C E1
 
72
        ldq     r0,-16(r17)             C E0
 
73
        lda     r18,-1(r18)             C E1
 
74
        lda     r17,-8(r17)             C E0
 
75
        bgt     r18,$Loop0              C E1
 
76
$Lend0: stq     r0,-8(r16)              C E0
 
77
$Lret:  ret     r31,(r26),1             C E1
 
78
EPILOGUE(mpn_copyd)
 
79
ASM_END()